I am getting this error Failed to report status for 606 seconds in Mapper phase.I don't have a reducer phase.I referred to [https://stackoverflow.com/questions/16056707/failed-to-report-status-for-600-seconds-killing-reporting-progress-in-hadoop?rq=1],[https://stackoverflow.com/questions/9109177/hadoop-job-task-fail-to-report-status-for-601-seconds?rq=1] and few others.After going thru the solutions provided in these questions,I have added the counter enum in my program and also reporting the progress.However still getting the error.I am new to hadoop and want to make sure wht I am doing is correct or not.
public class Map extends Mapper<LongWritable,Text,Text,Text> {
static enum Counter { SOME_COUNTER }
public void map(LongWritable key, Text value, Context context) throws
IOException, InterruptedException {
//increment counter and report progress
context.getCounter(ScanCounter.SCAN_COUNTER).increment(1);
context.progress();
//my map activity
//Read a file and do some operation on it.
String[] cmd = {
"/bin/sh",
"-c",
"hadoop dfs -cat " + path + "| someoperation"
};
try {
Process p = Runtime.getRuntime().exec(cmd);
BufferedReader reader =
new BufferedReader(new InputStreamReader(p.getInputStream()));
context.progress();
//read the output here as value
context.write(new Text(path), new Text(value));
}
}
}
Thanks!