HBASE-12102 Duplicate keys in HBase.RegionServer metrics JSON (Ravi Kishore Valeti)
This commit is contained in:
parent
d64ce31063
commit
cecc475d2f
|
@ -110,8 +110,7 @@ public class MetricsHBaseServerSourceImpl extends BaseSourceImpl
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
|
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
|
||||||
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName)
|
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName);
|
||||||
.setContext(metricsContext);
|
|
||||||
|
|
||||||
if (wrapper != null) {
|
if (wrapper != null) {
|
||||||
mrb.addGauge(Interns.info(QUEUE_SIZE_NAME, QUEUE_SIZE_DESC), wrapper.getTotalQueueSize())
|
mrb.addGauge(Interns.info(QUEUE_SIZE_NAME, QUEUE_SIZE_DESC), wrapper.getTotalQueueSize())
|
||||||
|
|
|
@ -68,8 +68,7 @@ public class MetricsMasterSourceImpl
|
||||||
@Override
|
@Override
|
||||||
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
|
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
|
||||||
|
|
||||||
MetricsRecordBuilder metricsRecordBuilder = metricsCollector.addRecord(metricsName)
|
MetricsRecordBuilder metricsRecordBuilder = metricsCollector.addRecord(metricsName);
|
||||||
.setContext(metricsContext);
|
|
||||||
|
|
||||||
// masterWrapper can be null because this function is called inside of init.
|
// masterWrapper can be null because this function is called inside of init.
|
||||||
if (masterWrapper != null) {
|
if (masterWrapper != null) {
|
||||||
|
|
|
@ -80,8 +80,7 @@ public class MetricsRegionAggregateSourceImpl extends BaseSourceImpl
|
||||||
public void getMetrics(MetricsCollector collector, boolean all) {
|
public void getMetrics(MetricsCollector collector, boolean all) {
|
||||||
|
|
||||||
|
|
||||||
MetricsRecordBuilder mrb = collector.addRecord(metricsName)
|
MetricsRecordBuilder mrb = collector.addRecord(metricsName);
|
||||||
.setContext(metricsContext);
|
|
||||||
|
|
||||||
if (regionSources != null) {
|
if (regionSources != null) {
|
||||||
lock.readLock().lock();
|
lock.readLock().lock();
|
||||||
|
|
|
@ -176,8 +176,7 @@ public class MetricsRegionServerSourceImpl
|
||||||
@Override
|
@Override
|
||||||
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
|
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
|
||||||
|
|
||||||
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName)
|
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName);
|
||||||
.setContext(metricsContext);
|
|
||||||
|
|
||||||
// rsWrap can be null because this function is called inside of init.
|
// rsWrap can be null because this function is called inside of init.
|
||||||
if (rsWrap != null) {
|
if (rsWrap != null) {
|
||||||
|
|
Loading…
Reference in New Issue