From 93eafc8590c7eb725890bfff42bb5e962ad59ad6 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Tue, 11 Feb 2014 22:04:15 +0000 Subject: [PATCH] HDFS-5929. Add blockpool % usage to HDFS federated nn page. Contributed by Siqi Li. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1567411 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 31f790fde7..72748a70f7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -365,6 +365,9 @@ Release 2.4.0 - UNRELEASED HDFS-4370. Fix typo Blanacer in DataNode. (Chu Tong via shv) + HDFS-5929. Add blockpool % usage to HDFS federated nn page. + (Siqi Li via suresh) + OPTIMIZATIONS HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java index b0ab1b7c1f..e2e71e4006 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java @@ -587,6 +587,8 @@ public void toXML(XMLOutputter doc) throws IOException { toXmlItemBlockWithLink(doc, nn.host, nn.httpAddress, "NameNode"); toXmlItemBlock(doc, "Blockpool Used", StringUtils.byteDesc(nn.bpUsed)); + toXmlItemBlock(doc, "Blockpool Used%", + DFSUtil.percent2String(DFSUtil.getPercentUsed(nn.bpUsed, total))); toXmlItemBlock(doc, "Files And Directories", Long.toString(nn.filesAndDirectories)); toXmlItemBlock(doc, "Blocks", Long.toString(nn.blocksCount));