Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-979

JobConf.getMemoryFor{Map|Reduce}Task doesn't fallback to newer config knobs when mapred.taskmaxvmem is set to DISABLED_MEMORY_LIMIT of -1

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.20.1
    • Fix Version/s: 0.20.2
    • Component/s: jobtracker, tasktracker
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Added support to fallback to new task memory configuration when deprecated memory configuration values are set to disabled.

      Description

      JobConf.getMemoryFor

      {Map|Reduce}

      Task doesn't fallback to newer config knobs when mapred.taskmaxvmem is set to DISABLED_MEMORY_LIMIT of -1, this results in failed job-submissions when mapred-default.xml has the default value of -1.

      1. mapreduce-979-1.patch
        5 kB
        Sreekanth Ramakrishnan
      2. mapreduce-979-1-20.patch
        3 kB
        Sreekanth Ramakrishnan
      3. mapreduce-979-2.patch
        11 kB
        Hemanth Yamijala
      4. mapreduce-979-20-2.patch
        9 kB
        Sreekanth Ramakrishnan
      5. mapreduce-979-20-3.patch
        9 kB
        Sreekanth Ramakrishnan
      6. mapreduce-979-3.patch
        11 kB
        Sreekanth Ramakrishnan

        Activity

        Arun C Murthy created issue -
        Arun C Murthy made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Blocker [ 1 ]
        Hide
        Hemanth Yamijala added a comment -

        To be clear, mapred-default in hadoop is updated to not have mapred.task.maxvmem. However, M/R applications like PIG could bundle their own mapred-default which, if not updated, would break.

        Show
        Hemanth Yamijala added a comment - To be clear, mapred-default in hadoop is updated to not have mapred.task.maxvmem. However, M/R applications like PIG could bundle their own mapred-default which, if not updated, would break.
        Hide
        Sreekanth Ramakrishnan added a comment -

        Attaching patch fixing this issue:

        if the old key is set to disabled memory limit we fall back to new value.

        Show
        Sreekanth Ramakrishnan added a comment - Attaching patch fixing this issue: if the old key is set to disabled memory limit we fall back to new value.
        Sreekanth Ramakrishnan made changes -
        Attachment mapreduce-979-1-20.patch [ 12420981 ]
        Hide
        Sreekanth Ramakrishnan added a comment -

        Attaching patch for trunk.

        Show
        Sreekanth Ramakrishnan added a comment - Attaching patch for trunk.
        Sreekanth Ramakrishnan made changes -
        Attachment mapreduce-979-1.patch [ 12420982 ]
        Hide
        Hemanth Yamijala added a comment -

        The attached patch (mapreduce-979-2.patch) has some modifications I did as part of the review. These include:

        • Refactoring the code in getMemoryForMapTask, getMemoryForReduceTask and getDeprecatedMemoryValue. Specifically the last one, I made it return only the deprecated value, or disabled value if deprecated keys are not defined.
        • Fixed a bug in getDeprecatedMemoryValue to handle normalization of the config values.
        • Modified getMaxVirtualMemoryForTask to behave similarly as the new APIs. So, they return the new values if the deprecated values are undefined.
        • Updated Javadocs for the public APIs
        • Added unit tests for the negative values in configuration.

        Sreekanth, can you please check if these changes are fine ?

        Show
        Hemanth Yamijala added a comment - The attached patch (mapreduce-979-2.patch) has some modifications I did as part of the review. These include: Refactoring the code in getMemoryForMapTask, getMemoryForReduceTask and getDeprecatedMemoryValue. Specifically the last one, I made it return only the deprecated value, or disabled value if deprecated keys are not defined. Fixed a bug in getDeprecatedMemoryValue to handle normalization of the config values. Modified getMaxVirtualMemoryForTask to behave similarly as the new APIs. So, they return the new values if the deprecated values are undefined. Updated Javadocs for the public APIs Added unit tests for the negative values in configuration. Sreekanth, can you please check if these changes are fine ?
        Hemanth Yamijala made changes -
        Attachment mapreduce-979-2.patch [ 12421417 ]
        Hide
        Sreekanth Ramakrishnan added a comment -

        The changes look fine to me.

        Show
        Sreekanth Ramakrishnan added a comment - The changes look fine to me.
        Sreekanth Ramakrishnan made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12421417/mapreduce-979-2.patch
        against trunk revision 819740.

        +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 failed core unit tests.

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

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/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/12421417/mapreduce-979-2.patch against trunk revision 819740. +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 failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h3.grid.sp2.yahoo.net/66/console This message is automatically generated.
        Hide
        Sreekanth Ramakrishnan added a comment -

        Attached patch for 20 branch.

        The patch applies directly on 21.

        Show
        Sreekanth Ramakrishnan added a comment - Attached patch for 20 branch. The patch applies directly on 21.
        Sreekanth Ramakrishnan made changes -
        Attachment mapreduce-979-20-2.patch [ 12421612 ]
        Hide
        Sreekanth Ramakrishnan added a comment -

        Fixing a small javadoc change, changing org.apache.hadoop.mapred.JobConf.getMemoryForReduceTask() to read correctly.

        Show
        Sreekanth Ramakrishnan added a comment - Fixing a small javadoc change, changing org.apache.hadoop.mapred.JobConf.getMemoryForReduceTask() to read correctly.
        Sreekanth Ramakrishnan made changes -
        Attachment mapreduce-979-3.patch [ 12421841 ]
        Sreekanth Ramakrishnan made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Sreekanth Ramakrishnan made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hemanth Yamijala added a comment -

        +1 for the changes.

        Show
        Hemanth Yamijala added a comment - +1 for the changes.
        Hide
        Hemanth Yamijala added a comment -

        +1 for the 20 patch, other than the correction in the javadoc similar to what's been applied for trunk. Please upload a corresponding 20 patch once the trunk patch passes Hudson.

        Show
        Hemanth Yamijala added a comment - +1 for the 20 patch, other than the correction in the javadoc similar to what's been applied for trunk. Please upload a corresponding 20 patch once the trunk patch passes Hudson.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12421841/mapreduce-979-3.patch
        against trunk revision 824238.

        +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 failed core unit tests.

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

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/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/12421841/mapreduce-979-3.patch against trunk revision 824238. +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 failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/159/console This message is automatically generated.
        Hide
        Sreekanth Ramakrishnan added a comment -

        Attaching branch 20 version of the patch.

        Show
        Sreekanth Ramakrishnan added a comment - Attaching branch 20 version of the patch.
        Sreekanth Ramakrishnan made changes -
        Attachment mapreduce-979-20-3.patch [ 12421852 ]
        Hide
        Hemanth Yamijala added a comment -

        Verified the diff in the 20 patch. +1. The test failure is tracked in MAPREDUCE-1029 and unrelated to this patch. I will commit this.

        Show
        Hemanth Yamijala added a comment - Verified the diff in the 20 patch. +1. The test failure is tracked in MAPREDUCE-1029 and unrelated to this patch. I will commit this.
        Hide
        Hemanth Yamijala added a comment -

        I committed this to trunk, branch 0.21 and branch 0.20. Thanks, Sreekanth !

        Show
        Hemanth Yamijala added a comment - I committed this to trunk, branch 0.21 and branch 0.20. Thanks, Sreekanth !
        Hemanth Yamijala made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Assignee Sreekanth Ramakrishnan [ sreekanth ]
        Resolution Fixed [ 1 ]
        Sreekanth Ramakrishnan made changes -
        Release Note Support the fallback to newer task memory configuration keys when older memory configuration keys are set to default disabled.
        Hemanth Yamijala made changes -
        Release Note Support the fallback to newer task memory configuration keys when older memory configuration keys are set to default disabled. Added support to fallback to new task memory configuration when deprecated memory configuration values are set to disabled.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #72 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/72/)
        . Fixed JobConf APIs related to memory parameters to return values of new configuration variables when deprecated variables are disabled. Contributed by Sreekanth Ramakrishnan.

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #72 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/72/ ) . Fixed JobConf APIs related to memory parameters to return values of new configuration variables when deprecated variables are disabled. Contributed by Sreekanth Ramakrishnan.
        Hide
        Hudson added a comment -

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

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #112 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Mapreduce-trunk/112/ )

          People

          • Assignee:
            Sreekanth Ramakrishnan
            Reporter:
            Arun C Murthy
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development