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 57C4F1029A for ; Thu, 7 Nov 2013 19:11:18 +0000 (UTC) Received: (qmail 50270 invoked by uid 500); 7 Nov 2013 19:11:18 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 50237 invoked by uid 500); 7 Nov 2013 19:11:18 -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 50228 invoked by uid 99); 7 Nov 2013 19:11:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Nov 2013 19:11:18 +0000 Date: Thu, 7 Nov 2013 19:11:17 +0000 (UTC) From: "Steve Loughran (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-10085) CompositeService should allow adding services while being inited 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-10085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Steve Loughran updated HADOOP-10085: ------------------------------------ Attachment: HADOOP-10085-002.patch This patch adds more tests and fixes the concurrency modification exception that is the core problem -but the code to test and reject additions in the wrong service state is disabled. As a result, 3 tests fail, showing cases when a child was added in the wrong state -and the following transition fails. Two fix strategies # very strict: only allow current state in a service add. # current or future: you can add INITED, STARTED and STOPPED to a composite in INITED; STARTED and STOPPED to a STARTED service. I'd argue against adding an INITED before service, because the child wouldn't share a Configuration instance with all the others > CompositeService should allow adding services while being inited > ---------------------------------------------------------------- > > Key: HADOOP-10085 > URL: https://issues.apache.org/jira/browse/HADOOP-10085 > Project: Hadoop Common > Issue Type: Improvement > Affects Versions: 2.2.0 > Reporter: Karthik Kambatla > Attachments: HADOOP-10085-002.patch > > > We can add services to a CompositeService. However, if we do that while initing the CompositeService, it leads to a ConcurrentModificationException. > It would be nice to allow adding services even during the init of CompositeService. -- This message was sent by Atlassian JIRA (v6.1#6144)