Skip to content

Commit

Permalink
HDFS-8043. NPE in MiniDFSCluster teardown. Contributed by Brahma Redd…
Browse files Browse the repository at this point in the history
…y Battula.
  • Loading branch information
oza committed Apr 19, 2015
1 parent 5112477 commit 5459b24
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1744,11 +1744,14 @@ public void shutdown(boolean deleteDfsDir, boolean closeFileSystem) {
nameNode = null;
}
}
if (deleteDfsDir) {
if (base_dir != null) {
if (deleteDfsDir) {
base_dir.delete();
} else {
} else {
base_dir.deleteOnExit();
}
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public void setUpCluster() throws IOException {

@After
public void tearDownCluster() throws IOException {
cluster.shutdown();
if (cluster != null) {
cluster.shutdown();
}
}

@After
Expand Down

0 comments on commit 5459b24

Please sign in to comment.