private void report(Stats stats, FlowProcess<Properties> flowProcess) { // report current stats for (Counter count : Counter.ALL) { flowProcess.increment(count, count.get(stats)); } }
@Override public void notifyWriteSpillEnd( SpillableTupleList spillableTupleList, long duration ) { flowProcess.increment( Spill.Duration_Millis_Written, duration ); }
@Override public void evict( Map.Entry entry ) { flowProcess.increment( Cache.Num_Keys_Flushed, 1 ); } };
@Override public void notifyReadSpillBegin( Spillable spillable ) { flowProcess.increment( Spill.Num_Spills_Read, 1 ); } }
@Override public void notifyReadSpillBegin( Spillable spillable ) { flowProcess.increment( Spill.Num_Spills_Read, 1 ); } }
@Override public void notifyWriteSpillEnd( SpillableTupleList spillableTupleList, long duration ) { flowProcess.increment( Spill.Duration_Millis_Written, duration ); }
@Override public void notifyWriteSpillEnd( SpillableTupleList spillableTupleList, long duration ) { flowProcess.increment( Spill.Duration_Millis_Written, duration ); }
@Override public void notifyWriteSpillEnd( SpillableTupleList spillableTupleList, long duration ) { flowProcess.increment( Spill.Duration_Millis_Written, duration ); }
@Override public void notifyReadSpillBegin( Spillable spillable ) { flowProcess.increment( Spill.Num_Spills_Read, 1 ); } }
@Override public void increment( Enum counter, long amount ) { delegate.increment( counter, amount ); }
@Override public void increment( String group, String counter, long amount ) { delegate.increment( group, counter, amount ); }
private TupleEntry timedNext( StepCounters durationCounter, TupleEntryIterator iterator ) { long start = System.currentTimeMillis(); try { return iterator.next(); } finally { flowProcess.increment( durationCounter, System.currentTimeMillis() - start ); } }
protected void timedAdd( StepCounters durationCounter, TupleEntry tupleEntry ) { long start = System.currentTimeMillis(); try { collector.add( tupleEntry ); } finally { flowProcess.increment( durationCounter, System.currentTimeMillis() - start ); } }
@SuppressWarnings("unchecked") @Override public void aggregate(FlowProcess process, AggregatorCall call) { super.aggregate(process, wrapper); process.increment(counterGroup, inputRecordsCounterName, 1); }
@Override public Object createValue() { long start = System.currentTimeMillis(); try { return recordReader.createValue(); } finally { flowProcess.increment( counter, System.currentTimeMillis() - start ); } }
@Override public void close() throws IOException { long start = System.currentTimeMillis(); try { recordReader.close(); } finally { flowProcess.increment( counter, System.currentTimeMillis() - start ); } }
@SuppressWarnings("unchecked") @Override public void complete(FlowProcess process, AggregatorCall call) { wrapper.setDelegate(call); super.complete(process, wrapper); int output = wrapper.getOutputCollector().getCount(); process.increment(counterGroup, totalOutputRecordsCounterName, output); }