hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1147964 - in /hadoop/common/trunk/hdfs: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java
Date Mon, 18 Jul 2011 16:45:30 GMT
Author: suresh
Date: Mon Jul 18 16:45:28 2011
New Revision: 1147964

URL: http://svn.apache.org/viewvc?rev=1147964&view=rev
Log:
HDFS-2143. Federation: In cluster web console, add link to namenode page that displays live
and dead datanodes. Contributed by Ravi Prakash.


Modified:
    hadoop/common/trunk/hdfs/CHANGES.txt
    hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java

Modified: hadoop/common/trunk/hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hdfs/CHANGES.txt?rev=1147964&r1=1147963&r2=1147964&view=diff
==============================================================================
--- hadoop/common/trunk/hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hdfs/CHANGES.txt Mon Jul 18 16:45:28 2011
@@ -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)
 

Modified: hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java?rev=1147964&r1=1147963&r2=1147964&view=diff
==============================================================================
--- hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java
(original)
+++ hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java
Mon Jul 18 16:45:28 2011
@@ -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, <item label="Node" value="hostname"
    * link="http://hostname:50070" />
    */
-  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
   }



Mime
View raw message