JobID jobId = taskId.getJobID();
return jobId.toString();
}
public static int getTaskId() {
MapredContext ctx = MapredContextAccessor.get();
if(ctx == null) {
throw new IllegalStateException("MapredContext is not set");
}
JobConf jobconf = ctx.getJobConf();
if(jobconf == null) {
throw new IllegalStateException("JobConf is not set");
}
int taskid = jobconf.getInt("mapred.task.partition", -1);
if(taskid == -1) {