HBASE-12102 Duplicate keys in HBase.RegionServer metrics JSON (Ravi Kishore Valeti)

This commit is contained in:
Andrew Purtell 2015-02-18 08:08:46 -08:00
parent d64ce31063
commit cecc475d2f
4 changed files with 4 additions and 8 deletions

View File

@ -110,8 +110,7 @@ public class MetricsHBaseServerSourceImpl extends BaseSourceImpl
@Override
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName)
.setContext(metricsContext);
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName);
if (wrapper != null) {
mrb.addGauge(Interns.info(QUEUE_SIZE_NAME, QUEUE_SIZE_DESC), wrapper.getTotalQueueSize())

View File

@ -68,8 +68,7 @@ public class MetricsMasterSourceImpl
@Override
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
MetricsRecordBuilder metricsRecordBuilder = metricsCollector.addRecord(metricsName)
.setContext(metricsContext);
MetricsRecordBuilder metricsRecordBuilder = metricsCollector.addRecord(metricsName);
// masterWrapper can be null because this function is called inside of init.
if (masterWrapper != null) {

View File

@ -80,8 +80,7 @@ public class MetricsRegionAggregateSourceImpl extends BaseSourceImpl
public void getMetrics(MetricsCollector collector, boolean all) {
MetricsRecordBuilder mrb = collector.addRecord(metricsName)
.setContext(metricsContext);
MetricsRecordBuilder mrb = collector.addRecord(metricsName);
if (regionSources != null) {
lock.readLock().lock();

View File

@ -176,8 +176,7 @@ public class MetricsRegionServerSourceImpl
@Override
public void getMetrics(MetricsCollector metricsCollector, boolean all) {
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName)
.setContext(metricsContext);
MetricsRecordBuilder mrb = metricsCollector.addRecord(metricsName);
// rsWrap can be null because this function is called inside of init.
if (rsWrap != null) {