Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: datanode, hdfs-client, namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Remove hardcoded config keys in hdfs code. Will do it in a separate jira for test code.

      1. HDFS-2198.1.patch
        24 kB
        Suresh Srinivas
      2. HDFS-2198.patch
        24 kB
        Suresh Srinivas

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #738 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/738/)
        HDFS-2198. Remove hardcoded configuration keys. Contributed by Suresh Srinivas.

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151501
        Files :

        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSClient.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #738 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/738/ ) HDFS-2198 . Remove hardcoded configuration keys. Contributed by Suresh Srinivas. suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151501 Files : /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSClient.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #809 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/809/)
        HDFS-2198. Remove hardcoded configuration keys. Contributed by Suresh Srinivas.

        suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151501
        Files :

        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSClient.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #809 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/809/ ) HDFS-2198 . Remove hardcoded configuration keys. Contributed by Suresh Srinivas. suresh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1151501 Files : /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/DFSClient.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
        Hide
        Suresh Srinivas added a comment -

        I committed the patch.

        Show
        Suresh Srinivas added a comment - I committed the patch.
        Hide
        Suresh Srinivas added a comment -

        Not adding tests as this is just changing hardcoded strings to constants.

        Show
        Suresh Srinivas added a comment - Not adding tests as this is just changing hardcoded strings to constants.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12487933/HDFS-2198.1.patch
        against trunk revision 1151339.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1034//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1034//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1034//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12487933/HDFS-2198.1.patch against trunk revision 1151339. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1034//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1034//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1034//console This message is automatically generated.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good.

        Show
        Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
        Hide
        Suresh Srinivas added a comment -

        Updated patch to address comment. Also removes hardcoded value to the default param value.

        Show
        Suresh Srinivas added a comment - Updated patch to address comment. Also removes hardcoded value to the default param value.
        Hide
        Suresh Srinivas added a comment -

        Thanks for catching that. I will review my patch once again to avoid this kind of bugs.

        Show
        Suresh Srinivas added a comment - Thanks for catching that. I will review my patch once again to avoid this kind of bugs.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        typo: thought => through

        Show
        Tsz Wo Nicholas Sze added a comment - typo: thought => through
        Hide
        Tsz Wo Nicholas Sze added a comment -

        Went thought it one more time. Found a bug: should be DFS_DATANODE_IPC_ADDRESS_KEY.

        -        this.getConf().get("dfs.datanode.ipc.address"));
        +        this.getConf().get(DFS_DATANODE_IPC_ADDRESS_DEFAULT));
        
        Show
        Tsz Wo Nicholas Sze added a comment - Went thought it one more time. Found a bug: should be DFS_DATANODE_IPC_ADDRESS_KEY. - this .getConf().get( "dfs.datanode.ipc.address" )); + this .getConf().get(DFS_DATANODE_IPC_ADDRESS_DEFAULT));
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good.

        Show
        Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
        Hide
        Suresh Srinivas added a comment -
        1. Fixed several hardcoded config keys
        2. In files where DFSConfigKeys is heavily used, static imported DFSConfigKeys for better readability
        Show
        Suresh Srinivas added a comment - Fixed several hardcoded config keys In files where DFSConfigKeys is heavily used, static imported DFSConfigKeys for better readability

          People

          • Assignee:
            Suresh Srinivas
            Reporter:
            Suresh Srinivas
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development