From 4c9c3955ae6cb5c3b67c8127eb7fa5449a0286d9 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Ozawa Date: Mon, 19 Oct 2015 15:30:21 +0900 Subject: [PATCH] HDFS-9237. NPE at TestDataNodeVolumeFailureToleration#tearDown. Contributed by Brahma Reddy Battula. --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../server/datanode/TestDataNodeVolumeFailureToleration.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index f6cee76294..3edbfba980 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2074,6 +2074,9 @@ Release 2.8.0 - UNRELEASED HDFS-9157. [OEV and OIV] : Unnecessary parsing for mandatory arguements if '-h' option is specified as the only option (nijel via vinayakumarb) + HDFS-9237. NPE at TestDataNodeVolumeFailureToleration#tearDown. + (Brahma Reddy Battula via ozawa) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureToleration.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureToleration.java index 5b7ac307c0..32a439d1b4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureToleration.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureToleration.java @@ -76,7 +76,9 @@ public void setUp() throws Exception { @After public void tearDown() throws Exception { - cluster.shutdown(); + if (cluster != null) { + cluster.shutdown(); + } } /**