Old API for the new API

My original question

since only possible ans to this question is in This question AND answer in the old API. To make me pose a stupid question translating this line into the 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 the reducer to have access to the following functions:

  @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:):)

+4
source share
1 answer

This presentation introduces the changes between the old and the new API.

+3
source

Source: https://habr.com/ru/post/1436142/


All Articles