diff --git a/hdfs/CHANGES.txt b/hdfs/CHANGES.txt index 92f7b54a54..da19156ebd 100644 --- a/hdfs/CHANGES.txt +++ b/hdfs/CHANGES.txt @@ -317,6 +317,9 @@ Trunk (unreleased changes) HDFS-1547. Improve decommission mechanism. (suresh) + HDFS-2143. Federation: In cluster web console, add link to namenode page + that displays live and dead datanodes. (Ravi Prakash via suresh) + HDFS-1588. Remove hardcoded strings for configuration keys, "dfs.hosts" and "dfs.hosts.exlude". (Erik Steffl via suresh) diff --git a/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java b/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java index 425176966c..10601b1723 100644 --- a/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java +++ b/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java @@ -584,12 +584,12 @@ class ClusterJspHelper { toXmlItemBlock(doc, "Blocks", Long.toString(nn.blocksCount)); toXmlItemBlock(doc, "Missing Blocks", Long.toString(nn.missingBlocksCount)); - toXmlItemBlock(doc, "Live Datanode (Decommissioned)", - Integer.toString(nn.liveDatanodeCount) + " (" - + Integer.toString(nn.liveDecomCount) + ")"); - toXmlItemBlock(doc, "Dead Datanode (Decommissioned)", - Integer.toString(nn.deadDatanodeCount) + " (" - + Integer.toString(nn.deadDecomCount) + ")"); + toXmlItemBlockWithLink(doc, nn.liveDatanodeCount + " (" + + nn.liveDecomCount + ")", nn.httpAddress+"/dfsnodelist.jsp?whatNodes=LIVE", + "Live Datanode (Decommissioned)"); + toXmlItemBlockWithLink(doc, nn.deadDatanodeCount + " (" + + nn.deadDecomCount + ")", nn.httpAddress+"/dfsnodelist.jsp?whatNodes=DEAD" + , "Dead Datanode (Decommissioned)"); doc.endTag(); // node } doc.endTag(); // namenodes @@ -812,11 +812,11 @@ class ClusterJspHelper { * Generate a XML block as such, */ - private static void toXmlItemBlockWithLink(XMLOutputter doc, String host, - String url, String nodetag) throws IOException { + private static void toXmlItemBlockWithLink(XMLOutputter doc, String value, + String url, String label) throws IOException { doc.startTag("item"); - doc.attribute("label", nodetag); - doc.attribute("value", host); + doc.attribute("label", label); + doc.attribute("value", value); doc.attribute("link", "http://" + url); doc.endTag(); // item }