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

Trim the user config of `dfs.ha.namenode.id`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 2.7.1
    • None
    • ha
    • None

    Description

      In hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/HAUtil.java, we trim the config value of parameter dfs.ha.namenode.id in one place but not the other.

        public static String getNameNodeId(Configuration conf, String nsId) {
          String namenodeId = conf.getTrimmed(DFS_HA_NAMENODE_ID_KEY);
          ...  
      
        public static List<String> getNameNodeIdOfOtherNodes(Configuration conf, String nsId) {
          ...
          String myNNId = conf.get(DFSConfigKeys.DFS_HA_NAMENODE_ID_KEY);
          ...
      

      The latter one would cause problem if the user's configs contains extra space.

      Attachments

        1. HDFS-9693.000.patch
          0.9 kB
          Tianyin Xu

        Activity

          People

            Unassigned Unassigned
            tianyin Tianyin Xu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: