hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject [08/29] hadoop git commit: HDFS-8043. NPE in MiniDFSCluster teardown. Contributed by Brahma Reddy Battula.
Date Tue, 21 Apr 2015 23:21:29 GMT
HDFS-8043. NPE in MiniDFSCluster teardown. Contributed by Brahma Reddy Battula.


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

Branch: refs/heads/YARN-2928
Commit: 3c3e4d4f9b92cbd2dc9113701b1b406c29760773
Parents: aa2a152
Author: Tsuyoshi Ozawa <ozawa@apache.org>
Authored: Sun Apr 19 18:19:36 2015 +0900
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Tue Apr 21 16:16:53 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 2 ++
 .../src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java  | 7 +++++--
 .../java/org/apache/hadoop/hdfs/TestDFSClientFailover.java    | 4 +++-
 3 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3c3e4d4f/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 25da013..30a460f 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -520,6 +520,8 @@ Release 2.8.0 - UNRELEASED
     HDFS-7863. Missing description of some methods and parameters in javadoc of
     FSDirDeleteOp. (Brahma Reddy Battula via ozawa)
 
+    HDFS-8043. NPE in MiniDFSCluster teardown. (Brahma Reddy Battula via ozawa)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3c3e4d4f/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
index d92f49e..d3eaa6e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java
@@ -1744,11 +1744,14 @@ public class MiniDFSCluster {
         nameNode = null;
       }
     }
-    if (deleteDfsDir) {
+    if (base_dir != null) {
+      if (deleteDfsDir) {
         base_dir.delete();
-    } else {
+      } else {
         base_dir.deleteOnExit();
+      }
     }
+
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/hadoop/blob/3c3e4d4f/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java
index aa14909..644d66d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSClientFailover.java
@@ -85,7 +85,9 @@ public class TestDFSClientFailover {
   
   @After
   public void tearDownCluster() throws IOException {
-    cluster.shutdown();
+    if (cluster != null) {
+      cluster.shutdown();
+    }
   }
 
   @After


Mime
View raw message