/** * Returns the number of slow calls. * @return long */ public long getRpcSlowCalls() { return rpcSlowCalls.value(); }
public long getCacheCleared() { return cacheCleared.value(); }
public long getCacheHit() { return cacheHit.value(); }
public long getCacheUpdated() { return cacheUpdated.value(); }
@VisibleForTesting public long getCacheHitBytes() { return cacheHitBytes.value(); }
@VisibleForTesting public long getCacheRequestedBytes() { return cacheRequestedBytes.value(); }
private void getCacheStats(MetricsRecordBuilder rb) { float cacheHitRatio = cacheRequestedBytes.value() == 0 ? 0.0f : (float) cacheHitBytes.value() / (float) cacheRequestedBytes.value(); long cacheCapacityRemaining = cacheCapacityTotal.value() - cacheCapacityUsed.value(); float cacheRemainingPercent = cacheCapacityTotal.value() == 0 ? 0.0f : (float) cacheCapacityRemaining / (float) cacheCapacityTotal.value(); rb.addCounter(CacheCapacityRemaining, cacheCapacityRemaining) .addGauge(CacheCapacityRemainingPercentage, cacheRemainingPercent) .addCounter(CacheCapacityTotal, cacheCapacityTotal.value()) .addCounter(CacheCapacityUsed, cacheCapacityUsed.value()) .addCounter(CacheReadRequests, cacheReadRequests.value()) .addCounter(CacheRequestedBytes, cacheRequestedBytes.value()) .addCounter(CacheHitBytes, cacheHitBytes.value()) .addCounter(CacheAllocatedArena, cacheAllocatedArena.value()) .addCounter(CacheNumLockedBuffers, cacheNumLockedBuffers.value()) .addGauge(CacheHitRatio, cacheHitRatio); }
@Override public void snapshot(MetricsRecordBuilder builder, boolean all) { if (all || changed()) { builder.addCounter(info(), value()); clearChanged(); } }
(float) slotsAvailableTotal / (float) totalSlots; rb.addCounter(ExecutorTotalRequestsHandled, executorTotalRequestHandled.value()) .addCounter(ExecutorTotalSuccess, executorTotalSuccess.value()) .addCounter(ExecutorTotalFailed, executorTotalExecutionFailed.value()) .addCounter(ExecutorTotalKilled, executorTotalIKilled.value()) .addCounter(ExecutorTotalEvictedFromWaitQueue, totalEvictedFromWaitQueue.value()) .addCounter(ExecutorTotalRejectedRequests, totalRejectedRequests.value()) .addGauge(ExecutorNumQueuedRequests, executorNumQueuedRequests.value()) .addGauge(ExecutorNumPreemptableRequests, executorNumPreemptableRequests.value()) .addGauge(ExecutorAvailableFreeSlots, slotsAvailableTotal) .addGauge(ExecutorAvailableFreeSlotsPercent, slotsAvailablePercent) .addCounter(ExecutorTotalPreemptionTimeToKill, totalPreemptionTimeToKill.value()) .addCounter(ExecutorTotalPreemptionTimeLost, totalPreemptionTimeLost.value()) .addGauge(ExecutorMaxPreemptionTimeToKill, maxPreemptionTimeToKill.value()) .addGauge(ExecutorMaxPreemptionTimeLost, maxPreemptionTimeLost.value()) .addCounter(ExecutorFallOffSuccessTimeLost, fallOffSuccessTimeLost.value()) .addGauge(ExecutorFallOffSuccessMaxTimeLost, fallOffMaxSuccessTimeLost.value()) .addCounter(ExecutorFallOffFailedTimeLost, fallOffFailedTimeLost.value()) .addGauge(ExecutorFallOffFailedMaxTimeLost, fallOffMaxFailedTimeLost.value()) .addCounter(ExecutorFallOffKilledTimeLost, fallOffKilledTimeLost.value()) .addGauge(ExecutorFallOffKilledMaxTimeLost, fallOffMaxKilledTimeLost.value()) .addCounter(ExecutorFallOffNumCompletedFragments, fallOffNumCompletedFragments.value());
public long getTotalMetadataOperations() { return totalMetadataOperations.value(); }
public long getTotalDataFileIos() { return totalDataFileIos.value(); }
public long getTotalFileIoErrors() { return totalFileIoErrors.value(); }
@Metric("Number of file system operations") public long totalFileOps(){ return getBlockLocations.value() + createFileOps.value() + filesAppended.value() + addBlockOps.value() + getAdditionalDatanodeOps.value() + filesRenamed.value() + filesTruncated.value() + deleteFileOps.value() + getListingOps.value() + fileInfoOps.value() + getLinkTargetOps.value() + createSnapshotOps.value() + deleteSnapshotOps.value() + allowSnapshotOps.value() + disallowSnapshotOps.value() + renameSnapshotOps.value() + listSnapshottableDirOps.value() + createSymlinkOps.value() + snapshotDiffReportOps.value(); }
/** * Returns the number of slow calls. * @return long */ public long getRpcSlowCalls() { return rpcSlowCalls.value(); } }
/** * Returns the number of slow calls. * @return long */ public long getRpcSlowCalls() { return rpcSlowCalls.value(); } }
/** * Get the value of a counter. * If the counter is null, return 0. * @param name the name of the counter * @return its value. */ public long getCounterValue(String name) { MutableCounterLong counter = lookupCounter(name); return counter == null ? 0 : counter.value(); }
@Override public void snapshot(MetricsRecordBuilder builder, boolean all) { if (all || changed()) { builder.addCounter(info(), value()); clearChanged(); } }
@Override public void snapshot(MetricsRecordBuilder builder, boolean all) { if (all || changed()) { builder.addCounter(info(), value()); clearChanged(); } }