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

o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.21.0, 0.22.0, 0.23.0, 0.23.1, 2.0.0-alpha
    • Fix Version/s: 0.23.1
    • Component/s: None
    • Labels:

      Description

      0.21 mapreduce.Reducer introduced a blind cast to ReduceContext.ValueIterator. There should an instanceof check around this block to ensure we don't throw a CastClassException:

             // If a back up store is used, reset it
            ((ReduceContext.ValueIterator)
                (context.getValues().iterator())).resetBackupStore();
      

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #891 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/891/)
        MAPREDUCE-3344. o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland.

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

        • /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #891 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/891/ ) MAPREDUCE-3344 . o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198910 Files : /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #857 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/857/)
        MAPREDUCE-3344. o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland.

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

        • /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #857 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/857/ ) MAPREDUCE-3344 . o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198910 Files : /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #70 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/70/)
        Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344.

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

        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #70 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/70/ ) Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344 . tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198914 Files : /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Build #84 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/84/)
        Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344.

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

        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Build #84 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/84/ ) Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344 . tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198914 Files : /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1274 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1274/)
        MAPREDUCE-3344. o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland.

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

        • /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1274 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1274/ ) MAPREDUCE-3344 . o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198910 Files : /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Commit #163 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/163/)
        Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344.

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

        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Commit #163 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/163/ ) Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344 . tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198914 Files : /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-0.23-Commit #152 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/152/)
        Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344.

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

        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-0.23-Commit #152 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/152/ ) Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344 . tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198914 Files : /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1252 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1252/)
        MAPREDUCE-3344. o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland.

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

        • /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1252 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1252/ ) MAPREDUCE-3344 . o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198910 Files : /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Commit #151 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/151/)
        Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344.

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

        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Commit #151 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/151/ ) Merge -r 1198909:1198910 from trunk to branch-0.23. Fixes: MAPREDUCE-3344 . tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198914 Files : /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1326 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1326/)
        MAPREDUCE-3344. o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland.

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

        • /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1326 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1326/ ) MAPREDUCE-3344 . o.a.h.mapreduce.Reducer since 0.21 blindly casts to ReduceContext.ValueIterator. Contributed by Brock Noland. tomwhite : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1198910 Files : /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Reducer.java
        Hide
        Tom White added a comment -

        I've just committed this. Thanks, Brock!

        Show
        Tom White added a comment - I've just committed this. Thanks, Brock!
        Hide
        Hadoop QA added a comment -

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

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

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

        Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1251//testReport/
        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1251//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/12502254/MAPREDUCE-3344-1.patch against trunk revision . +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 unit tests in . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1251//testReport/ Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1251//console This message is automatically generated.
        Hide
        Tom White added a comment -

        +1

        Show
        Tom White added a comment - +1
        Hide
        Brock Noland added a comment -

        Patch is ready for review.

        Show
        Brock Noland added a comment - Patch is ready for review.
        Hide
        Brock Noland added a comment -

        Attached is a patch which wraps the cast in an instanceof thereby avoiding a possible cast class exception.

        Show
        Brock Noland added a comment - Attached is a patch which wraps the cast in an instanceof thereby avoiding a possible cast class exception.

          People

          • Assignee:
            Brock Noland
            Reporter:
            Brock Noland
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development