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 @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())

View File

@ -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) {

View File

@ -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();

View File

@ -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) {