List of usage examples for org.apache.hadoop.mapreduce Counters Counters
public Counters()
From source file:org.apache.crunch.test.TestCounters.java
License:Apache License
public static void clearCounters() { COUNTERS = new Counters(); }
From source file:org.apache.tez.mapreduce.client.ClientServiceDelegate.java
License:Apache License
public Counters getJobCounters(JobID jobId) throws IOException, InterruptedException { // FIXME needs counters support from DAG // with a translation layer on client side Counters empty = new Counters(); return empty; }
From source file:org.apache.tez.mapreduce.hadoop.TezTypeConverters.java
License:Apache License
public static Counters fromTez(TezCounters tezCounters) { if (tezCounters == null) { return null; }/*from w w w . jav a2 s. com*/ 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; }
From source file:org.kiji.mapreduce.tools.KijiJobHistory.java
License:Apache License
/** * Prints a representation of the Counters for a Job. * @param data A row data containing a serialization of the counters. * @throws IOException If there is an error retrieving the counters. *//* w w w .j a va 2s . c om*/ private void printCounters(KijiRowData data) throws IOException { PrintStream ps = getPrintStream(); Counters counters = new Counters(); ByteBuffer countersByteBuffer = data.getMostRecentValue("info", "counters"); counters.readFields(new DataInputStream(new ByteArrayInputStream(countersByteBuffer.array()))); ps.println("Counters:"); ps.println(counters.toString()); }