From d2c3a56ad8cd331040d737d0da23d1cd108987a4 Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Thu, 22 Mar 2018 12:31:52 -0500 Subject: [PATCH] HDFS-13195. DataNode conf page cannot display the current value after reconfig. Contributed by maobaolong. (cherry picked from commit 66461ed98b0b2f630b682bff927dbd74c251c26e) Conflicts: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java --- .../hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java index a3b3b65b023..c44f7dae4a0 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/web/DatanodeHttpServer.java +++ b/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/*",