YARN-1718. Fix a couple isTerminals in Fair Scheduler queue placement rules (Sandy Ryza)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1569928 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62d791b1ee
commit
0e3e91a06d
@ -29,6 +29,9 @@ Release 2.5.0 - UNRELEASED
|
||||
|
||||
BUG FIXES
|
||||
|
||||
YARN-1718. Fix a couple isTerminals in Fair Scheduler queue placement rules
|
||||
(Sandy Ryza)
|
||||
|
||||
Release 2.4.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -162,7 +162,7 @@ protected String getQueueForApp(String requestedQueue,
|
||||
|
||||
@Override
|
||||
public boolean isTerminal() {
|
||||
return create;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,7 +201,7 @@ protected String getQueueForApp(String requestedQueue, String user,
|
||||
|
||||
@Override
|
||||
public boolean isTerminal() {
|
||||
return create;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,6 +106,17 @@ public void testTerminalRuleInMiddle() throws Exception {
|
||||
parse(sb.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTerminals() throws Exception {
|
||||
// Should make it through without an exception
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("<queuePlacementPolicy>");
|
||||
sb.append(" <rule name='secondaryGroupExistingQueue' create='true'/>");
|
||||
sb.append(" <rule name='default' create='false'/>");
|
||||
sb.append("</queuePlacementPolicy>");
|
||||
parse(sb.toString());
|
||||
}
|
||||
|
||||
private QueuePlacementPolicy parse(String str) throws Exception {
|
||||
// Read and parse the allocations file.
|
||||
DocumentBuilderFactory docBuilderFactory =
|
||||
|
Loading…
Reference in New Issue
Block a user