diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 897f79d352..dde84a6bfd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -306,6 +306,8 @@ Release 2.0.0 - UNRELEASED HDFS-3120. Enable hsync and hflush by default. (eli) + HDFS-3187. Upgrade guava to 11.0.2 (todd) + OPTIMIZATIONS HDFS-3024. Improve performance of stringification in addStoredBlock (todd) 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 35619f8fd4..7d0bf444d5 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 @@ -731,7 +731,9 @@ private void copyNameDirs(Collection srcDirs, Collection dstDirs, Preconditions.checkArgument(!dstDir.equals(srcDir)); File dstDirF = new File(dstDir); if (dstDirF.exists()) { - Files.deleteRecursively(dstDirF); + if (!FileUtil.fullyDelete(dstDirF)) { + throw new IOException("Unable to delete: " + dstDirF); + } } LOG.info("Copying namedir from primary node dir " + srcDir + " to " + dstDir); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSImageTestUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSImageTestUtil.java index 6e9aa8c8a5..7876125a93 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSImageTestUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSImageTestUtil.java @@ -37,6 +37,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.fs.permission.PermissionStatus; import org.apache.hadoop.hdfs.MiniDFSCluster; @@ -181,7 +182,9 @@ public static FSImageTransactionalStorageInspector inspectStorageDirectory( public static FSEditLog createStandaloneEditLog(File logDir) throws IOException { assertTrue(logDir.mkdirs() || logDir.exists()); - Files.deleteDirectoryContents(logDir); + if (!FileUtil.fullyDeleteContents(logDir)) { + throw new IOException("Unable to delete contents of " + logDir); + } NNStorage storage = Mockito.mock(NNStorage.class); StorageDirectory sd = FSImageTestUtil.mockStorageDirectory(logDir, NameNodeDirType.EDITS); diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 69dd16bf92..985d309913 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -253,7 +253,7 @@ com.google.guava guava - r09 + 11.0.2 commons-cli