HDFS-13567. 
TestNameNodeMetrics#testGenerateEDEKTime,TestNameNodeMetrics#testResourceCheck 
should use a different cluster basedir. Contributed by Anbang Hu.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/63480976
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/63480976
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/63480976

Branch: refs/heads/HDDS-4
Commit: 63480976a008bab0b84f4da08b1099867e5a9a6b
Parents: 2d6195c
Author: Inigo Goiri <inigo...@apache.org>
Authored: Tue May 15 15:34:54 2018 -0700
Committer: Inigo Goiri <inigo...@apache.org>
Committed: Tue May 15 15:34:54 2018 -0700

----------------------------------------------------------------------
 .../hdfs/server/namenode/metrics/TestNameNodeMetrics.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/63480976/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java
index db9adbe..92bc51c 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/metrics/TestNameNodeMetrics.java
@@ -992,8 +992,10 @@ public class TestNameNodeMetrics {
         .DFS_NAMENODE_DELEGATION_TOKEN_ALWAYS_USE_KEY, true);
     conf.setInt(DFSConfigKeys.DFS_NAMENODE_LIST_ENCRYPTION_ZONES_NUM_RESPONSES,
         2);
+    File basedir = new File(MiniDFSCluster.getBaseDirectory(),
+        GenericTestUtils.getMethodName());
 
-    try (MiniDFSCluster clusterEDEK = new MiniDFSCluster.Builder(conf)
+    try (MiniDFSCluster clusterEDEK = new MiniDFSCluster.Builder(conf, basedir)
         .numDataNodes(1).build()) {
 
       DistributedFileSystem fsEDEK =
@@ -1029,7 +1031,9 @@ public class TestNameNodeMetrics {
   @Test
   public void testResourceCheck() throws Exception {
     HdfsConfiguration conf = new HdfsConfiguration();
-    MiniDFSCluster tmpCluster = new MiniDFSCluster.Builder(conf)
+    File basedir = new File(MiniDFSCluster.getBaseDirectory(),
+        GenericTestUtils.getMethodName());
+    MiniDFSCluster tmpCluster = new MiniDFSCluster.Builder(conf, basedir)
         .numDataNodes(0)
         .nnTopology(MiniDFSNNTopology.simpleHATopology())
         .build();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to