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

This commit is contained in:
Jian He 2014-12-09 17:56:04 -08:00
parent 2ed90a57fd
commit 437322afca
3 changed files with 6 additions and 3 deletions

View File

@ -209,6 +209,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 @@ private Map<NodeId, Set<String>> buildNodeLabelsFromStr(String args)
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 void testRemoveFromClusterNodeLabels() throws Exception {
@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(