since only feasible ans to that question is found in This Question And the answer is in old API . So that force me to put a stupid question of translating these line to New API :
private long mapperCounter;
@Override
public void configure(JobConf conf) {
JobClient client = new JobClient(conf);
RunningJob parentJob =
client.getJob(JobID.forName( conf.get("mapred.job.id") ));
mapperCounter = parentJob.getCounters().getCounter(MAP_COUNTER_NAME);
}
Note : I want this code in reducer so inherited functions available are :
@Override
protected void setup(Context context) throws IOException,
InterruptedException {
}
@Override
protected void cleanup(Context context) throws IOException,
InterruptedException {
}
@Override
public void run(Context context) throws IOException,
InterruptedException {
Job job=new Job(context.getConfiguration());
}
@Override
public void reduce(ImmutableBytesWritable key,Iterable<ImmutableBytesWritable> result,Context context )
{
}
Thanks :) :)