diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index b96f04b9400..69ca50b009b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -159,6 +159,9 @@ Release 2.2.0 - 2013-10-13 HDFS-5291. Standby namenode after transition to active goes into safemode. (jing9) + HDFS-5317. Go back to DFS Home link does not work on datanode webUI + (Haohui Mai via brandonli) + Release 2.1.1-beta - 2013-09-23 INCOMPATIBLE CHANGES 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 f044e75daab..884a9025b8a 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 @@ -23,6 +23,7 @@ import java.io.IOException; import java.lang.management.ManagementFactory; import java.lang.management.MemoryMXBean; import java.lang.management.MemoryUsage; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.URI; import java.net.URLEncoder; @@ -60,6 +61,7 @@ import org.apache.hadoop.hdfs.server.namenode.startupprogress.Status; import org.apache.hadoop.hdfs.server.namenode.startupprogress.Step; import org.apache.hadoop.hdfs.server.namenode.startupprogress.StepType; import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocols; +import org.apache.hadoop.http.HttpConfig; import org.apache.hadoop.io.Text; import org.apache.hadoop.net.NodeBase; import org.apache.hadoop.security.UserGroupInformation; @@ -738,11 +740,11 @@ class NamenodeJspHelper { } private void generateNodeDataHeader(JspWriter out, DatanodeDescriptor d, - String suffix, boolean alive, int nnHttpPort, String nnaddr, String scheme) + String suffix, boolean alive, int nnInfoPort, String nnaddr, String scheme) throws IOException { // from nn_browsedfscontent.jsp: String url = "///" + JspHelper.Url.authority(scheme, d) - + "/browseDirectory.jsp?namenodeInfoPort=" + nnHttpPort + "&dir=" + + "/browseDirectory.jsp?namenodeInfoPort=" + nnInfoPort + "&dir=" + URLEncoder.encode("/", "UTF-8") + JspHelper.getUrlParam(JspHelper.NAMENODE_ADDRESS, nnaddr); @@ -759,9 +761,9 @@ class NamenodeJspHelper { } void generateDecommissioningNodeData(JspWriter out, DatanodeDescriptor d, - String suffix, boolean alive, int nnHttpPort, String nnaddr, String scheme) + String suffix, boolean alive, int nnInfoPort, String nnaddr, String scheme) throws IOException { - generateNodeDataHeader(out, d, suffix, alive, nnHttpPort, nnaddr, scheme); + generateNodeDataHeader(out, d, suffix, alive, nnInfoPort, nnaddr, scheme); if (!alive) { return; } @@ -785,7 +787,7 @@ class NamenodeJspHelper { } void generateNodeData(JspWriter out, DatanodeDescriptor d, String suffix, - boolean alive, int nnHttpPort, String nnaddr, String scheme) throws IOException { + boolean alive, int nnInfoPort, String nnaddr, String scheme) throws IOException { /* * 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 @@ -797,7 +799,7 @@ class NamenodeJspHelper { * interact with datanodes. */ - generateNodeDataHeader(out, d, suffix, alive, nnHttpPort, nnaddr, scheme); + generateNodeDataHeader(out, d, suffix, alive, nnInfoPort, nnaddr, scheme); if (!alive) { out.print("