moldified for HADOOP-9238