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 BFD68181EB for ; Thu, 21 May 2015 02:07:00 +0000 (UTC) Received: (qmail 24498 invoked by uid 500); 21 May 2015 02:07:00 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 24457 invoked by uid 500); 21 May 2015 02:07:00 -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 24443 invoked by uid 99); 21 May 2015 02:07:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2015 02:07:00 +0000 Date: Thu, 21 May 2015 02:07:00 +0000 (UTC) From: "Stephen Yuan Jiang (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-13733) failed MiniZooKeeperCluster startup not shut down ZK servers 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-13733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stephen Yuan Jiang updated HBASE-13733: --------------------------------------- Attachment: (was: HBASE-13733.patch) > failed MiniZooKeeperCluster startup not shut down ZK servers > ------------------------------------------------------------ > > Key: HBASE-13733 > URL: https://issues.apache.org/jira/browse/HBASE-13733 > Project: HBase > Issue Type: Bug > Components: Zookeeper > Affects Versions: 2.0.0, 1.1.0, 1.2.0 > Reporter: Stephen Yuan Jiang > Assignee: Stephen Yuan Jiang > Attachments: HBASE-13733.patch > > > MiniZooKeeperCluster#startup() starts servers one-by-one, if everything is good, it would declare success of start: > {code} > public int startup(File baseDir, int numZooKeeperServers) > ... > // running all the ZK servers > for (int i = 0; i < numZooKeeperServers; i++) { > ...===> could throw exception in the loop and end the startup > // Start up this ZK server > standaloneServerFactory.startup(server); > ... > standaloneServerFactoryList.add(standaloneServerFactory); > zooKeeperServers.add(server); > } > ... > started = true; > ... > } > {code} > However, if exception throws in the middle of start up (eg. some servers already started), the MiniZooKeeperCluster#shutdown() would not shut down them and clean up resources. > {code} > public void shutdown() throws IOException { > if (!started) { > return; > } > ... > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)