diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7b52d55c9a..15585f3695 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -214,6 +214,9 @@ Release 2.0.1-alpha - UNRELEASED HDFS-1153. dfsnodelist.jsp should handle invalid input parameters. (Ravi Phulari via eli) + HDFS-3434. InvalidProtocolBufferException when visiting DN + browseDirectory.jsp (eli) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java index 2e62b8a109..2798a83bf8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java @@ -165,9 +165,9 @@ private Map getAuthFilterParams(Configuration conf) httpServer.setAttribute("datanode.https.port", datanodeSslPort .getPort()); } - httpServer.setAttribute("name.node", nn); - httpServer.setAttribute("name.node.address", bindAddress); - httpServer.setAttribute("name.system.image", nn.getFSImage()); + httpServer.setAttribute(NAMENODE_ATTRIBUTE_KEY, nn); + httpServer.setAttribute(NAMENODE_ADDRESS_ATTRIBUTE_KEY, nn.getNameNodeAddress()); + httpServer.setAttribute(FSIMAGE_ATTRIBUTE_KEY, nn.getFSImage()); httpServer.setAttribute(JspHelper.CURRENT_CONF, conf); setupServlets(httpServer, conf); httpServer.start(); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java index eda9f61e53..c7fafdb13b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/common/TestJspHelper.java @@ -114,7 +114,7 @@ private void verifyServiceInToken(ServletContext context, UserGroupInformation ugi = JspHelper.getUGI(context, request, conf); Token tokenInUgi = ugi.getTokens().iterator() .next(); - Assert.assertEquals(tokenInUgi.getService().toString(), expected); + Assert.assertEquals(expected, tokenInUgi.getService().toString()); }