ramkrish86 commented on a change in pull request #1552: URL: https://github.com/apache/hbase/pull/1552#discussion_r439580608
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsTableWrapperAggregateImpl.java ########## @@ -41,39 +40,42 @@ private final HRegionServer regionServer; private ScheduledExecutorService executor; private Runnable runnable; - private long period; + private static final int PERIOD = 45; private ScheduledFuture<?> tableMetricsUpdateTask; private ConcurrentHashMap<TableName, MetricsTableValues> metricsTableMap = new ConcurrentHashMap<>(); public MetricsTableWrapperAggregateImpl(final HRegionServer regionServer) { this.regionServer = regionServer; - this.period = regionServer.getConfiguration().getLong(HConstants.REGIONSERVER_METRICS_PERIOD, - HConstants.DEFAULT_REGIONSERVER_METRICS_PERIOD) + 1000; this.executor = CompatibilitySingletonFactory.getInstance(MetricsExecutor.class).getExecutor(); this.runnable = new TableMetricsWrapperRunnable(); - this.tableMetricsUpdateTask = this.executor.scheduleWithFixedDelay(this.runnable, period, - this.period, TimeUnit.MILLISECONDS); + this.tableMetricsUpdateTask = this.executor.scheduleWithFixedDelay(this.runnable, PERIOD, Review comment: This is not a bug fix and also the config based update I believe it was just added because the MetricsREgionServer based aggregate therad was having that config. But if you see the MetricRegionSource it is same 45 sec. The period of updation was rather too frequent. I just changed it to be in sync with MetricREgionSource. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org