HBASE-24175 [Flakey Tests] TestSecureExportSnapshot FileNotFoundException Addendum #3; catch more '/tmp' references by hadoop.

This commit is contained in:
stack 2020-04-21 09:41:24 -07:00
parent e2739d3325
commit b262b9a013
1 changed files with 18 additions and 20 deletions

View File

@ -729,26 +729,20 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
new Path(root, "mapreduce-am-staging-root-dir").toString()); new Path(root, "mapreduce-am-staging-root-dir").toString());
// Frustrate yarn's and hdfs's attempts at writing /tmp. // Frustrate yarn's and hdfs's attempts at writing /tmp.
String property = "yarn.node-labels.fs-store.root-dir"; // Below is fragile. Make it so we just interpolate any 'tmp' reference.
createDirAndSetProperty(property, property); createDirAndSetProperty("yarn.node-labels.fs-store.root-dir");
property = "yarn.nodemanager.log-dirs"; createDirAndSetProperty("yarn.nodemanager.log-dirs");
createDirAndSetProperty(property, property); createDirAndSetProperty("yarn.nodemanager.remote-app-log-dir");
property = "yarn.nodemanager.remote-app-log-dir"; createDirAndSetProperty("yarn.timeline-service.entity-group-fs-store.active-dir");
createDirAndSetProperty(property, property); createDirAndSetProperty("yarn.timeline-service.entity-group-fs-store.done-dir");
property = "yarn.timeline-service.entity-group-fs-store.active-dir"; createDirAndSetProperty("yarn.nodemanager.remote-app-log-dir");
createDirAndSetProperty(property, property); createDirAndSetProperty("dfs.journalnode.edits.dir");
property = "yarn.timeline-service.entity-group-fs-store.done-dir"; createDirAndSetProperty("dfs.datanode.shared.file.descriptor.paths");
createDirAndSetProperty(property, property); createDirAndSetProperty("nfs.dump.dir");
property = "yarn.nodemanager.remote-app-log-dir"; createDirAndSetProperty("java.io.tmpdir");
createDirAndSetProperty(property, property); createDirAndSetProperty("java.io.tmpdir");
property = "dfs.journalnode.edits.dir"; createDirAndSetProperty("dfs.journalnode.edits.dir");
createDirAndSetProperty(property, property); createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir");
property = "dfs.datanode.shared.file.descriptor.paths";
createDirAndSetProperty(property, property);
property = "nfs.dump.dir";
createDirAndSetProperty(property, property);
property = "java.io.tmpdir";
createDirAndSetProperty(property, property);
} }
/** /**
@ -797,6 +791,10 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
} }
} }
private String createDirAndSetProperty(String relPath, String property) {
return createDirAndSetProperty(property, property);
}
private String createDirAndSetProperty(final String relPath, String property) { private String createDirAndSetProperty(final String relPath, String property) {
String path = getDataTestDir(relPath).toString(); String path = getDataTestDir(relPath).toString();
System.setProperty(property, path); System.setProperty(property, path);