Forráskód Böngészése

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

(cherry picked from commit d2c3a56ad8cd331040d737d0da23d1cd108987a4)
Kihwal Lee 7 éve
szülő
commit
85502d38ab

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -42,6 +42,9 @@ Release 2.7.6 - UNRELEASED
     HDFS-4210. Throw helpful exception when DNS entry for JournalNode cannot be
     resolved. (Charles Lamb and John Zhuge)
 
+    HDFS-13195. DataNode conf page cannot display the current value after
+    reconfig. (Mao Baolong via kihwal)
+
 Release 2.7.5 - 2017-12-14
 
   INCOMPATIBLE CHANGES

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

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