From 5b322c6a823208bbc64698379340343a72e8160a Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Tue, 17 Mar 2015 21:29:19 -0700 Subject: [PATCH] HDFS-7946. TestDataNodeVolumeFailureReporting NPE on Windows. (Contributed by Xiaoyu Yao) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../server/datanode/TestDataNodeVolumeFailureReporting.java | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 3e11356e32d..db8741c35c9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1169,6 +1169,9 @@ Release 2.7.0 - UNRELEASED HDFS-7886. Fix TestFileTruncate falures. (Plamen Jeliazkov and shv) + HDFS-7946. TestDataNodeVolumeFailureReporting NPE on Windows. (Xiaoyu Yao + via Arpit Agarwal) + BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS HDFS-7720. Quota by Storage Type API, tools and ClientNameNode diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureReporting.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureReporting.java index 788ddb3991e..9842f25b5ff 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureReporting.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailureReporting.java @@ -91,6 +91,7 @@ public class TestDataNodeVolumeFailureReporting { // been simulated by denying execute access. This is based on the maximum // number of datanodes and the maximum number of storages per data node used // throughout the tests in this suite. + assumeTrue(!Path.WINDOWS); int maxDataNodes = 3; int maxStoragesPerDataNode = 4; for (int i = 0; i < maxDataNodes; i++) { @@ -100,7 +101,9 @@ public class TestDataNodeVolumeFailureReporting { } } IOUtils.cleanup(LOG, fs); - cluster.shutdown(); + if (cluster != null) { + cluster.shutdown(); + } } /**