hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject hadoop git commit: HDFS-11474. Ozone: TestContainerMapping needs to cleanup levelDB files.Contributed by Xiaoyu Yao.
Date Wed, 01 Mar 2017 19:38:33 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 4cd34e2a1 -> 3eae84c1b


HDFS-11474. Ozone: TestContainerMapping needs to cleanup levelDB files.Contributed by Xiaoyu
Yao.


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

Branch: refs/heads/HDFS-7240
Commit: 3eae84c1be8417684b3360f92a9ae7e77763891b
Parents: 4cd34e2
Author: Anu Engineer <aengineer@apache.org>
Authored: Wed Mar 1 11:30:32 2017 -0800
Committer: Anu Engineer <aengineer@apache.org>
Committed: Wed Mar 1 11:30:32 2017 -0800

----------------------------------------------------------------------
 .../hadoop/ozone/scm/container/TestContainerMapping.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3eae84c1/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/container/TestContainerMapping.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/container/TestContainerMapping.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/container/TestContainerMapping.java
index 9186a20..d83053a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/container/TestContainerMapping.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/container/TestContainerMapping.java
@@ -17,6 +17,7 @@
 package org.apache.hadoop.ozone.scm.container;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.ozone.OzoneConfigKeys;
 import org.apache.hadoop.ozone.container.common.SCMTestUtils;
 import org.apache.hadoop.scm.container.common.helpers.Pipeline;
@@ -42,6 +43,8 @@ import java.util.UUID;
 public class TestContainerMapping {
   private static ContainerMapping mapping;
   private static MockNodeManager nodeManager;
+  private static File testDir;
+
   @Rule
   public ExpectedException thrown = ExpectedException.none();
   @BeforeClass
@@ -53,7 +56,7 @@ public class TestContainerMapping {
         TestContainerMapping.class.getSimpleName());
 
     conf.set(OzoneConfigKeys.OZONE_CONTAINER_METADATA_DIRS, path);
-    File testDir = Paths.get(path).toFile();
+    testDir = Paths.get(path).toFile();
     boolean folderExisted = testDir.exists() || testDir.mkdirs();
     if (!folderExisted) {
       throw new IOException("Unable to create test diectory path");
@@ -65,6 +68,7 @@ public class TestContainerMapping {
   @AfterClass
   public static void cleanup() throws IOException {
     mapping.close();
+    FileUtil.fullyDelete(testDir);
   }
 
   @Before


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


Mime
View raw message