浏览代码

HDFS-13195. DataNode conf page cannot display the current value after reconfig. Contributed by maobaolong.

(cherry picked from commit 66461ed98b0b2f630b682bff927dbd74c251c26e)
(cherry picked from commit c245eceddad8883103df30bbff9a285798f29fdf)
Kihwal Lee 7 年之前
父节点
当前提交
c05dd318bf

+ 1 - 0
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java

@@ -120,6 +120,7 @@ public class DatanodeHttpServer implements Closeable {
 
     this.infoServer = builder.build();
 
+    this.infoServer.setAttribute(HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
     this.infoServer.setAttribute("datanode", datanode);
     this.infoServer.setAttribute(JspHelper.CURRENT_CONF, conf);
     this.infoServer.addServlet(null, "/blockScannerReport",