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 6EBAB18BF4 for ; Fri, 27 Nov 2015 07:06:16 +0000 (UTC) Received: (qmail 61750 invoked by uid 500); 27 Nov 2015 07:06:11 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 61698 invoked by uid 500); 27 Nov 2015 07:06: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 61683 invoked by uid 99); 27 Nov 2015 07:06:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Nov 2015 07:06:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 14FE72C1F58 for ; Fri, 27 Nov 2015 07:06:11 +0000 (UTC) Date: Fri, 27 Nov 2015 07:06:11 +0000 (UTC) From: "Yu Li (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (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:all-tabpanel ] Yu Li updated HBASE-14891: -------------------------- Attachment: HBASE-14891.v2.patch v2 patch fixes indent and line wrapping following code format > 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, 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)