public void incrWallClockCounter(LlapIOCounters counter, long startTime) { if (!doUseTimeCounters) return; long delta = System.nanoTime() - startTime; fixedCounters.addAndGet(counter.ordinal(), delta); if (tezCounters != null) { tezCounters.findCounter(LlapIOCounters.values()[counter.ordinal()]).increment(delta); } }
public void incrCounter(LlapIOCounters counter, long delta) { fixedCounters.addAndGet(counter.ordinal(), delta); if (tezCounters != null) { tezCounters.findCounter(LlapIOCounters.values()[counter.ordinal()]).increment(delta); } }
public void setCounter(LlapIOCounters counter, long value) { fixedCounters.set(counter.ordinal(), value); if (tezCounters != null) { tezCounters.findCounter(LlapIOCounters.values()[counter.ordinal()]).setValue(value); } }
public void dumpToTezCounters(TezCounters tezCounters, boolean isLast) { if (isLast) { changeStateDone(); // Record the final counters. } for (int i = 0; i < fixedCounters.length(); ++i) { tezCounters.findCounter(LlapWmCounters.values()[i]).setValue(fixedCounters.get(i)); } }
tezCounters.findCounter(LlapExecutorCounters.EXECUTOR_CPU_NS).increment(cpuTime); tezCounters.findCounter(LlapExecutorCounters.EXECUTOR_USER_NS).increment(userTime); writeOpsDelta = threadFSStats.getWriteOps(); tezCounters.findCounter(scheme, FileSystemCounter.BYTES_READ) .increment(bytesReadDelta); tezCounters.findCounter(scheme, FileSystemCounter.BYTES_WRITTEN) .increment(bytesWrittenDelta); tezCounters.findCounter(scheme, FileSystemCounter.READ_OPS).increment(readOpsDelta); tezCounters.findCounter(scheme, FileSystemCounter.LARGE_READ_OPS) .increment(largeReadOpsDelta); tezCounters.findCounter(scheme, FileSystemCounter.WRITE_OPS) .increment(writeOpsDelta);
vertexName = jobConf.get(Operator.CONTEXT_NAME_KEY, ""); counterName = Utilities.getVertexCounterName(HiveInputCounters.RAW_INPUT_SPLITS.name(), vertexName); tezCounters.findCounter(groupName, counterName).increment(splits.length); final List<Path> paths = Utilities.getInputPathsTez(jobConf, work); counterName = Utilities.getVertexCounterName(HiveInputCounters.INPUT_DIRECTORIES.name(), vertexName); tezCounters.findCounter(groupName, counterName).increment(paths.size()); final Set<String> files = new HashSet<>(); for (InputSplit inputSplit : splits) { tezCounters.findCounter(groupName, counterName).increment(files.size()); if (inputInitializerContext != null) { counterName = Utilities.getVertexCounterName(HiveInputCounters.GROUPED_INPUT_SPLITS.name(), vertexName); tezCounters.findCounter(groupName, counterName).setValue(flatSplits.length);
@Override protected long getCounterValue( TezCounters counterGroups, Enum counter ) { TezCounter tezCounter = counterGroups.findCounter( counter ); if( tezCounter == null ) return 0; return tezCounter.getValue(); }
@Override public Counter getCounter(String group, String name) { return Utils.getMRCounter(tezCounters.findCounter(group, name)); }
/** * Updates the {@link TaskCounter#COMMITTED_HEAP_BYTES} counter to reflect the * current total committed heap space usage of this JVM. */ private void updateHeapUsageCounter() { long currentHeapUsage = Runtime.getRuntime().totalMemory(); tezCounters.findCounter(TaskCounter.COMMITTED_HEAP_BYTES) .setValue(currentHeapUsage); }
public Counters.Counter getCounter(Enum<?> name) { TezCounter counter = context.getCounters().findCounter(name); MRCounters.MRCounter mrCounter = null; if (counter != null) { mrCounter = new MRCounters.MRCounter(counter); } return mrCounter; }
@Override public void increment( Enum counter, long amount ) { if( context != null ) context.getCounters().findCounter( counter ).increment( amount ); }
@Override public void increment( String group, String counter, long amount ) { if( context != null ) context.getCounters().findCounter( group, counter ).increment( amount ); }
public Counters.Counter getCounter(String group, String name) { TezCounter counter = context.getCounters().findCounter(group, name); MRCounters.MRCounter mrCounter = null; if (counter != null) { mrCounter = new MRCounters.MRCounter(counter); } return mrCounter; }
/** * Increment the gc-elapsed-time counter. */ public void incrementGcCounter() { if (null == counters) { return; // nothing to do. } TezCounter gcCounter = counters.findCounter(TaskCounter.GC_TIME_MILLIS); if (null != gcCounter) { gcCounter.increment(getElapsedGc()); } } }
@Override public Counter getCounter(Enum<?> name) { if (context == null) { return null; } TezCounter tezCounter = context.getCounters().findCounter(name); return new MRCounter(tezCounter); }
@Override public void increment( String group, String counter, long amount ) { if( context != null ) context.getCounters().findCounter( group, counter ).increment( amount ); }
@Override public long getCounterValue( String group, String counter ) { if( context == null ) return 0; return context.getCounters().findCounter( group, counter ).getValue(); }
@Override public void transition(DAGImpl job, DAGEvent event) { DAGEventCounterUpdate jce = (DAGEventCounterUpdate) event; for (DAGEventCounterUpdate.CounterIncrementalUpdate ci : jce .getCounterUpdates()) { job.dagCounters.findCounter(ci.getCounterKey()).increment( ci.getIncrementValue()); } } }
public void dumpToTezCounters(TezCounters tezCounters, boolean isLast) { if (isLast) { changeStateDone(); // Record the final counters. } for (int i = 0; i < fixedCounters.length(); ++i) { tezCounters.findCounter(LlapWmCounters.values()[i]).setValue(fixedCounters.get(i)); } }
@Override public List<Event> close() throws IOException { mrReader.close(); long inputRecords = getContext().getCounters() .findCounter(TaskCounter.INPUT_RECORDS_PROCESSED).getValue(); getContext().getStatisticsReporter().reportItemsProcessed(inputRecords); return null; }