You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Yu Li (JIRA)" <ji...@apache.org> on 2015/11/27 06:39:10 UTC

[jira] [Updated] (HBASE-14891) Add log for uncaught exception in RegionServerMetricsWrapperRunnable

     [ https://issues.apache.org/jira/browse/HBASE-14891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yu Li updated HBASE-14891:
--------------------------
    Attachment: HBASE-14891.patch

Attaching the straight forward patch. I believe this could also help us avoid ignoring potential issue when adding/modifying metrics in future.

> Add log for uncaught exception in RegionServerMetricsWrapperRunnable
> --------------------------------------------------------------------
>
>                 Key: HBASE-14891
>                 URL: https://issues.apache.org/jira/browse/HBASE-14891
>             Project: HBase
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Yu Li
>            Assignee: Yu Li
>            Priority: Minor
>         Attachments: HBASE-14891.patch
>
>
> We are using ScheduledExecutorService#scheduleWithFixedDelay to periodically reporting metrics. From javadoc of this method
> {quote}
> If any execution of the task encounters an exception, subsequent executions are suppressed.
> {quote}
> We could see if any uncaught exception like NPE thrown in the task thread, there won't be any error thrown but the task would be silently terminated.
> In our real case we were making some modification to the metrics and causing NPE carelessly, then we found metrics disappeared but cannot get a clue from RS log.
> Suggest to catch Throwable in MetricsRegionServerWrapperImpl$RegionServerMetricsWrapperRunnable, add some log there and suppress the exception to give it another try at next scheduled run.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)