Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-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 9593D1898C for ; Tue, 26 Jan 2016 19:36:41 +0000 (UTC) Received: (qmail 63779 invoked by uid 500); 26 Jan 2016 19:36:40 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 63705 invoked by uid 500); 26 Jan 2016 19:36:40 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 63141 invoked by uid 99); 26 Jan 2016 19:36:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jan 2016 19:36:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 545D82C1F6E for ; Tue, 26 Jan 2016 19:36:40 +0000 (UTC) Date: Tue, 26 Jan 2016 19:36:40 +0000 (UTC) From: "Vinod Kumar Vavilapalli (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-4313) Race condition in MiniMRYarnCluster when getting history server address 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/YARN-4313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vinod Kumar Vavilapalli updated YARN-4313: ------------------------------------------ Fix Version/s: (was: 2.8.0) > Race condition in MiniMRYarnCluster when getting history server address > ----------------------------------------------------------------------- > > Key: YARN-4313 > URL: https://issues.apache.org/jira/browse/YARN-4313 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Jian He > Assignee: Jian He > Fix For: 2.7.2 > > Attachments: YARN-4313.1.patch, YARN-4313.2.patch > > > Problem in this place when waiting for JHS to be started > {code} > new Thread() { > public void run() { > historyServer.start(); > }; > }.start(); > while (historyServer.getServiceState() == STATE.INITED) { > LOG.info("Waiting for HistoryServer to start..."); > Thread.sleep(1500); > } > {code} > The service state is updated before the service is actually started. See AbstractServic#start. So it's possible that when the while loop breaks, the service is not yet started. -- This message was sent by Atlassian JIRA (v6.3.4#6332)