Hadoop Common
  1. Hadoop Common
  2. HADOOP-6103

Configuration clone constructor does not clone all the members.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.21.0
    • Component/s: conf
    • Labels:
      None

      Description

      Currently, Configuration(Configuration other) constructor does not clone all the members.
      It clones only resources, properties, overlay and finalParameters. It needs to clone loadDefaults, classLoader, defaultResources, quietmode.
      This resulted in bugs like HADOOP-4975

      1. patch-6103.txt
        2 kB
        Amareshwari Sriramadasu
      2. HADOOP-6103-branch-1.patch
        0.5 kB
        Amit Sela

        Issue Links

          Activity

          Hide
          Amareshwari Sriramadasu added a comment -

          defaultResources is a private static list. This need not be cloned.

          Show
          Amareshwari Sriramadasu added a comment - defaultResources is a private static list. This need not be cloned.
          Hide
          Amareshwari Sriramadasu added a comment -

          Patch with the fix

          Show
          Amareshwari Sriramadasu added a comment - Patch with the fix
          Hide
          Amareshwari Sriramadasu added a comment -

          test-patch result:

               [exec]
               [exec] +1 overall.
               [exec]
               [exec]     +1 @author.  The patch does not contain any @author tags.
               [exec]
               [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.
               [exec]
               [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
               [exec]
               [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
               [exec]
               [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
               [exec]
               [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
               [exec]
           

          ant test passed on my machine

          Show
          Amareshwari Sriramadasu added a comment - test-patch result: [exec] [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] ant test passed on my machine
          Hide
          Hadoop QA added a comment -

          +1 overall. Here are the results of testing the latest attachment
          http://issues.apache.org/jira/secure/attachment/12416171/patch-6103.txt
          against trunk revision 802224.

          +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 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 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.

          Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/testReport/
          Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
          Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/artifact/trunk/build/test/checkstyle-errors.html
          Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/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/12416171/patch-6103.txt against trunk revision 802224. +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 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 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. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/597/console This message is automatically generated.
          Hide
          Devaraj Das added a comment -

          I just committed this. Thanks, Amareshwari!

          Show
          Devaraj Das added a comment - I just committed this. Thanks, Amareshwari!
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Common-trunk #63 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/63/)
          . Clones the classloader as part of Configuration clone. Contributed by Amareshwari Sriramadasu.

          Show
          Hudson added a comment - Integrated in Hadoop-Common-trunk #63 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/63/ ) . Clones the classloader as part of Configuration clone. Contributed by Amareshwari Sriramadasu.
          Hide
          Amareshwari Sriramadasu added a comment -

          I ran all mapreduce and hdfs tests on my machine with the build http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/63/. All tests ran except TestRecoveryManager (due to MAPREDUCE-880) and TestReduceFetch (due to MAPREDUCE-884).

          Show
          Amareshwari Sriramadasu added a comment - I ran all mapreduce and hdfs tests on my machine with the build http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/63/ . All tests ran except TestRecoveryManager (due to MAPREDUCE-880 ) and TestReduceFetch (due to MAPREDUCE-884 ).
          Hide
          Devaraj Das added a comment -

          Committed the common jar to mapreduce and hdfs.

          Show
          Devaraj Das added a comment - Committed the common jar to mapreduce and hdfs.
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Hdfs-trunk #65 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/65/)

          Show
          Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #65 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/65/ )
          Hide
          Amit Sela added a comment -

          Adding cloning of classLoader and loadDefaults in copy constructor. For branch-1.

          Show
          Amit Sela added a comment - Adding cloning of classLoader and loadDefaults in copy constructor. For branch-1.
          Hide
          Tom White added a comment -

          Thanks for the patch, Amit. Can you port the unit test to the branch-1 patch too please?

          Show
          Tom White added a comment - Thanks for the patch, Amit. Can you port the unit test to the branch-1 patch too please?

            People

            • Assignee:
              Amareshwari Sriramadasu
              Reporter:
              Amareshwari Sriramadasu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development