Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A35A6182F2 for ; Mon, 30 Nov 2015 19:32:11 +0000 (UTC) Received: (qmail 1171 invoked by uid 500); 30 Nov 2015 19:32:11 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 1117 invoked by uid 500); 30 Nov 2015 19:32:11 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 1088 invoked by uid 99); 30 Nov 2015 19:32:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Nov 2015 19:32:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 1B1F82C1F6E for ; Mon, 30 Nov 2015 19:32:11 +0000 (UTC) Date: Mon, 30 Nov 2015 19:32:11 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-14891) Add log for uncaught exception in RegionServerMetricsWrapperRunnable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-14891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15032307#comment-15032307 ] Hudson commented on HBASE-14891: -------------------------------- SUCCESS: Integrated in HBase-Trunk_matrix #515 (See [https://builds.apache.org/job/HBase-Trunk_matrix/515/]) HBASE-14891 Add log for uncaught exception in (chenheng: rev 999ae691559a49321138eb7718eb204435639db9) * hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java > 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 > Fix For: 2.0.0 > > Attachments: HBASE-14891.patch, HBASE-14891.v2.patch, HBASE-14891.v2.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)