From 8ed1fd2171269c1bf7efac417f84484f61dd2c5b Mon Sep 17 00:00:00 2001 From: Lei Xu Date: Wed, 4 Nov 2015 10:27:35 -0800 Subject: [PATCH] HDFS-9331. Modify TestNameNodeMXBean#testNameNodeMXBeanInfo() to account for filesystem entirely allocated for DFS use. (Tony Wu via lei) (cherry picked from commit e2a5441b062fd0758138079d24a2740fc5e5e350) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index db9cc294d0d..6aa943260c1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -773,6 +773,9 @@ Release 2.8.0 - UNRELEASED HDFS-9007. Fix HDFS Balancer to honor upgrade domain policy. (Ming Ma via lei) + HDFS-9331. Modify TestNameNodeMXBean#testNameNodeMXBeanInfo() to account for + filesystem entirely allocated for DFS use. (Tony Wu via lei) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java index 463ca67f4b6..dfaf9290dd6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeMXBean.java @@ -136,7 +136,7 @@ public class TestNameNodeMXBean { assertTrue(liveNodes.size() == 2); for (Map liveNode : liveNodes.values()) { assertTrue(liveNode.containsKey("nonDfsUsedSpace")); - assertTrue(((Long)liveNode.get("nonDfsUsedSpace")) > 0); + assertTrue(((Long)liveNode.get("nonDfsUsedSpace")) >= 0); assertTrue(liveNode.containsKey("capacity")); assertTrue(((Long)liveNode.get("capacity")) > 0); assertTrue(liveNode.containsKey("numBlocks"));