/** * Create a mutable long integer gauge * @param name of the metric * @param desc metric description * @param iVal initial value * @return a new gauge object */ public MutableGaugeLong newGauge(String name, String desc, long iVal) { return newGauge(new MetricsInfoImpl(name, desc), iVal); }
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); }
authFailedFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_AUTHFAILED, EXCEPTION_AUTHFAILED_DESC, 0L); connectionLossFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_CONNECTIONLOSS, EXCEPTION_CONNECTIONLOSS_DESC, 0L); dataInconsistencyFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_DATAINCONSISTENCY, EXCEPTION_DATAINCONSISTENCY_DESC, 0L); invalidACLFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_INVALIDACL, EXCEPTION_INVALIDACL_DESC, 0L); noAuthFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_NOAUTH, EXCEPTION_NOAUTH_DESC, 0L); operationTimeOutFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_OPERATIONTIMEOUT, EXCEPTION_OPERATIONTIMEOUT_DESC, 0L); runtimeInconsistencyFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_RUNTIMEINCONSISTENCY, EXCEPTION_RUNTIMEINCONSISTENCY_DESC, 0L); sessionExpiredFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_SESSIONEXPIRED, EXCEPTION_SESSIONEXPIRED_DESC, 0L); systemErrorFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_SYSTEMERROR, EXCEPTION_SYSTEMERROR_DESC, 0L); totalFailedZKCalls = this.getMetricsRegistry().newGauge( TOTAL_FAILED_ZK_CALLS, TOTAL_FAILED_ZK_CALLS_DESC, 0L);
public MetricsMasterQuotaSourceImpl( String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsMasterWrapper wrapper) { super(metricsName, metricsDescription, metricsContext, metricsJmxContext); this.wrapper = wrapper; spaceQuotasGauge = getMetricsRegistry().newGauge( NUM_SPACE_QUOTAS_NAME, NUM_SPACE_QUOTAS_DESC, 0L); tablesViolatingQuotasGauge = getMetricsRegistry().newGauge( NUM_TABLES_QUOTA_VIOLATIONS_NAME, NUM_TABLES_QUOTA_VIOLATIONS_DESC, 0L); namespacesViolatingQuotasGauge = getMetricsRegistry().newGauge( NUM_NS_QUOTA_VIOLATIONS_NAME, NUM_NS_QUOTA_VIOLATIONS_DESC, 0L); regionSpaceReportsGauge = getMetricsRegistry().newGauge( NUM_REGION_SIZE_REPORTS_NAME, NUM_REGION_SIZE_REPORTS_DESC, 0L); quotaObserverTimeHisto = getMetricsRegistry().newTimeHistogram( QUOTA_OBSERVER_CHORE_TIME_NAME, QUOTA_OBSERVER_CHORE_TIME_DESC); snapshotObserverTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_CHORE_TIME_NAME, SNAPSHOT_OBSERVER_CHORE_TIME_DESC); snapshotObserverSizeComputationTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_NAME, SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_DESC); snapshotObserverSnapshotFetchTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_FETCH_TIME_NAME, SNAPSHOT_OBSERVER_FETCH_TIME_DESC); }
.newGauge(BLOCKED_FLUSH_GAUGE_NAME, BLOCKED_FLUSH_GAUGE_DESC, 0L); unblockedFlushGauge = getMetricsRegistry() .newGauge(UNBLOCKED_FLUSH_GAUGE_NAME, UNBLOCKED_FLUSH_GAUGE_DESC, 0L); memStoreSizeGauge = getMetricsRegistry() .newGauge(MEMSTORE_SIZE_GAUGE_NAME, MEMSTORE_SIZE_GAUGE_DESC, 0L); blockCacheSizeGauge = getMetricsRegistry() .newGauge(BLOCKCACHE_SIZE_GAUGE_NAME, BLOCKCACHE_SIZE_GAUGE_DESC, 0L);
public void init() { ritGauge = metricsRegistry.newGauge(RIT_COUNT_NAME, "", 0l); ritCountOverThresholdGauge = metricsRegistry.newGauge(RIT_COUNT_OVER_THRESHOLD_NAME, "", 0l); ritOldestAgeGauge = metricsRegistry.newGauge(RIT_OLDEST_AGE_NAME, "", 0l); assignTimeHisto = metricsRegistry.newTimeHistogram(ASSIGN_TIME_NAME); bulkAssignTimeHisto = metricsRegistry.newTimeHistogram(BULK_ASSIGN_TIME_NAME); }
/** * Create a mutable long integer gauge * @param name of the metric * @param desc metric description * @param iVal initial value * @return a new gauge object */ public MutableGaugeLong newGauge(String name, String desc, long iVal) { return newGauge(new MetricsInfoImpl(name, desc), iVal); }
/** * Create a mutable long integer gauge * @param name of the metric * @param desc metric description * @param iVal initial value * @return a new gauge object */ public MutableGaugeLong newGauge(String name, String desc, long iVal) { return newGauge(new MetricsInfoImpl(name, desc), iVal); }
/** * Create a mutable long integer gauge * @param name of the metric * @param desc metric description * @param iVal initial value * @return a new gauge object */ public MutableGaugeLong newGauge(String name, String desc, long iVal) { return newGauge(new MetricsInfoImpl(name, desc), iVal); }
/** * Create a mutable integer gauge * @param name of the metric * @param desc metric description * @param iVal initial value * @return a new gauge object */ public MutableGaugeInt newGauge(String name, String desc, int iVal) { return newGauge(new MetricsInfoImpl(name, desc), iVal); } /**
public MetricsZooKeeperSourceImpl(String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext) { super(metricsName, metricsDescription, metricsContext, metricsJmxContext); //Create and store the metrics that will be used. authFailedFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_AUTHFAILED, EXCEPTION_AUTHFAILED_DESC, 0L); connectionLossFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_CONNECTIONLOSS, EXCEPTION_CONNECTIONLOSS_DESC, 0L); dataInconsistencyFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_DATAINCONSISTENCY, EXCEPTION_DATAINCONSISTENCY_DESC, 0L); invalidACLFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_INVALIDACL, EXCEPTION_INVALIDACL_DESC, 0L); noAuthFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_NOAUTH, EXCEPTION_NOAUTH_DESC, 0L); operationTimeOutFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_OPERATIONTIMEOUT, EXCEPTION_OPERATIONTIMEOUT_DESC, 0L); runtimeInconsistencyFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_RUNTIMEINCONSISTENCY, EXCEPTION_RUNTIMEINCONSISTENCY_DESC, 0L); sessionExpiredFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_SESSIONEXPIRED, EXCEPTION_SESSIONEXPIRED_DESC, 0L); systemErrorFailedOpCount = this.getMetricsRegistry().newGauge(EXCEPTION_SYSTEMERROR, EXCEPTION_SYSTEMERROR_DESC, 0L); totalFailedZKCalls = this.getMetricsRegistry().newGauge(TOTAL_FAILED_ZK_CALLS, TOTAL_FAILED_ZK_CALLS_DESC, 0L); readOpLatency = this.getMetricsRegistry().newHistogram(READ_OPERATION_LATENCY_NAME, READ_OPERATION_LATENCY_DESC); writeOpLatency = this.getMetricsRegistry().newHistogram(WRITE_OPERATION_LATENCY_NAME, WRITE_OPERATION_LATENCY_DESC); syncOpLatency = this.getMetricsRegistry().newHistogram(SYNC_OPERATION_LATENCY_NAME, SYNC_OPERATION_LATENCY_DESC); }
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); }
authFailedFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_AUTHFAILED, EXCEPTION_AUTHFAILED_DESC, 0L); connectionLossFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_CONNECTIONLOSS, EXCEPTION_CONNECTIONLOSS_DESC, 0L); dataInconsistencyFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_DATAINCONSISTENCY, EXCEPTION_DATAINCONSISTENCY_DESC, 0L); invalidACLFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_INVALIDACL, EXCEPTION_INVALIDACL_DESC, 0L); noAuthFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_NOAUTH, EXCEPTION_NOAUTH_DESC, 0L); operationTimeOutFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_OPERATIONTIMEOUT, EXCEPTION_OPERATIONTIMEOUT_DESC, 0L); runtimeInconsistencyFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_RUNTIMEINCONSISTENCY, EXCEPTION_RUNTIMEINCONSISTENCY_DESC, 0L); sessionExpiredFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_SESSIONEXPIRED, EXCEPTION_SESSIONEXPIRED_DESC, 0L); systemErrorFailedOpCount = this.getMetricsRegistry().newGauge( EXCEPTION_SYSTEMERROR, EXCEPTION_SYSTEMERROR_DESC, 0L); totalFailedZKCalls = this.getMetricsRegistry().newGauge( TOTAL_FAILED_ZK_CALLS, TOTAL_FAILED_ZK_CALLS_DESC, 0L);
public MetricsMasterQuotaSourceImpl( String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsMasterWrapper wrapper) { super(metricsName, metricsDescription, metricsContext, metricsJmxContext); this.wrapper = wrapper; spaceQuotasGauge = getMetricsRegistry().newGauge( NUM_SPACE_QUOTAS_NAME, NUM_SPACE_QUOTAS_DESC, 0L); tablesViolatingQuotasGauge = getMetricsRegistry().newGauge( NUM_TABLES_QUOTA_VIOLATIONS_NAME, NUM_TABLES_QUOTA_VIOLATIONS_DESC, 0L); namespacesViolatingQuotasGauge = getMetricsRegistry().newGauge( NUM_NS_QUOTA_VIOLATIONS_NAME, NUM_NS_QUOTA_VIOLATIONS_DESC, 0L); regionSpaceReportsGauge = getMetricsRegistry().newGauge( NUM_REGION_SIZE_REPORTS_NAME, NUM_REGION_SIZE_REPORTS_DESC, 0L); quotaObserverTimeHisto = getMetricsRegistry().newTimeHistogram( QUOTA_OBSERVER_CHORE_TIME_NAME, QUOTA_OBSERVER_CHORE_TIME_DESC); snapshotObserverTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_CHORE_TIME_NAME, SNAPSHOT_OBSERVER_CHORE_TIME_DESC); snapshotObserverSizeComputationTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_NAME, SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_DESC); snapshotObserverSnapshotFetchTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_FETCH_TIME_NAME, SNAPSHOT_OBSERVER_FETCH_TIME_DESC); }
public MetricsMasterQuotaSourceImpl( String metricsName, String metricsDescription, String metricsContext, String metricsJmxContext, MetricsMasterWrapper wrapper) { super(metricsName, metricsDescription, metricsContext, metricsJmxContext); this.wrapper = wrapper; spaceQuotasGauge = getMetricsRegistry().newGauge( NUM_SPACE_QUOTAS_NAME, NUM_SPACE_QUOTAS_DESC, 0L); tablesViolatingQuotasGauge = getMetricsRegistry().newGauge( NUM_TABLES_QUOTA_VIOLATIONS_NAME, NUM_TABLES_QUOTA_VIOLATIONS_DESC, 0L); namespacesViolatingQuotasGauge = getMetricsRegistry().newGauge( NUM_NS_QUOTA_VIOLATIONS_NAME, NUM_NS_QUOTA_VIOLATIONS_DESC, 0L); regionSpaceReportsGauge = getMetricsRegistry().newGauge( NUM_REGION_SIZE_REPORTS_NAME, NUM_REGION_SIZE_REPORTS_DESC, 0L); quotaObserverTimeHisto = getMetricsRegistry().newTimeHistogram( QUOTA_OBSERVER_CHORE_TIME_NAME, QUOTA_OBSERVER_CHORE_TIME_DESC); snapshotObserverTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_CHORE_TIME_NAME, SNAPSHOT_OBSERVER_CHORE_TIME_DESC); snapshotObserverSizeComputationTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_NAME, SNAPSHOT_OBSERVER_SIZE_COMPUTATION_TIME_DESC); snapshotObserverSnapshotFetchTimeHisto = getMetricsRegistry().newTimeHistogram( SNAPSHOT_OBSERVER_FETCH_TIME_NAME, SNAPSHOT_OBSERVER_FETCH_TIME_DESC); }
.newGauge(BLOCKED_FLUSH_GAUGE_NAME, BLOCKED_FLUSH_GAUGE_DESC, 0L); unblockedFlushGauge = getMetricsRegistry() .newGauge(UNBLOCKED_FLUSH_GAUGE_NAME, UNBLOCKED_FLUSH_GAUGE_DESC, 0L); memStoreSizeGauge = getMetricsRegistry() .newGauge(MEMSTORE_SIZE_GAUGE_NAME, MEMSTORE_SIZE_GAUGE_DESC, 0L); blockCacheSizeGauge = getMetricsRegistry() .newGauge(BLOCKCACHE_SIZE_GAUGE_NAME, BLOCKCACHE_SIZE_GAUGE_DESC, 0L);
.newGauge(BLOCKED_FLUSH_GAUGE_NAME, BLOCKED_FLUSH_GAUGE_DESC, 0L); unblockedFlushGauge = getMetricsRegistry() .newGauge(UNBLOCKED_FLUSH_GAUGE_NAME, UNBLOCKED_FLUSH_GAUGE_DESC, 0L); memStoreSizeGauge = getMetricsRegistry() .newGauge(MEMSTORE_SIZE_GAUGE_NAME, MEMSTORE_SIZE_GAUGE_DESC, 0L); blockCacheSizeGauge = getMetricsRegistry() .newGauge(BLOCKCACHE_SIZE_GAUGE_NAME, BLOCKCACHE_SIZE_GAUGE_DESC, 0L);