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 "Ajith S (JIRA)" <ji...@apache.org> on 2016/08/08 13:17:20 UTC

[jira] [Commented] (YARN-2398) TestResourceTrackerOnHA crashes

    [ https://issues.apache.org/jira/browse/YARN-2398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15411790#comment-15411790 ] 

Ajith S commented on YARN-2398:
-------------------------------

I encountered with same scenario. I guess the bug is because of {{org.apache.hadoop.yarn.client.ProtocolHATestBase.MiniYARNClusterForHATesting.waittingForFailOver()}}

{code}
 private boolean waittingForFailOver() {
      int maximumWaittingTime = 50;
      int count = 0;
      while (!failoverTriggered.get() && count >= maximumWaittingTime) {
        try {
          Thread.sleep(100);
        } catch (InterruptedException e) {
          // DO NOTHING
        }
        count++;
      }
.......
{code}

here it should be {{count <= maximumWaittingTime}}
As otherwise, the while loop will be exit at first check itself, and there is no actual wait hence it causes racecondition between failover and registerNM event

> TestResourceTrackerOnHA crashes
> -------------------------------
>
>                 Key: YARN-2398
>                 URL: https://issues.apache.org/jira/browse/YARN-2398
>             Project: Hadoop YARN
>          Issue Type: Test
>            Reporter: Jason Lowe
>            Assignee: Ajith S
>
> TestResourceTrackerOnHA is currently crashing and failing trunk builds.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org