Пример #1
0
 @Override
 public boolean emitEvent(Event<KEYOUT, VALUEOUT> event, long timeout, TimeUnit unit)
     throws IOException, InterruptedException {
   emitter.emitEvent(event, timeout, unit);
   reporter.incrCounter(TaskCounter.REDUCE_OUTPUT_RECORDS, 1);
   return true;
 }
Пример #2
0
 @Override
 public Event<KEYIN, VALUEIN> pollEvent(long timeout, TimeUnit unit)
     throws IOException, InterruptedException {
   reporter.incrCounter(TaskCounter.REDUCE_INPUT_RECORDS, 1);
   return producer.pollEvent(timeout, unit);
 }