Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63E1510ACB for ; Wed, 10 Jul 2013 18:01:55 +0000 (UTC) Received: (qmail 47429 invoked by uid 500); 10 Jul 2013 18:01:54 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 47394 invoked by uid 500); 10 Jul 2013 18:01:54 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 47336 invoked by uid 99); 10 Jul 2013 18:01:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 18:01:54 +0000 Date: Wed, 10 Jul 2013 18:01:54 +0000 (UTC) From: "Colin Patrick McCabe (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-9703) org.apache.hadoop.ipc.Client leaks threads on stop. 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/HADOOP-9703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13704840#comment-13704840 ] Colin Patrick McCabe commented on HADOOP-9703: ---------------------------------------------- Thanks for tackling this JIRA. The logic looks OK. I think it would be better to create a static object which handles all of this for you. For example you could have {code} private static final ClientExecutorServiceFactory = new ClientExecutorServiceFactory(); private static class ClientExecutorServiceFactory { synchronized ExecutorService ref() { ... } synchronized ExecutorService unref() { ... } }; {code} ref manages incrementing the reference count and unref manages decrementing it. This avoids the findbugs warning, and avoids having to document what locks have to be taken where (because ClientExecutorServiceFactory handles that for you) > org.apache.hadoop.ipc.Client leaks threads on stop. > --------------------------------------------------- > > Key: HADOOP-9703 > URL: https://issues.apache.org/jira/browse/HADOOP-9703 > Project: Hadoop Common > Issue Type: Bug > Reporter: Mark Miller > Assignee: Tsuyoshi OZAWA > Priority: Minor > Attachments: HADOOP-9703.1.patch > > > org.apache.hadoop.ipc.Client#stop says "Stop all threads related to this client." but does not shutdown the static SEND_PARAMS_EXECUTOR, so usage of this class always leaks threads rather than cleanly closing or shutting down. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira