YARN-1760. Addendum patch. TestRMAdminService assumes Capacity Scheduler.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1573134 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fec1e2eed9
commit
8caeb0af9d
@ -68,9 +68,16 @@ public class TestRMAdminService {
|
|||||||
private Path workingPath;
|
private Path workingPath;
|
||||||
private Path tmpDir;
|
private Path tmpDir;
|
||||||
|
|
||||||
|
static {
|
||||||
|
YarnConfiguration.addDefaultResource(
|
||||||
|
YarnConfiguration.CS_CONFIGURATION_FILE);
|
||||||
|
}
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() throws IOException {
|
public void setup() throws IOException {
|
||||||
configuration = new YarnConfiguration();
|
configuration = new YarnConfiguration();
|
||||||
|
configuration.set(YarnConfiguration.RM_SCHEDULER,
|
||||||
|
CapacityScheduler.class.getCanonicalName());
|
||||||
fs = FileSystem.get(configuration);
|
fs = FileSystem.get(configuration);
|
||||||
workingPath =
|
workingPath =
|
||||||
new Path(new File("target", this.getClass().getSimpleName()
|
new Path(new File("target", this.getClass().getSimpleName()
|
||||||
@ -94,16 +101,9 @@ public void tearDown() throws IOException {
|
|||||||
fs.delete(tmpDir, true);
|
fs.delete(tmpDir, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void useCapacityScheduler() {
|
|
||||||
configuration.set(YarnConfiguration.RM_SCHEDULER,
|
|
||||||
CapacityScheduler.class.getCanonicalName());
|
|
||||||
configuration.addResource(YarnConfiguration.CS_CONFIGURATION_FILE);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAdminRefreshQueuesWithLocalConfigurationProvider()
|
public void testAdminRefreshQueuesWithLocalConfigurationProvider()
|
||||||
throws IOException, YarnException {
|
throws IOException, YarnException {
|
||||||
useCapacityScheduler();
|
|
||||||
rm = new MockRM(configuration);
|
rm = new MockRM(configuration);
|
||||||
rm.init(configuration);
|
rm.init(configuration);
|
||||||
rm.start();
|
rm.start();
|
||||||
@ -126,7 +126,6 @@ public void testAdminRefreshQueuesWithFileSystemBasedConfigurationProvider()
|
|||||||
throws IOException, YarnException {
|
throws IOException, YarnException {
|
||||||
configuration.set(YarnConfiguration.RM_CONFIGURATION_PROVIDER_CLASS,
|
configuration.set(YarnConfiguration.RM_CONFIGURATION_PROVIDER_CLASS,
|
||||||
"org.apache.hadoop.yarn.FileSystemBasedConfigurationProvider");
|
"org.apache.hadoop.yarn.FileSystemBasedConfigurationProvider");
|
||||||
useCapacityScheduler();
|
|
||||||
try {
|
try {
|
||||||
rm = new MockRM(configuration);
|
rm = new MockRM(configuration);
|
||||||
rm.init(configuration);
|
rm.init(configuration);
|
||||||
|
Loading…
Reference in New Issue
Block a user