hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oz...@apache.org
Subject hadoop git commit: HDFS-8043. NPE in MiniDFSCluster teardown. Contributed by Brahma Reddy Battula.
Date Sun, 19 Apr 2015 09:24:10 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 5112477d9 -> 5459b241c


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/5459b241
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5459b241
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5459b241

Branch: refs/heads/trunk
Commit: 5459b241c86cc9a26fecca9a06ceaf524e48fed4
Parents: 5112477
Author: Tsuyoshi Ozawa <ozawa@apache.org>
Authored: Sun Apr 19 18:19:36 2015 +0900
Committer: Tsuyoshi Ozawa <ozawa@apache.org>
Committed: Sun Apr 19 18:19:36 2015 +0900

----------------------------------------------------------------------
 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/5459b241/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/5459b241/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/5459b241/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