From e817cedcdc262630206630d4a58d1051ceab8794 Mon Sep 17 00:00:00 2001 From: Arpit Agarwal Date: Wed, 18 Mar 2015 12:45:46 -0700 Subject: [PATCH] HDFS-7951. Fix NPE for TestFsDatasetImpl#testAddVolumeFailureReleasesInUseLock on Linux. (Contributed by Xiaoyu Yao) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 4 ++++ .../server/datanode/fsdataset/impl/TestFsDatasetImpl.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 9e54b3df4a2..eb84213bd4b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1181,6 +1181,10 @@ Release 2.7.0 - UNRELEASED HDFS-7950. Fix TestFsDatasetImpl#testAddVolumes failure on Windows. (Xiaoyu Yao via Arpit Agarwal) + HDFS-7951. Fix NPE for + TestFsDatasetImpl#testAddVolumeFailureReleasesInUseLock on Linux + (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/fsdataset/impl/TestFsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java index 73fcd197aff..56a4287d631 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/TestFsDatasetImpl.java @@ -330,7 +330,7 @@ public class TestFsDatasetImpl { Storage.StorageDirectory sd = createStorageDirectory(badDir); sd.lock(); DataStorage.VolumeBuilder builder = new DataStorage.VolumeBuilder(storage, sd); - when(storage.prepareVolume(eq(datanode), eq(badDir), + when(storage.prepareVolume(eq(datanode), eq(badDir.getAbsoluteFile()), Matchers.>any())) .thenReturn(builder);