[
https://issues.apache.org/jira/browse/YARN-2075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14021137#comment-14021137
]
Advertising
Zhijie Shen commented on YARN-2075:
-----------------------------------
I looked into the patch, which seems to fix the test failure. I spent more time
to investigate the context. The test was broken by HDFS-2949, which add the
following piece of code:
{code}
Collection<String> targetIds = getTargetIds(targetNodeToActivate);
if(targetIds == null) {
errOut.println("transitionToActive: No target node in the "
+ "current configuration");
printUsage(errOut, "-transitionToActive");
return true;
}
targetIds.remove(targetNodeToActivate);
{code}
HAAdmin#getTargetIds only adds targetNodeToActivate into targetIds, such that
the after this piece of code, targetIds is going to be empty, and
HAAdmin#isOtherTargetNodeActive is always returning false (given we fixed the
fixed size list issue). Only DFSHAAdmin overrides getTargetIds to add multiple
IDs. Therefore, the method doesn't make sense to the HA admin other than that
of HDFS, does it?
> TestRMAdminCLI consistently fail on trunk and branch-2
> ------------------------------------------------------
>
> Key: YARN-2075
> URL: https://issues.apache.org/jira/browse/YARN-2075
> Project: Hadoop YARN
> Issue Type: Bug
> Affects Versions: 3.0.0, 2.5.0
> Reporter: Zhijie Shen
> Assignee: Kenji Kikushima
> Attachments: YARN-2075.patch
>
>
> {code}
> Running org.apache.hadoop.yarn.client.TestRMAdminCLI
> Tests run: 13, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 1.191 sec
> <<< FAILURE! - in org.apache.hadoop.yarn.client.TestRMAdminCLI
> testTransitionToActive(org.apache.hadoop.yarn.client.TestRMAdminCLI) Time
> elapsed: 0.082 sec <<< ERROR!
> java.lang.UnsupportedOperationException: null
> at java.util.AbstractList.remove(AbstractList.java:144)
> at java.util.AbstractList$Itr.remove(AbstractList.java:360)
> at java.util.AbstractCollection.remove(AbstractCollection.java:252)
> at
> org.apache.hadoop.ha.HAAdmin.isOtherTargetNodeActive(HAAdmin.java:173)
> at org.apache.hadoop.ha.HAAdmin.transitionToActive(HAAdmin.java:144)
> at org.apache.hadoop.ha.HAAdmin.runCmd(HAAdmin.java:447)
> at org.apache.hadoop.ha.HAAdmin.run(HAAdmin.java:380)
> at org.apache.hadoop.yarn.client.cli.RMAdminCLI.run(RMAdminCLI.java:318)
> at
> org.apache.hadoop.yarn.client.TestRMAdminCLI.testTransitionToActive(TestRMAdminCLI.java:180)
> testHelp(org.apache.hadoop.yarn.client.TestRMAdminCLI) Time elapsed: 0.088
> sec <<< FAILURE!
> java.lang.AssertionError: null
> at org.junit.Assert.fail(Assert.java:86)
> at org.junit.Assert.assertTrue(Assert.java:41)
> at org.junit.Assert.assertTrue(Assert.java:52)
> at
> org.apache.hadoop.yarn.client.TestRMAdminCLI.testError(TestRMAdminCLI.java:366)
> at
> org.apache.hadoop.yarn.client.TestRMAdminCLI.testHelp(TestRMAdminCLI.java:307)
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)