org.apache.hadoop.metrics2.lib.MutableCounterLong.value() - java examples

Here are the examples of the java api org.apache.hadoop.metrics2.lib.MutableCounterLong.value() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

131 Examples 7

19 View Complete Implementation : OpportunisticSchedulerMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getAggregatedAllocatedContainers() {
    return aggregateOContainersAllocated.value();
}

19 View Complete Implementation : XceiverClientMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getTotalOpCount() {
    return totalOps.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProxyOpFailureStandby() {
    return proxyOpFailureStandby.value();
}

19 View Complete Implementation : ITestS3AMetrics.java
Copyright Apache License 2.0
Author : apache
@Test
public void testStreamStatistics() throws IOException {
    S3AFileSystem fs = getFileSystem();
    Path file = path("testStreamStatistics");
    byte[] data = "abcdefghijklmnopqrstuvwxyz".getBytes();
    ContractTestUtils.createFile(fs, file, false, data);
    try (InputStream inputStream = fs.open(file)) {
        while (inputStream.read(data) != -1) {
            LOG.debug("Read batch of data from input stream...");
        }
    }
    MutableCounterLong read = (MutableCounterLong) fs.getInstrumentation().getRegistry().get(Statistic.STREAM_SEEK_BYTES_READ.getSymbol());
    replacedertEquals("Stream statistics were not merged", 26, read.value());
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getRouterFailureReadOnlyOps() {
    return routerFailureReadOnly.value();
}

19 View Complete Implementation : DataNodeVolumeMetrics.java
Copyright Apache License 2.0
Author : apache
public long getTotalMetadataOperations() {
    return totalMetadataOperations.value();
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getAggregateMemoryMBPreempted() {
    return aggregateMemoryMBPreempted.value();
}

19 View Complete Implementation : CleanerMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getTotalFileErrors() {
    return totalFileErrors.value();
}

19 View Complete Implementation : CSMMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getNumWriteStateMachineOps() {
    return numWriteStateMachineOps.value();
}

19 View Complete Implementation : ClientSCMMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getCacheMisses() {
    return cacheMisses.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getRouterFailureStateStoreOps() {
    return routerFailureStateStore.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getRouterFailureLockedOps() {
    return routerFailureLocked.value();
}

19 View Complete Implementation : SharedCacheUploaderMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getRejectUploads() {
    return rejectedUploads.value();
}

19 View Complete Implementation : OpportunisticSchedulerMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getAggregatedOffSwitchContainers() {
    return aggregateOffSwitchOContainersAllocated.value();
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getAggregateNodeLocalContainersAllocated() {
    return aggregateNodeLocalContainersAllocated.value();
}

19 View Complete Implementation : OpportunisticSchedulerMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getAggregatedNodeLocalContainers() {
    return aggregateNodeLocalOContainersAllocated.value();
}

19 View Complete Implementation : DataNodeMetrics.java
Copyright Apache License 2.0
Author : apache
public DataNodeUsageReport getDNUsageReport(long timeSinceLastReport) {
    return dnUsageReportUtil.getUsageReport(bytesWritten.value(), bytesRead.value(), totalWriteTime.value(), totalReadTime.value(), blocksWritten.value(), blocksRead.value(), timeSinceLastReport);
}

19 View Complete Implementation : TestEntityGroupFSTimelineStore.java
Copyright Apache License 2.0
Author : apache
@Test
public void testParseSummaryLogs() throws Exception {
    TimelineDataManager tdm = PluginStoreTestUtils.getTdmWithMemStore(config);
    MutableCounterLong scanned = store.metrics.getEnreplacediesReadToSummary();
    long beforeScan = scanned.value();
    EnreplacedyGroupFSTimelineStore.AppLogs appLogs = store.new AppLogs(mainTestAppId, mainTestAppDirPath, AppState.COMPLETED);
    appLogs.scanForLogs();
    appLogs.parseSummaryLogs(tdm);
    PluginStoreTestUtils.verifyTestEnreplacedies(tdm);
    replacedertEquals(beforeScan + 2L, scanned.value());
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getAggregateOffSwitchContainersAllocated() {
    return aggregateOffSwitchContainersAllocated.value();
}

19 View Complete Implementation : RDBMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getNumDBKeyMayExistMisses() {
    return numDBKeyMayExistMisses.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProxyOpNotImplemented() {
    return proxyOpNotImplemented.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProxyOps() {
    return proxyOp.value();
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getAggegatedReleasedContainers() {
    return aggregateContainersReleased.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProxyOpFailureCommunicate() {
    return proxyOpFailureCommunicate.value();
}

19 View Complete Implementation : ClientSCMMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getCacheHits() {
    return cacheHits.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProcessingOps() {
    return processingOp.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProxyOpNoNamenodes() {
    return proxyOpNoNamenodes.value();
}

19 View Complete Implementation : SharedCacheUploaderMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getAcceptedUploads() {
    return acceptedUploads.value();
}

19 View Complete Implementation : ITestS3AMetrics.java
Copyright Apache License 2.0
Author : apache
@Test
public void testMetricsRegister() throws IOException, InterruptedException {
    S3AFileSystem fs = getFileSystem();
    Path dest = path("testMetricsRegister");
    ContractTestUtils.touch(fs, dest);
    MutableCounterLong fileCreated = (MutableCounterLong) fs.getInstrumentation().getRegistry().get(Statistic.FILES_CREATED.getSymbol());
    replacedertEquals("Metrics system should report single file created event", 1, fileCreated.value());
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getAggregateRackLocalContainersAllocated() {
    return aggregateRackLocalContainersAllocated.value();
}

19 View Complete Implementation : FederationStateStoreClientMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
static long getNumFailedCalls() {
    return totalFailedCalls.value();
}

19 View Complete Implementation : DataNodeVolumeMetrics.java
Copyright Apache License 2.0
Author : apache
public long getTotalDataFileIos() {
    return totalDataFileIos.value();
}

19 View Complete Implementation : OpportunisticSchedulerMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getAggregatedReleasedContainers() {
    return aggregateOContainersReleased.value();
}

19 View Complete Implementation : RpcMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
/**
 * Returns the number of slow calls.
 * @return long
 */
public long getRpcSlowCalls() {
    return rpcSlowCalls.value();
}

19 View Complete Implementation : OpportunisticSchedulerMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getAggregatedRackLocalContainers() {
    return aggregateRackLocalOContainersAllocated.value();
}

19 View Complete Implementation : DataNodeVolumeMetrics.java
Copyright Apache License 2.0
Author : apache
public long getTotalFileIoErrors() {
    return totalFileIoErrors.value();
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getAggregateVcoresPreempted() {
    return aggregateVcoresPreempted.value();
}

19 View Complete Implementation : CleanerMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getTotalProcessedFiles() {
    return totalProcessedFiles.value();
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : apache
public long getAggregatePreemptedContainers() {
    return aggregateContainersPreempted.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProxyOpFailureClientOverloaded() {
    return proxyOpFailureClientOverloaded.value();
}

19 View Complete Implementation : TestEntityGroupFSTimelineStore.java
Copyright Apache License 2.0
Author : apache
@Test
public void testSummaryRead() throws Exception {
    // Load data
    EnreplacedyGroupFSTimelineStore.AppLogs appLogs = store.new AppLogs(mainTestAppId, mainTestAppDirPath, AppState.COMPLETED);
    MutableCounterLong summaryLogEnreplacedyRead = store.metrics.getGetEnreplacedyToSummaryOps();
    long numEnreplacedyReadBefore = summaryLogEnreplacedyRead.value();
    TimelineDataManager tdm = PluginStoreTestUtils.getTdmWithStore(config, store);
    appLogs.scanForLogs();
    appLogs.parseSummaryLogs(tdm);
    // Verify single enreplacedy read
    PluginStoreTestUtils.verifyTestEnreplacedies(tdm);
    // Verify multiple enreplacedies read
    TimelineEnreplacedies enreplacedies = tdm.getEnreplacedies("type_1", null, null, null, null, null, null, null, EnumSet.allOf(TimelineReader.Field.clreplaced), UserGroupInformation.getLoginUser());
    replacedertThat(enreplacedies.getEnreplacedies()).hreplacedize(1);
    for (TimelineEnreplacedy enreplacedy : enreplacedies.getEnreplacedies()) {
        replacedertEquals((Long) 123L, enreplacedy.getStartTime());
    }
    // Verify metrics
    replacedertEquals(numEnreplacedyReadBefore + 5L, summaryLogEnreplacedyRead.value());
}

19 View Complete Implementation : RetryCacheMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getCacheCleared() {
    return cacheCleared.value();
}

19 View Complete Implementation : RDBMetrics.java
Copyright Apache License 2.0
Author : apache
@VisibleForTesting
public long getNumDBKeyMayExistChecks() {
    return numDBKeyMayExistChecks.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getProxyOpRetries() {
    return proxyOpRetries.value();
}

19 View Complete Implementation : CleanerMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getTotalDeletedFiles() {
    return totalDeletedFiles.value();
}

19 View Complete Implementation : RetryCacheMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getCacheHit() {
    return cacheHit.value();
}

19 View Complete Implementation : RetryCacheMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getCacheUpdated() {
    return cacheUpdated.value();
}

19 View Complete Implementation : QueueMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getAggregateAllocatedContainers() {
    return aggregateContainersAllocated.value();
}

19 View Complete Implementation : ClientSCMMetrics.java
Copyright Apache License 2.0
Author : aliyun-beta
public long getCacheReleases() {
    return cacheReleases.value();
}

19 View Complete Implementation : FederationRPCMetrics.java
Copyright Apache License 2.0
Author : apache
@Override
public long getRouterFailureSafemodeOps() {
    return routerFailureSafemode.value();
}