YARN-2930. Fixed TestRMRestart#testRMRestartRecoveringNodeLabelManager intermittent failure. Contributed by Wangda Tan
This commit is contained in:
parent
03867eb1bb
commit
2ed90a57fd
|
@ -206,6 +206,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
YARN-2910. FSLeafQueue can throw ConcurrentModificationException.
|
YARN-2910. FSLeafQueue can throw ConcurrentModificationException.
|
||||||
(Wilfred Spiegelenburg via kasha)
|
(Wilfred Spiegelenburg via kasha)
|
||||||
|
|
||||||
|
YARN-2930. Fixed TestRMRestart#testRMRestartRecoveringNodeLabelManager
|
||||||
|
intermittent failure. (Wangda Tan via jianhe)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -39,6 +39,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
import org.apache.hadoop.io.DataOutputBuffer;
|
import org.apache.hadoop.io.DataOutputBuffer;
|
||||||
|
@ -2048,6 +2049,19 @@ public class TestRMRestart extends ParameterizedSchedulerTestBase {
|
||||||
// 4. Get cluster and node lobel, it should be present by recovering it
|
// 4. Get cluster and node lobel, it should be present by recovering it
|
||||||
@Test(timeout = 20000)
|
@Test(timeout = 20000)
|
||||||
public void testRMRestartRecoveringNodeLabelManager() throws Exception {
|
public void testRMRestartRecoveringNodeLabelManager() throws Exception {
|
||||||
|
// Initial FS node label store root dir to a random tmp dir
|
||||||
|
File nodeLabelFsStoreDir =
|
||||||
|
new File("target", this.getClass().getSimpleName()
|
||||||
|
+ "-testRMRestartRecoveringNodeLabelManager");
|
||||||
|
if (nodeLabelFsStoreDir.exists()) {
|
||||||
|
FileUtils.deleteDirectory(nodeLabelFsStoreDir);
|
||||||
|
}
|
||||||
|
nodeLabelFsStoreDir.deleteOnExit();
|
||||||
|
|
||||||
|
String nodeLabelFsStoreDirURI = nodeLabelFsStoreDir.toURI().toString();
|
||||||
|
conf.set(YarnConfiguration.FS_NODE_LABELS_STORE_ROOT_DIR,
|
||||||
|
nodeLabelFsStoreDirURI);
|
||||||
|
|
||||||
MemoryRMStateStore memStore = new MemoryRMStateStore();
|
MemoryRMStateStore memStore = new MemoryRMStateStore();
|
||||||
memStore.init(conf);
|
memStore.init(conf);
|
||||||
MockRM rm1 = new MockRM(conf, memStore) {
|
MockRM rm1 = new MockRM(conf, memStore) {
|
||||||
|
|
Loading…
Reference in New Issue