From e2a5441b062fd0758138079d24a2740fc5e5e350 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) --- 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 fd560d1dbe5..5f3ff11688f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1620,6 +1620,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 5c865e1d3e9..2219aa6bd0a 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"));