Details
Description
Now the branch-2.7 support dfs.datanode.data.dir reconfig, but after i reconfig this key, the conf page's value is still the old config value.
The reason is that:
public DatanodeHttpServer(final Configuration conf, final DataNode datanode, final ServerSocketChannel externalHttpChannel) throws IOException { this.conf = conf; Configuration confForInfoServer = new Configuration(conf); confForInfoServer.setInt(HttpServer2.HTTP_MAX_THREADS, 10); HttpServer2.Builder builder = new HttpServer2.Builder() .setName("datanode") .setConf(confForInfoServer) .setACL(new AccessControlList(conf.get(DFS_ADMIN, " "))) .hostName(getHostnameForSpnegoPrincipal(confForInfoServer)) .addEndpoint(URI.create("http://localhost:0")) .setFindPort(true); this.infoServer = builder.build();
The confForInfoServer is a new configuration instance, while the dfsadmin reconfig the datanode's config, the config result cannot reflect to confForInfoServer, so we should use the datanode's conf.