瀏覽代碼

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

(cherry picked from commit d2c3a56ad8cd331040d737d0da23d1cd108987a4)
Kihwal Lee 7 年之前
父節點
當前提交
c78dbefd47

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

@@ -121,6 +121,7 @@ public class DatanodeHttpServer implements Closeable {
     builder.configureXFrame(xFrameEnabled).setXFrameOption(xFrameOptionValue);
 
     this.infoServer = builder.build();
+    this.infoServer.setAttribute(HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 
     this.infoServer.addInternalServlet(null, "/streamFile/*", StreamFile.class);
     this.infoServer.addInternalServlet(null, "/getFileChecksum/*",