List of usage examples for org.apache.hadoop.mapreduce Counter setValue
void setValue(long value);
From source file:EggContext.java
License:Open Source License
/** Set the Hadoop metric counter of the passed group and name to * specified value./*from w w w .j av a 2 s .c o m*/ * @param group The counter group * @param name The counter name * @param value The value */ @JSFunction public void setCounter(String group, String name, Double value) { Counter counter = task.getCounter(group, name); if (!value.isNaN()) counter.setValue(value.longValue()); }
From source file:be.uantwerpen.adrem.bigfim.AprioriPhaseReducerTest.java
License:Apache License
private Counter createMockCounter(int value) { Counter counter = createMock(Counter.class); counter.setValue(value); return counter; }
From source file:org.apache.ignite.client.hadoop.counter.GridHadoopClientCounterGroup.java
License:Apache License
/** {@inheritDoc} */ @Override/* ww w. j a v a 2 s.co m*/ public Counter addCounter(String name, String displayName, long value) { final Counter counter = cntrs.findCounter(this.name, name); counter.setValue(value); return counter; }
From source file:org.apache.tez.mapreduce.hadoop.TezTypeConverters.java
License:Apache License
public static Counters fromTez(TezCounters tezCounters) { if (tezCounters == null) { return null; }/* w ww.j av a 2 s.c o m*/ Counters counters = new Counters(); for (CounterGroup xGrp : tezCounters) { counters.addGroup(xGrp.getName(), xGrp.getDisplayName()); for (TezCounter xCounter : xGrp) { Counter counter = counters.findCounter(xGrp.getName(), xCounter.getName()); counter.setValue(xCounter.getValue()); } } return counters; }