From 54e144059e0f297d54951c5bcb8db23181a5bf33 Mon Sep 17 00:00:00 2001 From: Jing Zhao Date: Wed, 7 Aug 2013 20:34:39 +0000 Subject: [PATCH] HDFS-4926. namenode webserver's page has a tooltip that is inconsistent with the datanode HTML link. Contributed by Vivek Ganesan. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1511477 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapps/static/hadoop.css | 3 +-- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../server/namenode/NamenodeJspHelper.java | 26 ++++++++++++------- .../src/main/webapps/static/hadoop.css | 2 +- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/webapps/static/hadoop.css b/hadoop-common-project/hadoop-common/src/main/webapps/static/hadoop.css index 09c8a254713..1caa019e038 100644 --- a/hadoop-common-project/hadoop-common/src/main/webapps/static/hadoop.css +++ b/hadoop-common-project/hadoop-common/src/main/webapps/static/hadoop.css @@ -45,8 +45,7 @@ div#dfsnodetable a#title { font-weight : bolder; } -div#dfsnodetable td, th { - border-bottom-style : none; +div#dfsnodetable td, th { padding-bottom : 4px; padding-top : 4px; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 5abd2ff3730..cb13cadfbde 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -284,6 +284,9 @@ Release 2.1.1-beta - UNRELEASED HDFS-4905. Add appendToFile command to "hdfs dfs". (Arpit Agarwal via cnauroth) + HDFS-4926. Namenode webserver's page has a tooltip that is inconsistent + with the datanode HTML link. (Vivek Ganesan via jing9) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java index 67152a01422..1989784ba53 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java @@ -709,10 +709,10 @@ class NamenodeJspHelper { int idx = (suffix != null && name.endsWith(suffix)) ? name .indexOf(suffix) : -1; - out.print(rowTxt() + " " + ((idx > 0) ? name.substring(0, idx) : name) + "" - + ((alive) ? "" : "\n")); + + ((alive) ? "" : "\n") + "" + d.getXferAddr()); } void generateDecommissioningNodeData(JspWriter out, DatanodeDescriptor d, @@ -746,10 +746,10 @@ class NamenodeJspHelper { /* * Say the datanode is dn1.hadoop.apache.org with ip 192.168.0.5 we use: * 1) d.getHostName():d.getPort() to display. Domain and port are stripped - * if they are common across the nodes. i.e. "dn1" - * 2) d.getHost():d.Port() for "title". i.e. "192.168.0.5:50010" - * 3) d.getHostName():d.getInfoPort() for url. + * if they are common across the nodes. i.e. "dn1" + * 2) d.getHostName():d.getInfoPort() for url and title. * i.e. "http://dn1.hadoop.apache.org:50075/..." + * 3) d.getXferAddr() for "Transferring Address". i.e. "192.168.0.5:50010" * Note that "d.getHost():d.getPort()" is what DFS clients use to * interact with datanodes. */ @@ -880,7 +880,9 @@ class NamenodeJspHelper { } out.print(" Node Node Transferring
Address Last
Contact Admin State Configured
Capacity (" + diskByteStr + ") Block Pool
Used (" + diskByteStr + ") Block Pool
Used (%)" - + "> Blocks Block Pool
Used (%)" + " Failed Volumes\n"); JspHelper.sortNodeList(live, sorterField, sorterOrder); @@ -915,7 +917,9 @@ class NamenodeJspHelper { if (dead.size() > 0) { out.print(" " + "
Node Node Transferring
Address
Decommissioned\n"); JspHelper.sortNodeList(dead, sorterField, sorterOrder); @@ -935,7 +939,9 @@ class NamenodeJspHelper { if (decommissioning.size() > 0) { out.print(" " + "
Node Node Transferring
Address
Last
Contact
Under Replicated Blocks