Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-13195

DataNode conf page cannot display the current value after reconfig

    XMLWordPrintableJSON

Details

    • Reviewed

    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.

      Attachments

        1. HDFS-13195.001.patch
          1 kB
          Baolong Mao
        2. HDFS-13195.002.patch
          0.9 kB
          Baolong Mao
        3. HDFS-13195-branch-2.7.001.patch
          1 kB
          Baolong Mao
        4. HDFS-13195-branch-2.7.002.patch
          0.9 kB
          Baolong Mao

        Activity

          People

            maobaolong Baolong Mao
            maobaolong Baolong Mao
            Votes:
            2 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: