YARN-7090. testRMRestartAfterNodeLabelDisabled get failed when CapacityScheduler is configured. Contributed by Wangda Tan.
(cherry picked from commit 652dd434d96cd1a1fe25cd8c636b1859c29f462b)
This commit is contained in:
parent
8b2d5a4faa
commit
c98917f798
@ -2438,6 +2438,22 @@ private MockAM launchAndFailAM(RMApp app, MockRM rm, MockNM nm)
|
||||
|
||||
@Test(timeout = 60000)
|
||||
public void testRMRestartAfterNodeLabelDisabled() throws Exception {
|
||||
if (getSchedulerType() != SchedulerType.CAPACITY) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Initial FS node label store root dir to a random tmp dir
|
||||
File nodeLabelFsStoreDir = new File("target",
|
||||
this.getClass().getSimpleName()
|
||||
+ "-testRMRestartAfterNodeLabelDisabled");
|
||||
if (nodeLabelFsStoreDir.exists()) {
|
||||
FileUtils.deleteDirectory(nodeLabelFsStoreDir);
|
||||
}
|
||||
nodeLabelFsStoreDir.deleteOnExit();
|
||||
String nodeLabelFsStoreDirURI = nodeLabelFsStoreDir.toURI().toString();
|
||||
conf.set(YarnConfiguration.FS_NODE_LABELS_STORE_ROOT_DIR,
|
||||
nodeLabelFsStoreDirURI);
|
||||
|
||||
conf.setBoolean(YarnConfiguration.NODE_LABELS_ENABLED, true);
|
||||
|
||||
MockRM rm1 = new MockRM(
|
||||
|
Loading…
x
Reference in New Issue
Block a user