diff --git a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestDFSClientCache.java b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestDFSClientCache.java index 6536cd80f4..54b7ee7fd1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestDFSClientCache.java +++ b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/test/java/org/apache/hadoop/hdfs/nfs/nfs3/TestDFSClientCache.java @@ -39,7 +39,7 @@ public void testEviction() throws IOException { conf.set(FileSystem.FS_DEFAULT_NAME_KEY, "hdfs://localhost"); // Only one entry will be in the cache - final int MAX_CACHE_SIZE = 2; + final int MAX_CACHE_SIZE = 1; DFSClientCache cache = new DFSClientCache(conf, MAX_CACHE_SIZE); @@ -50,7 +50,8 @@ public void testEviction() throws IOException { cache.getDfsClient("test2"); assertTrue(isDfsClientClose(c1)); - assertEquals(MAX_CACHE_SIZE - 1, cache.clientCache.size()); + assertTrue("cache size should be the max size or less", + cache.clientCache.size() <= MAX_CACHE_SIZE); } @Test diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 05cb74517b..b57503aa77 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -493,6 +493,9 @@ Release 2.7.0 - UNRELEASED HDFS-7326: Add documentation for hdfs debug commands (Vijay Bhat via Colin P. McCabe) + HDFS-7598. Remove dependency on old version of guava in + TestDFSClientCache#testEviction. (Sangjin Lee via Colin P. McCabe) + OPTIMIZATIONS HDFS-7454. Reduce memory footprint for AclEntries in NameNode.