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/branches/branch-2@1569929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a5d2398377
commit
34baa74273
|
@ -14,6 +14,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
|
YARN-1718. Fix a couple isTerminals in Fair Scheduler queue placement rules
|
||||||
|
(Sandy Ryza)
|
||||||
|
|
||||||
Release 2.4.0 - UNRELEASED
|
Release 2.4.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -162,7 +162,7 @@ public abstract class QueuePlacementRule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTerminal() {
|
public boolean isTerminal() {
|
||||||
return create;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ public abstract class QueuePlacementRule {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isTerminal() {
|
public boolean isTerminal() {
|
||||||
return create;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,17 @@ public class TestQueuePlacementPolicy {
|
||||||
parse(sb.toString());
|
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 {
|
private QueuePlacementPolicy parse(String str) throws Exception {
|
||||||
// Read and parse the allocations file.
|
// Read and parse the allocations file.
|
||||||
DocumentBuilderFactory docBuilderFactory =
|
DocumentBuilderFactory docBuilderFactory =
|
||||||
|
|
Loading…
Reference in New Issue