You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2020/04/21 16:43:57 UTC

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

This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch branch-2.2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.2 by this push:
     new a98dc28  HBASE-24175 [Flakey Tests] TestSecureExportSnapshot FileNotFoundException Addendum #3; catch more '/tmp' references by hadoop.
a98dc28 is described below

commit a98dc284e9aef8b0e07959c95d8881800d8a4fa8
Author: stack <st...@apache.org>
AuthorDate: Tue Apr 21 09:41:24 2020 -0700

    HBASE-24175 [Flakey Tests] TestSecureExportSnapshot FileNotFoundException
    Addendum #3; catch more '/tmp' references by hadoop.
---
 .../apache/hadoop/hbase/HBaseTestingUtility.java   | 38 ++++++++++------------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index aa964ac..a908fff 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -723,26 +723,20 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility {
       new Path(root, "mapreduce-am-staging-root-dir").toString());
 
     // Frustrate yarn's and hdfs's attempts at writing /tmp.
-    String property = "yarn.node-labels.fs-store.root-dir";
-    createDirAndSetProperty(property, property);
-    property = "yarn.nodemanager.log-dirs";
-    createDirAndSetProperty(property, property);
-    property = "yarn.nodemanager.remote-app-log-dir";
-    createDirAndSetProperty(property, property);
-    property = "yarn.timeline-service.entity-group-fs-store.active-dir";
-    createDirAndSetProperty(property, property);
-    property = "yarn.timeline-service.entity-group-fs-store.done-dir";
-    createDirAndSetProperty(property, property);
-    property = "yarn.nodemanager.remote-app-log-dir";
-    createDirAndSetProperty(property, property);
-    property = "dfs.journalnode.edits.dir";
-    createDirAndSetProperty(property, property);
-    property = "dfs.datanode.shared.file.descriptor.paths";
-    createDirAndSetProperty(property, property);
-    property = "nfs.dump.dir";
-    createDirAndSetProperty(property, property);
-    property = "java.io.tmpdir";
-    createDirAndSetProperty(property, property);
+    // Below is fragile. Make it so we just interpolate any 'tmp' reference.
+    createDirAndSetProperty("yarn.node-labels.fs-store.root-dir");
+    createDirAndSetProperty("yarn.nodemanager.log-dirs");
+    createDirAndSetProperty("yarn.nodemanager.remote-app-log-dir");
+    createDirAndSetProperty("yarn.timeline-service.entity-group-fs-store.active-dir");
+    createDirAndSetProperty("yarn.timeline-service.entity-group-fs-store.done-dir");
+    createDirAndSetProperty("yarn.nodemanager.remote-app-log-dir");
+    createDirAndSetProperty("dfs.journalnode.edits.dir");
+    createDirAndSetProperty("dfs.datanode.shared.file.descriptor.paths");
+    createDirAndSetProperty("nfs.dump.dir");
+    createDirAndSetProperty("java.io.tmpdir");
+    createDirAndSetProperty("java.io.tmpdir");
+    createDirAndSetProperty("dfs.journalnode.edits.dir");
+    createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir");
   }
 
   /**
@@ -791,6 +785,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) {
     String path = getDataTestDir(relPath).toString();
     System.setProperty(property, path);