Hadoop Common
  1. Hadoop Common
  2. HADOOP-7851

Configuration.getClasses() never returns the default value.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.1, 0.24.0
    • Component/s: conf
    • Labels:
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Fixed Configuration.getClasses() API to return the default value if the key is not set.
    • Tags:
      configuration
    • Target Version/s:

      Description

      Configuration.getClasses() never returns the default value.

      1. HADOOP-7851.patch
        2 kB
        Uma Maheswara Rao G
      2. HADOOP-7851.patch
        2 kB
        Uma Maheswara Rao G
      3. HADOOP-7851.patch
        2 kB
        Uma Maheswara Rao G

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #983 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/983/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #983 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/983/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Build #185 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/185/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Build #185 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/185/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241724 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #163 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/163/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #163 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/163/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241724 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #950 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/950/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #950 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/950/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Commit #520 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/520/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Commit #520 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/520/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241724 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1699 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1699/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1699 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1699/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-0.23-Commit #516 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/516/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Common-0.23-Commit #516 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/516/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241724 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1688 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1688/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1688 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1688/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1762 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1762/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1762 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1762/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241722 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Commit #504 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/504/)
        HADOOP-7851. Moving to 0.23.1 section in CHANGES.txt

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

        • /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Commit #504 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/504/ ) HADOOP-7851 . Moving to 0.23.1 section in CHANGES.txt acmurthy : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1241724 Files : /hadoop/common/branches/branch-0.23/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #889 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/889/)
        Added Uma's name to the CHANGES.txt file for HADOOP-7851.
        HADOOP-7851. Configuration.getClasses() never returns the default value. (amarrk)

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #889 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/889/ ) Added Uma's name to the CHANGES.txt file for HADOOP-7851 . HADOOP-7851 . Configuration.getClasses() never returns the default value. (amarrk) amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212288 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212282 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #922 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/922/)
        Added Uma's name to the CHANGES.txt file for HADOOP-7851.
        HADOOP-7851. Configuration.getClasses() never returns the default value. (amarrk)

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #922 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/922/ ) Added Uma's name to the CHANGES.txt file for HADOOP-7851 . HADOOP-7851 . Configuration.getClasses() never returns the default value. (amarrk) amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212288 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212282 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Hide
        Uma Maheswara Rao G added a comment -

        Thanks Amar for the reviews.

        Show
        Uma Maheswara Rao G added a comment - Thanks Amar for the reviews.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1412 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1412/)
        Added Uma's name to the CHANGES.txt file for HADOOP-7851.

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1412 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1412/ ) Added Uma's name to the CHANGES.txt file for HADOOP-7851 . amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212288 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1411 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1411/)
        HADOOP-7851. Configuration.getClasses() never returns the default value. (amarrk)

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1411 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1411/ ) HADOOP-7851 . Configuration.getClasses() never returns the default value. (amarrk) amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212282 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1462 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1462/)
        Added Uma's name to the CHANGES.txt file for HADOOP-7851.

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1462 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1462/ ) Added Uma's name to the CHANGES.txt file for HADOOP-7851 . amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212288 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1388 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1388/)
        Added Uma's name to the CHANGES.txt file for HADOOP-7851.

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1388 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1388/ ) Added Uma's name to the CHANGES.txt file for HADOOP-7851 . amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212288 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1387 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1387/)
        HADOOP-7851. Configuration.getClasses() never returns the default value. (amarrk)

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1387 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1387/ ) HADOOP-7851 . Configuration.getClasses() never returns the default value. (amarrk) amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212282 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1461 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1461/)
        HADOOP-7851. Configuration.getClasses() never returns the default value. (amarrk)

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

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1461 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1461/ ) HADOOP-7851 . Configuration.getClasses() never returns the default value. (amarrk) amarrk : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1212282 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java
        Hide
        Amar Kamat added a comment -

        I just committed this to trunk. Thanks Uma!

        Show
        Amar Kamat added a comment - I just committed this to trunk. Thanks Uma!
        Hide
        Amar Kamat added a comment -

        +1. I will commit this.

        Show
        Amar Kamat added a comment - +1. I will commit this.
        Hide
        Uma Maheswara Rao G added a comment -
        • 1 javadoc. The javadoc tool appears to have generated 5 warning messages.

        Javadoc comments are again spurious.

        Show
        Uma Maheswara Rao G added a comment - 1 javadoc. The javadoc tool appears to have generated 5 warning messages. Javadoc comments are again spurious.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12506694/HADOOP-7851.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 javadoc. The javadoc tool appears to have generated 5 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 unit tests in .

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/455//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/455//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/12506694/HADOOP-7851.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 5 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 unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/455//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/455//console This message is automatically generated.
        Hide
        Uma Maheswara Rao G added a comment -

        -1 javadoc. The javadoc tool appears to have generated 9 warning messages.

        Javadoc comments are unrelated. sorry previous patch has problem, Tests should pass with this patch.

        Show
        Uma Maheswara Rao G added a comment - -1 javadoc. The javadoc tool appears to have generated 9 warning messages. Javadoc comments are unrelated. sorry previous patch has problem, Tests should pass with this patch.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12506628/HADOOP-7851.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 javadoc. The javadoc tool appears to have generated 9 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 failed these unit tests:
        org.apache.hadoop.conf.TestConfiguration
        org.apache.hadoop.http.TestHttpServer
        org.apache.hadoop.http.TestPathFilter
        org.apache.hadoop.http.TestGlobalFilter
        org.apache.hadoop.http.TestServletFilter
        org.apache.hadoop.conf.TestGetInstances

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/450//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/450//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/12506628/HADOOP-7851.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 9 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 failed these unit tests: org.apache.hadoop.conf.TestConfiguration org.apache.hadoop.http.TestHttpServer org.apache.hadoop.http.TestPathFilter org.apache.hadoop.http.TestGlobalFilter org.apache.hadoop.http.TestServletFilter org.apache.hadoop.conf.TestGetInstances +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/450//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/450//console This message is automatically generated.
        Hide
        Uma Maheswara Rao G added a comment -

        Thanks Amar for taking a look again.
        Ok, it is better than get. its little lighter

        Updated the patch by addressing the comments.

        kindly use

        Class<?>[] classes =
        config.getClasses("testClassName", Configuration.class);

        This is due to formatter. I am usiing hadoop formatter only. Manually i changed it.

        3. Instead of assertTrue, you can use assertEquals()
        Yes, assertEquals will give the values in trace when it is failing. But i included the value in error message.Since they are premitives i used assertTrue.
        Now i changed it to assertEquals.

        4. Kindly add a testcase for a value of "". The output should be an empty array.
        Added test for "".

        Amar, can you please take a look?

        Thanks
        Uma

        Show
        Uma Maheswara Rao G added a comment - Thanks Amar for taking a look again. Ok, it is better than get. its little lighter Updated the patch by addressing the comments. kindly use Class<?>[] classes = config.getClasses("testClassName", Configuration.class); This is due to formatter. I am usiing hadoop formatter only. Manually i changed it. 3. Instead of assertTrue, you can use assertEquals() Yes, assertEquals will give the values in trace when it is failing. But i included the value in error message.Since they are premitives i used assertTrue. Now i changed it to assertEquals. 4. Kindly add a testcase for a value of "". The output should be an empty array. Added test for "". Amar, can you please take a look? Thanks Uma
        Hide
        Amar Kamat added a comment -

        Uma, does it makes sense to use getRaw() instead. Something like

        if (null == getRaw(name)) {
          return defaultValue;
        }
        String[] classnames = getTrimmedStrings(name);
        
        Show
        Amar Kamat added a comment - Uma, does it makes sense to use getRaw() instead. Something like if ( null == getRaw(name)) { return defaultValue; } String [] classnames = getTrimmedStrings(name);
        Hide
        Uma Maheswara Rao G added a comment -

        Hi Amar, Thanks for the review.

        1. Instead of

        String[] classnames = StringUtils.getTrimmedStrings(valueString);
        use

        String[] classnames = getTrimmedStrings(name);

        get call will be executed multiple times if i use getTrimmedStrings(name).
        Because we should call get once for validating null and then call getTrimmedStrings. This api again will call get and passed to StringUtils.getTrimmedStrings. That is the reason i used directly StringUtils.getTrimmedStrings. do you agree with this?

        i will update the patch with other comments. Can you please confirm above one.

        Regards,
        Uma

        Show
        Uma Maheswara Rao G added a comment - Hi Amar, Thanks for the review. 1. Instead of String[] classnames = StringUtils.getTrimmedStrings(valueString); use String[] classnames = getTrimmedStrings(name); get call will be executed multiple times if i use getTrimmedStrings(name). Because we should call get once for validating null and then call getTrimmedStrings. This api again will call get and passed to StringUtils.getTrimmedStrings. That is the reason i used directly StringUtils.getTrimmedStrings. do you agree with this? i will update the patch with other comments. Can you please confirm above one. Regards, Uma
        Hide
        Amar Kamat added a comment -

        Some comments on the first patch.
        1. Instead of

        String[] classnames = StringUtils.getTrimmedStrings(valueString);
        

        use

        String[] classnames = getTrimmedStrings(name);
        

        2. In the testcase,

        Class<?>[] classes = config
                .getClasses("testClassName", Configuration.class);
        

        kindly use

        Class<?>[] classes = 
            config.getClasses("testClassName", Configuration.class);
        

        3. Instead of assertTrue, you can use assertEquals()
        4. Kindly add a testcase for a value of "". The output should be an empty array.

        Show
        Amar Kamat added a comment - Some comments on the first patch. 1. Instead of String [] classnames = StringUtils.getTrimmedStrings(valueString); use String [] classnames = getTrimmedStrings(name); 2. In the testcase, Class <?>[] classes = config .getClasses( "testClassName" , Configuration.class); kindly use Class <?>[] classes = config.getClasses( "testClassName" , Configuration.class); 3. Instead of assertTrue, you can use assertEquals() 4. Kindly add a testcase for a value of "". The output should be an empty array.
        Hide
        Uma Maheswara Rao G added a comment -

        Yes Amar,
        My first pacth should adderss your comment. But i used directly StringUtils api directly. So, that i could avaoid two times get invokation.

        But coming to harsh comment, i thought to raise your point. But i could'nt find any usecase for setting "" for classnames. Do we have some use cases? If so, we can prefer 1st patch itself.

        Thanks
        Uma

        Show
        Uma Maheswara Rao G added a comment - Yes Amar, My first pacth should adderss your comment. But i used directly StringUtils api directly. So, that i could avaoid two times get invokation. But coming to harsh comment, i thought to raise your point. But i could'nt find any usecase for setting "" for classnames. Do we have some use cases? If so, we can prefer 1st patch itself. Thanks Uma
        Hide
        Amar Kamat added a comment -

        Not setting a value for a configuration parameter is different from setting it to "". Hence when the parameter is not set, the default value should be returned. When the parameter is set (including "") then the specified value should be returned and not the default. Hence a simple check before invoking getTrimmedStrings() should suffice.

        Show
        Amar Kamat added a comment - Not setting a value for a configuration parameter is different from setting it to "". Hence when the parameter is not set, the default value should be returned. When the parameter is set (including "") then the specified value should be returned and not the default. Hence a simple check before invoking getTrimmedStrings() should suffice.
        Hide
        Uma Maheswara Rao G added a comment -

        Javadoc comments are not from this patch! let me check.

        Show
        Uma Maheswara Rao G added a comment - Javadoc comments are not from this patch! let me check.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12505028/HADOOP-7851.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 javadoc. The javadoc tool appears to have generated 15 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 unit tests in .

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/406//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/406//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/12505028/HADOOP-7851.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 15 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 unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/406//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/406//console This message is automatically generated.
        Hide
        Uma Maheswara Rao G added a comment -

        For 23 branch, we can directly merge the trunk patch because there is no code mismatches.

        Show
        Uma Maheswara Rao G added a comment - For 23 branch, we can directly merge the trunk patch because there is no code mismatches.
        Hide
        Uma Maheswara Rao G added a comment -

        Can we not test instead for an empty array and return the default value? This way we properly reuse the getTrimmedStrings function thats already present, instead of directly calling out the StringUtils one.

        This also should work.

        This problem exists in 0.20-security as well. Would love it if you can post a patch for that as well?

        In 20Security205, getStrings itself will return null if collection is empty.

        Collection<String> values = getStringCollection(str);
        if(values.size() == 0)

        { return null; }

        I dont see problem here. Am i missing some thing here?

        Show
        Uma Maheswara Rao G added a comment - Can we not test instead for an empty array and return the default value? This way we properly reuse the getTrimmedStrings function thats already present, instead of directly calling out the StringUtils one. This also should work. This problem exists in 0.20-security as well. Would love it if you can post a patch for that as well? In 20Security205, getStrings itself will return null if collection is empty. Collection<String> values = getStringCollection(str); if(values.size() == 0) { return null; } I dont see problem here. Am i missing some thing here?
        Hide
        Harsh J added a comment -

        This problem exists in 0.20-security as well. Would love it if you can post a patch for that as well?

        Show
        Harsh J added a comment - This problem exists in 0.20-security as well. Would love it if you can post a patch for that as well?
        Hide
        Harsh J added a comment -

        Can we not test instead for an empty array and return the default value? This way we properly reuse the getTrimmedStrings function thats already present, instead of directly calling out the StringUtils one.

        Show
        Harsh J added a comment - Can we not test instead for an empty array and return the default value? This way we properly reuse the getTrimmedStrings function thats already present, instead of directly calling out the StringUtils one.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12505005/HADOOP-7851.patch
        against trunk revision .

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        -1 javadoc. The javadoc tool appears to have generated 15 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 unit tests in .

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

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/405//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/405//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/12505005/HADOOP-7851.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 15 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 unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/405//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/405//console This message is automatically generated.
        Hide
        Uma Maheswara Rao G added a comment -

        Updated the patch for trunk!

        Show
        Uma Maheswara Rao G added a comment - Updated the patch for trunk!
        Hide
        Amar Kamat added a comment -

        I think, the fix should be something like

        diff --git hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java hadoop-common-project/hadoop-common/src
        index a3d4de0..2c90493 100644
        --- hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
        +++ hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
        @@ -1145,6 +1145,10 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
            *         or <code>defaultValue</code>. 
            */
           public Class<?>[] getClasses(String name, Class<?> ... defaultValue) {
        +    // return the default value if the parameter is missing
        +    if (get(name) == null) {
        +      return defaultValue;
        +    }
             String[] classnames = getTrimmedStrings(name);
             if (classnames == null)
               return defaultValue;
        
        Show
        Amar Kamat added a comment - I think, the fix should be something like diff --git hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java hadoop-common-project/hadoop-common/src index a3d4de0..2c90493 100644 --- hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java +++ hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java @@ -1145,6 +1145,10 @@ public class Configuration implements Iterable<Map.Entry<String,String>>, * or <code>defaultValue</code>. */ public Class<?>[] getClasses(String name, Class<?> ... defaultValue) { + // return the default value if the parameter is missing + if (get(name) == null) { + return defaultValue; + } String[] classnames = getTrimmedStrings(name); if (classnames == null) return defaultValue;
        Hide
        Amar Kamat added a comment -

        Configuration.getClasses() internally uses getTrimmedStrings() which returns an empty array in case the parameter value is not specified.

        Show
        Amar Kamat added a comment - Configuration.getClasses() internally uses getTrimmedStrings() which returns an empty array in case the parameter value is not specified.

          People

          • Assignee:
            Uma Maheswara Rao G
            Reporter:
            Amar Kamat
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development