/** * Increment a named counter by some value. * * @param key the name of the counter * @param delta the ammount to increment */ public void incCounters(String key, long delta) { MutableFastCounter counter = metricsRegistry.getCounter(key, 0L); counter.incr(delta); }
@Override public void init() { super.init(); request = getMetricsRegistry().getCounter(REQUEST_KEY, 0L); sucGet = getMetricsRegistry().getCounter(SUCCESSFUL_GET_KEY, 0L); sucPut = getMetricsRegistry().getCounter(SUCCESSFUL_PUT_KEY, 0L); sucDel = getMetricsRegistry().getCounter(SUCCESSFUL_DELETE_KEY, 0L); sucScan = getMetricsRegistry().getCounter(SUCCESSFUL_SCAN_KEY, 0L); sucAppend = getMetricsRegistry().getCounter(SUCCESSFUL_APPEND_KEY, 0L); sucIncrement = getMetricsRegistry().getCounter(SUCCESSFUL_INCREMENT_KEY, 0L); fGet = getMetricsRegistry().getCounter(FAILED_GET_KEY, 0L); fPut = getMetricsRegistry().getCounter(FAILED_PUT_KEY, 0L); fDel = getMetricsRegistry().getCounter(FAILED_DELETE_KEY, 0L); fScan = getMetricsRegistry().getCounter(FAILED_SCAN_KEY, 0L); fAppend = getMetricsRegistry().getCounter(FAILED_APPEND_KEY, 0L); fIncrement = getMetricsRegistry().getCounter(FAILED_INCREMENT_KEY, 0L); }
public MetricsReplicationSinkSourceImpl(MetricsReplicationSourceImpl rms) { ageHist = rms.getMetricsRegistry().getHistogram(SINK_AGE_OF_LAST_APPLIED_OP); batchesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_BATCHES, 0L); opsCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_OPS, 0L); hfilesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_HFILES, 0L); }
public MetricsRegionSourceImpl(MetricsRegionWrapper regionWrapper, MetricsRegionAggregateSourceImpl aggregate) { this.regionWrapper = regionWrapper; agg = aggregate; hashCode = regionWrapper.getRegionHashCode(); agg.register(this); LOG.debug("Creating new MetricsRegionSourceImpl for table " + regionWrapper.getTableName() + " " + regionWrapper.getRegionName()); registry = agg.getMetricsRegistry(); regionNamePrefix = "Namespace_" + regionWrapper.getNamespace() + "_table_" + regionWrapper.getTableName() + "_region_" + regionWrapper.getRegionName() + "_metric_"; String suffix = "Count"; regionPutKey = regionNamePrefix + MetricsRegionServerSource.PUT_KEY + suffix; regionPut = registry.getCounter(regionPutKey, 0L); regionDeleteKey = regionNamePrefix + MetricsRegionServerSource.DELETE_KEY + suffix; regionDelete = registry.getCounter(regionDeleteKey, 0L); regionIncrementKey = regionNamePrefix + MetricsRegionServerSource.INCREMENT_KEY + suffix; regionIncrement = registry.getCounter(regionIncrementKey, 0L); regionAppendKey = regionNamePrefix + MetricsRegionServerSource.APPEND_KEY + suffix; regionAppend = registry.getCounter(regionAppendKey, 0L); regionGetKey = regionNamePrefix + MetricsRegionServerSource.GET_KEY + suffix; regionGet = registry.getCounter(regionGetKey, 0L); regionScanKey = regionNamePrefix + MetricsRegionServerSource.SCAN_KEY + suffix; regionScan = registry.getCounter(regionScanKey, 0L); }
public MetricsReplicationGlobalSourceSource(MetricsReplicationSourceImpl rms) { this.rms = rms; ageOfLastShippedOpHist = rms.getMetricsRegistry().getHistogram(SOURCE_AGE_OF_LAST_SHIPPED_OP); sizeOfLogQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_LOG_QUEUE, 0L); shippedBatchesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_BATCHES, 0L); shippedOpsCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_OPS, 0L); shippedKBsCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_KBS, 0L); shippedBytesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_BYTES, 0L); logReadInBytesCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_READ_IN_BYTES, 0L); logReadInEditsCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_READ_IN_EDITS, 0L); logEditsFilteredCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_EDITS_FILTERED, 0L); shippedHFilesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_HFILES, 0L); sizeOfHFileRefsQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_HFILE_REFS_QUEUE, 0L); unknownFileLengthForClosedWAL = rms.getMetricsRegistry() .getCounter(SOURCE_CLOSED_LOGS_WITH_UNKNOWN_LENGTH, 0L); uncleanlyClosedWAL = rms.getMetricsRegistry().getCounter(SOURCE_UNCLEANLY_CLOSED_LOGS, 0L); uncleanlyClosedSkippedBytes = rms.getMetricsRegistry() .getCounter(SOURCE_UNCLEANLY_CLOSED_IGNORED_IN_BYTES, 0L); restartWALReading = rms.getMetricsRegistry().getCounter(SOURCE_RESTARTED_LOG_READING, 0L); repeatedFileBytes = rms.getMetricsRegistry().getCounter(SOURCE_REPEATED_LOG_FILE_BYTES, 0L); completedWAL = rms.getMetricsRegistry().getCounter(SOURCE_COMPLETED_LOGS, 0L); completedRecoveryQueue = rms.getMetricsRegistry() .getCounter(SOURCE_COMPLETED_RECOVERY_QUEUES, 0L); failedRecoveryQueue = rms.getMetricsRegistry() .getCounter(SOURCE_FAILED_RECOVERY_QUEUES, 0L); }
shippedBatchesCounter = rms.getMetricsRegistry().getCounter(shippedBatchesKey, 0L); shippedOpsCounter = rms.getMetricsRegistry().getCounter(shippedOpsKey, 0L); shippedKBsCounter = rms.getMetricsRegistry().getCounter(shippedKBsKey, 0L); shippedBytesCounter = rms.getMetricsRegistry().getCounter(shippedBytesKey, 0L); logReadInBytesCounter = rms.getMetricsRegistry().getCounter(logReadInBytesKey, 0L); logReadInEditsCounter = rms.getMetricsRegistry().getCounter(logReadInEditsKey, 0L); logEditsFilteredCounter = rms.getMetricsRegistry().getCounter(logEditsFilteredKey, 0L); shippedHFilesCounter = rms.getMetricsRegistry().getCounter(shippedHFilesKey, 0L); unknownFileLengthForClosedWAL = rms.getMetricsRegistry().getCounter(unknownFileLengthKey, 0L); uncleanlyClosedWAL = rms.getMetricsRegistry().getCounter(uncleanlyClosedKey, 0L); uncleanlyClosedSkippedBytes = rms.getMetricsRegistry().getCounter(uncleanlySkippedBytesKey, 0L); restartWALReading = rms.getMetricsRegistry().getCounter(restartedKey, 0L); repeatedFileBytes = rms.getMetricsRegistry().getCounter(repeatedBytesKey, 0L); completedWAL = rms.getMetricsRegistry().getCounter(completedLogsKey, 0L); completedRecoveryQueue = rms.getMetricsRegistry().getCounter(completedRecoveryKey, 0L);
public void init() { ritGauge = metricsRegistry.newGauge(RIT_COUNT_NAME, RIT_COUNT_DESC, 0L); ritCountOverThresholdGauge = metricsRegistry.newGauge(RIT_COUNT_OVER_THRESHOLD_NAME, RIT_COUNT_OVER_THRESHOLD_DESC,0L); ritOldestAgeGauge = metricsRegistry.newGauge(RIT_OLDEST_AGE_NAME, RIT_OLDEST_AGE_DESC, 0L); ritDurationHisto = metricsRegistry.newTimeHistogram(RIT_DURATION_NAME, RIT_DURATION_DESC); operationCounter = metricsRegistry.getCounter(OPERATION_COUNT_NAME, 0L); /** * NOTE: Please refer to HBASE-9774 and HBASE-14282. Based on these two issues, HBase is * moving away from using Hadoop's metric2 to having independent HBase specific Metrics. Use * {@link BaseSourceImpl#registry} to register the new metrics. */ assignMetrics = new OperationMetrics(registry, ASSIGN_METRIC_PREFIX); unassignMetrics = new OperationMetrics(registry, UNASSIGN_METRIC_PREFIX); splitMetrics = new OperationMetrics(registry, SPLIT_METRIC_PREFIX); mergeMetrics = new OperationMetrics(registry, MERGE_METRIC_PREFIX); }
/** * Increment a named counter by some value. * * @param key the name of the counter * @param delta the ammount to increment */ public void incCounters(String key, long delta) { MutableFastCounter counter = metricsRegistry.getCounter(key, 0L); counter.incr(delta); }
/** * Increment a named counter by some value. * * @param key the name of the counter * @param delta the ammount to increment */ public void incCounters(String key, long delta) { MutableFastCounter counter = metricsRegistry.getCounter(key, 0l); counter.incr(delta); }
@Override public void init() { super.init(); request = getMetricsRegistry().getCounter(REQUEST_KEY, 0l); sucGet = getMetricsRegistry().getCounter(SUCCESSFUL_GET_KEY, 0l); sucPut = getMetricsRegistry().getCounter(SUCCESSFUL_PUT_KEY, 0l); sucDel = getMetricsRegistry().getCounter(SUCCESSFUL_DELETE_KEY, 0l); sucScan = getMetricsRegistry().getCounter(SUCCESSFUL_SCAN_KEY, 0L); sucAppend = getMetricsRegistry().getCounter(SUCCESSFUL_APPEND_KEY, 0l); sucIncrement = getMetricsRegistry().getCounter(SUCCESSFUL_INCREMENT_KEY, 0L); fGet = getMetricsRegistry().getCounter(FAILED_GET_KEY, 0l); fPut = getMetricsRegistry().getCounter(FAILED_PUT_KEY, 0l); fDel = getMetricsRegistry().getCounter(FAILED_DELETE_KEY, 0l); fScan = getMetricsRegistry().getCounter(FAILED_SCAN_KEY, 0l); fAppend = getMetricsRegistry().getCounter(FAILED_APPEND_KEY, 0l); fIncrement = getMetricsRegistry().getCounter(FAILED_INCREMENT_KEY, 0L); }
@Override public void init() { super.init(); request = getMetricsRegistry().getCounter(REQUEST_KEY, 0L); sucGet = getMetricsRegistry().getCounter(SUCCESSFUL_GET_KEY, 0L); sucPut = getMetricsRegistry().getCounter(SUCCESSFUL_PUT_KEY, 0L); sucDel = getMetricsRegistry().getCounter(SUCCESSFUL_DELETE_KEY, 0L); sucScan = getMetricsRegistry().getCounter(SUCCESSFUL_SCAN_KEY, 0L); sucAppend = getMetricsRegistry().getCounter(SUCCESSFUL_APPEND_KEY, 0L); sucIncrement = getMetricsRegistry().getCounter(SUCCESSFUL_INCREMENT_KEY, 0L); fGet = getMetricsRegistry().getCounter(FAILED_GET_KEY, 0L); fPut = getMetricsRegistry().getCounter(FAILED_PUT_KEY, 0L); fDel = getMetricsRegistry().getCounter(FAILED_DELETE_KEY, 0L); fScan = getMetricsRegistry().getCounter(FAILED_SCAN_KEY, 0L); fAppend = getMetricsRegistry().getCounter(FAILED_APPEND_KEY, 0L); fIncrement = getMetricsRegistry().getCounter(FAILED_INCREMENT_KEY, 0L); }
public MetricsReplicationSinkSourceImpl(MetricsReplicationSourceImpl rms) { ageHist = rms.getMetricsRegistry().getHistogram(SINK_AGE_OF_LAST_APPLIED_OP); batchesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_BATCHES, 0L); opsCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_OPS, 0L); hfilesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_HFILES, 0L); }
public MetricsReplicationSinkSourceImpl(MetricsReplicationSourceImpl rms) { ageHist = rms.getMetricsRegistry().getHistogram(SINK_AGE_OF_LAST_APPLIED_OP); batchesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_BATCHES, 0L); opsCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_OPS, 0L); hfilesCounter = rms.getMetricsRegistry().getCounter(SINK_APPLIED_HFILES, 0L); }
public MetricsReplicationGlobalSourceSource(MetricsReplicationSourceImpl rms) { this.rms = rms; ageOfLastShippedOpHist = rms.getMetricsRegistry().getHistogram(SOURCE_AGE_OF_LAST_SHIPPED_OP); sizeOfLogQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_LOG_QUEUE, 0L); shippedBatchesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_BATCHES, 0L); shippedOpsCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_OPS, 0L); shippedKBsCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_KBS, 0L); shippedBytesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_BYTES, 0L); logReadInBytesCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_READ_IN_BYTES, 0L); logReadInEditsCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_READ_IN_EDITS, 0L); logEditsFilteredCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_EDITS_FILTERED, 0L); shippedHFilesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_HFILES, 0L); sizeOfHFileRefsQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_HFILE_REFS_QUEUE, 0L); unknownFileLengthForClosedWAL = rms.getMetricsRegistry().getCounter(SOURCE_CLOSED_LOGS_WITH_UNKNOWN_LENGTH, 0L); uncleanlyClosedWAL = rms.getMetricsRegistry().getCounter(SOURCE_UNCLEANLY_CLOSED_LOGS, 0L); uncleanlyClosedSkippedBytes = rms.getMetricsRegistry().getCounter(SOURCE_UNCLEANLY_CLOSED_IGNORED_IN_BYTES, 0L); restartWALReading = rms.getMetricsRegistry().getCounter(SOURCE_RESTARTED_LOG_READING, 0L); repeatedFileBytes = rms.getMetricsRegistry().getCounter(SOURCE_REPEATED_LOG_FILE_BYTES, 0L); completedWAL = rms.getMetricsRegistry().getCounter(SOURCE_COMPLETED_LOGS, 0L); completedRecoveryQueue = rms.getMetricsRegistry().getCounter(SOURCE_COMPLETED_RECOVERY_QUEUES, 0L); }
public MetricsRegionSourceImpl(MetricsRegionWrapper regionWrapper, MetricsRegionAggregateSourceImpl aggregate) { this.regionWrapper = regionWrapper; agg = aggregate; hashCode = regionWrapper.getRegionHashCode(); agg.register(this); LOG.debug("Creating new MetricsRegionSourceImpl for table " + regionWrapper.getTableName() + " " + regionWrapper.getRegionName()); registry = agg.getMetricsRegistry(); regionNamePrefix = "Namespace_" + regionWrapper.getNamespace() + "_table_" + regionWrapper.getTableName() + "_region_" + regionWrapper.getRegionName() + "_metric_"; String suffix = "Count"; regionPutKey = regionNamePrefix + MetricsRegionServerSource.PUT_KEY + suffix; regionPut = registry.getCounter(regionPutKey, 0L); regionDeleteKey = regionNamePrefix + MetricsRegionServerSource.DELETE_KEY + suffix; regionDelete = registry.getCounter(regionDeleteKey, 0L); regionIncrementKey = regionNamePrefix + MetricsRegionServerSource.INCREMENT_KEY + suffix; regionIncrement = registry.getCounter(regionIncrementKey, 0L); regionAppendKey = regionNamePrefix + MetricsRegionServerSource.APPEND_KEY + suffix; regionAppend = registry.getCounter(regionAppendKey, 0L); regionGetKey = regionNamePrefix + MetricsRegionServerSource.GET_KEY + suffix; regionGet = registry.getCounter(regionGetKey, 0L); regionScanKey = regionNamePrefix + MetricsRegionServerSource.SCAN_KEY + suffix; regionScan = registry.getCounter(regionScanKey, 0L); }
public MetricsReplicationGlobalSourceSource(MetricsReplicationSourceImpl rms) { this.rms = rms; ageOfLastShippedOpHist = rms.getMetricsRegistry().getHistogram(SOURCE_AGE_OF_LAST_SHIPPED_OP); sizeOfLogQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_LOG_QUEUE, 0L); shippedBatchesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_BATCHES, 0L); shippedOpsCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_OPS, 0L); shippedKBsCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_KBS, 0L); shippedBytesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_BYTES, 0L); logReadInBytesCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_READ_IN_BYTES, 0L); logReadInEditsCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_READ_IN_EDITS, 0L); logEditsFilteredCounter = rms.getMetricsRegistry().getCounter(SOURCE_LOG_EDITS_FILTERED, 0L); shippedHFilesCounter = rms.getMetricsRegistry().getCounter(SOURCE_SHIPPED_HFILES, 0L); sizeOfHFileRefsQueueGauge = rms.getMetricsRegistry().getGauge(SOURCE_SIZE_OF_HFILE_REFS_QUEUE, 0L); unknownFileLengthForClosedWAL = rms.getMetricsRegistry() .getCounter(SOURCE_CLOSED_LOGS_WITH_UNKNOWN_LENGTH, 0L); uncleanlyClosedWAL = rms.getMetricsRegistry().getCounter(SOURCE_UNCLEANLY_CLOSED_LOGS, 0L); uncleanlyClosedSkippedBytes = rms.getMetricsRegistry() .getCounter(SOURCE_UNCLEANLY_CLOSED_IGNORED_IN_BYTES, 0L); restartWALReading = rms.getMetricsRegistry().getCounter(SOURCE_RESTARTED_LOG_READING, 0L); repeatedFileBytes = rms.getMetricsRegistry().getCounter(SOURCE_REPEATED_LOG_FILE_BYTES, 0L); completedWAL = rms.getMetricsRegistry().getCounter(SOURCE_COMPLETED_LOGS, 0L); completedRecoveryQueue = rms.getMetricsRegistry() .getCounter(SOURCE_COMPLETED_RECOVERY_QUEUES, 0L); failedRecoveryQueue = rms.getMetricsRegistry() .getCounter(SOURCE_FAILED_RECOVERY_QUEUES, 0L); }
public MetricsRegionSourceImpl(MetricsRegionWrapper regionWrapper, MetricsRegionAggregateSourceImpl aggregate) { this.regionWrapper = regionWrapper; agg = aggregate; hashCode = regionWrapper.getRegionHashCode(); agg.register(this); LOG.debug("Creating new MetricsRegionSourceImpl for table " + regionWrapper.getTableName() + " " + regionWrapper.getRegionName()); registry = agg.getMetricsRegistry(); regionNamePrefix = "Namespace_" + regionWrapper.getNamespace() + "_table_" + regionWrapper.getTableName() + "_region_" + regionWrapper.getRegionName() + "_metric_"; String suffix = "Count"; regionPutKey = regionNamePrefix + MetricsRegionServerSource.PUT_KEY + suffix; regionPut = registry.getCounter(regionPutKey, 0L); regionDeleteKey = regionNamePrefix + MetricsRegionServerSource.DELETE_KEY + suffix; regionDelete = registry.getCounter(regionDeleteKey, 0L); regionIncrementKey = regionNamePrefix + MetricsRegionServerSource.INCREMENT_KEY + suffix; regionIncrement = registry.getCounter(regionIncrementKey, 0L); regionAppendKey = regionNamePrefix + MetricsRegionServerSource.APPEND_KEY + suffix; regionAppend = registry.getCounter(regionAppendKey, 0L); regionGetKey = regionNamePrefix + MetricsRegionServerSource.GET_KEY + suffix; regionGet = registry.getCounter(regionGetKey, 0L); regionScanKey = regionNamePrefix + MetricsRegionServerSource.SCAN_KEY + suffix; regionScan = registry.getCounter(regionScanKey, 0L); }
shippedBatchesCounter = rms.getMetricsRegistry().getCounter(shippedBatchesKey, 0L); shippedOpsCounter = rms.getMetricsRegistry().getCounter(shippedOpsKey, 0L); shippedKBsCounter = rms.getMetricsRegistry().getCounter(shippedKBsKey, 0L); shippedBytesCounter = rms.getMetricsRegistry().getCounter(shippedBytesKey, 0L); logReadInBytesCounter = rms.getMetricsRegistry().getCounter(logReadInBytesKey, 0L); logReadInEditsCounter = rms.getMetricsRegistry().getCounter(logReadInEditsKey, 0L); logEditsFilteredCounter = rms.getMetricsRegistry().getCounter(logEditsFilteredKey, 0L); shippedHFilesCounter = rms.getMetricsRegistry().getCounter(shippedHFilesKey, 0L); unknownFileLengthForClosedWAL = rms.getMetricsRegistry().getCounter(unknownFileLengthKey, 0L); uncleanlyClosedWAL = rms.getMetricsRegistry().getCounter(uncleanlyClosedKey, 0L); uncleanlyClosedSkippedBytes = rms.getMetricsRegistry().getCounter(uncleanlySkippedBytesKey, 0L); restartWALReading = rms.getMetricsRegistry().getCounter(restartedKey, 0L); repeatedFileBytes = rms.getMetricsRegistry().getCounter(repeatedBytesKey, 0L); completedWAL = rms.getMetricsRegistry().getCounter(completedLogsKey, 0L); completedRecoveryQueue = rms.getMetricsRegistry().getCounter(completedRecoveryKey, 0L);
public void init() { ritGauge = metricsRegistry.newGauge(RIT_COUNT_NAME, RIT_COUNT_DESC, 0l); ritCountOverThresholdGauge = metricsRegistry.newGauge(RIT_COUNT_OVER_THRESHOLD_NAME, RIT_COUNT_OVER_THRESHOLD_DESC,0l); ritOldestAgeGauge = metricsRegistry.newGauge(RIT_OLDEST_AGE_NAME, RIT_OLDEST_AGE_DESC, 0l); ritDurationHisto = metricsRegistry.newTimeHistogram(RIT_DURATION_NAME, RIT_DURATION_DESC); operationCounter = metricsRegistry.getCounter(OPERATION_COUNT_NAME, 0l); /** * NOTE: Please refer to HBASE-9774 and HBASE-14282. Based on these two issues, HBase is * moving away from using Hadoop's metric2 to having independent HBase specific Metrics. Use * {@link BaseSourceImpl#registry} to register the new metrics. */ assignMetrics = new OperationMetrics(registry, ASSIGN_METRIC_PREFIX); unassignMetrics = new OperationMetrics(registry, UNASSIGN_METRIC_PREFIX); splitMetrics = new OperationMetrics(registry, SPLIT_METRIC_PREFIX); mergeMetrics = new OperationMetrics(registry, MERGE_METRIC_PREFIX); }
public void init() { ritGauge = metricsRegistry.newGauge(RIT_COUNT_NAME, RIT_COUNT_DESC, 0L); ritCountOverThresholdGauge = metricsRegistry.newGauge(RIT_COUNT_OVER_THRESHOLD_NAME, RIT_COUNT_OVER_THRESHOLD_DESC,0L); ritOldestAgeGauge = metricsRegistry.newGauge(RIT_OLDEST_AGE_NAME, RIT_OLDEST_AGE_DESC, 0L); ritDurationHisto = metricsRegistry.newTimeHistogram(RIT_DURATION_NAME, RIT_DURATION_DESC); operationCounter = metricsRegistry.getCounter(OPERATION_COUNT_NAME, 0L); /** * NOTE: Please refer to HBASE-9774 and HBASE-14282. Based on these two issues, HBase is * moving away from using Hadoop's metric2 to having independent HBase specific Metrics. Use * {@link BaseSourceImpl#registry} to register the new metrics. */ assignMetrics = new OperationMetrics(registry, ASSIGN_METRIC_PREFIX); unassignMetrics = new OperationMetrics(registry, UNASSIGN_METRIC_PREFIX); splitMetrics = new OperationMetrics(registry, SPLIT_METRIC_PREFIX); mergeMetrics = new OperationMetrics(registry, MERGE_METRIC_PREFIX); }