You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Li Lu (JIRA)" <ji...@apache.org> on 2015/10/29 02:41:27 UTC
[jira] [Commented] (YARN-4313) Race condition in MiniMRYarnCluster
when getting history server address
[ https://issues.apache.org/jira/browse/YARN-4313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14979640#comment-14979640 ]
Li Lu commented on YARN-4313:
-----------------------------
Thanks [~jianhe] for the work. I have one quick w.r.t the atomic boolean in the patch. If we're just using atomic read/write for the boolean flag, I think a volatile boolean would suffice. We're not actually using the "fancy" features of atomic boolean in this fix. The other part of the patch LGTM.
> 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
> Attachments: YARN-4313.1.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)