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-20-3.patch
        9 kB
        Sreekanth Ramakrishnan
      2. mapreduce-979-3.patch
        11 kB
        Sreekanth Ramakrishnan
      3. mapreduce-979-20-2.patch
        9 kB
        Sreekanth Ramakrishnan
      4. mapreduce-979-2.patch
        11 kB
        Hemanth Yamijala
      5. mapreduce-979-1.patch
        5 kB
        Sreekanth Ramakrishnan
      6. mapreduce-979-1-20.patch
        3 kB
        Sreekanth Ramakrishnan

        Activity

        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/ )
        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
        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 !
        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
        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.
        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
        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
        Hemanth Yamijala added a comment -

        +1 for the changes.

        Show
        Hemanth Yamijala added a comment - +1 for the changes.
        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.
        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.
        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 -

        The changes look fine to me.

        Show
        Sreekanth Ramakrishnan added a comment - The changes look fine to me.
        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 ?
        Hide
        Sreekanth Ramakrishnan added a comment -

        Attaching patch for trunk.

        Show
        Sreekanth Ramakrishnan added a comment - Attaching patch for trunk.
        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.
        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.

          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