YARN-2924. Fixed RMAdminCLI to not convert node labels to lower case. Contributed by Wangda Tan

(cherry picked from commit 437322afca)
This commit is contained in:
Jian He 2014-12-09 17:56:04 -08:00
parent 0f47e4e745
commit b31dfb17d8
3 changed files with 6 additions and 3 deletions

View File

@ -179,6 +179,9 @@ Release 2.7.0 - UNRELEASED
YARN-2930. Fixed TestRMRestart#testRMRestartRecoveringNodeLabelManager
intermittent failure. (Wangda Tan via jianhe)
YARN-2924. Fixed RMAdminCLI to not convert node labels to lower case.
(Wangda Tan via jianhe)
Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES

View File

@ -399,7 +399,7 @@ public class RMAdminCLI extends HAAdmin {
for (int i = 1; i < splits.length; i++) {
if (!splits[i].trim().isEmpty()) {
map.get(nodeId).add(splits[i].trim().toLowerCase());
map.get(nodeId).add(splits[i].trim());
}
}
}

View File

@ -468,9 +468,9 @@ public class TestRMAdminCLI {
@Test
public void testReplaceLabelsOnNode() throws Exception {
// Successfully replace labels
dummyNodeLabelsManager.addToCluserNodeLabels(ImmutableSet.of("x", "y"));
dummyNodeLabelsManager.addToCluserNodeLabels(ImmutableSet.of("x", "Y"));
String[] args =
{ "-replaceLabelsOnNode", "node1,x,y node2,y",
{ "-replaceLabelsOnNode", "node1,x,Y node2,Y",
"-directlyAccessNodeLabelStore" };
assertEquals(0, rmAdminCLI.run(args));
assertTrue(dummyNodeLabelsManager.getNodeLabels().containsKey(