[ 
https://issues.apache.org/jira/browse/HBASE-5862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261177#comment-13261177
 ] 

Zhihong Yu commented on HBASE-5862:
-----------------------------------

{code}
  @SuppressWarnings("unused")
  private RegionServerDynamicMetrics dynamicMetrics;
{code}
I tried to find out how HRegionServer.dynamicMetrics is used but wasn't able to.
{code}
+    //Clear all of the dynamic metrics as they are now probably useless
+    this.dynamicMetrics.clear();
{code}
Only encodedName is removed. Why do we clear dynamicMetrics ?
{code}
+      } catch (SecurityException e) {
+        LOG.debug("Unable to clear metricsRecord");
{code}
We don't need to stumble over the same exception(s) again and again. Why not 
set a boolean to indicate that reflection shouldn't be used in the future ?
{code}
+    if (this.recordMetricMapField != null || this.registryMetricMapField != 
null) {
+      try {
{code}
Please separate the above two conditions into two if blocks.
{code}
+import com.google.common.collect.Multiset.Entry;
{code}
Is the above import used ?
It's nice to have a test.
                
> After Region Close remove the Operation Metrics.
> ------------------------------------------------
>
>                 Key: HBASE-5862
>                 URL: https://issues.apache.org/jira/browse/HBASE-5862
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>            Priority: Minor
>         Attachments: HBASE-5862-0.patch, HBASE-5862-1.patch
>
>
> If a region is closed then Hadoop metrics shouldn't still be reporting about 
> that region.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to