Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-6191

TestJavaSerialization fails with getting incorrect MR job result

    Details

    • Type: Test
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 2.7.3, 2.6.5, 3.0.0-alpha1
    • Component/s: test
    • Labels:
      None

      Description

      TestJavaSerialization#testMapReduceJob() fails with getting incorrect MR job result:
      "junit.framework.ComparisonFailure: expected:<[a ]1> but was:<[0 1]1>"

        Activity

        Hide
        sam liu sam liu added a comment -

        [A] Reason of failure:
        Before executing the UT, there is already a file under the INPUT_DIR used as the MR input dir, such as 'hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/target/test-dir/input/0'. So the MR result is incorrect, as the input dir includes extra file.

        [B] Solution:
        Update UT code to remove the whole INPUT_DIR before execution, not only removing INPUT_FILE. (I did such tests and they all passed)

        Show
        sam liu sam liu added a comment - [A] Reason of failure: Before executing the UT, there is already a file under the INPUT_DIR used as the MR input dir, such as 'hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/target/test-dir/input/0'. So the MR result is incorrect, as the input dir includes extra file. [B] Solution: Update UT code to remove the whole INPUT_DIR before execution, not only removing INPUT_FILE. (I did such tests and they all passed)
        Hide
        sam liu sam liu added a comment -

        Remove the whole INPUT_DIR before runing MR job, not only remove the INPUT_FILE. This enhancement will also remove other unexpected files under INPUT_DIR.

        Show
        sam liu sam liu added a comment - Remove the whole INPUT_DIR before runing MR job, not only remove the INPUT_FILE. This enhancement will also remove other unexpected files under INPUT_DIR.
        Hide
        sam liu sam liu added a comment -

        Before running the UT, to remove the whole INPUT_DIR, not only the INPUT_FILE. This enhancement will clean other unexpected files under folder INPUT_DIR.

        Show
        sam liu sam liu added a comment - Before running the UT, to remove the whole INPUT_DIR, not only the INPUT_FILE. This enhancement will clean other unexpected files under folder INPUT_DIR.
        Hide
        sam liu sam liu added a comment -

        I ran some tests after applying this patch and they all passed.

        Show
        sam liu sam liu added a comment - I ran some tests after applying this patch and they all passed.
        Hide
        hadoopqa Hadoop QA added a comment -

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

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

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

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The following test timeouts occurred in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient:

        org.apache.hadoop.mapreduce.lib.output.TestJobOutputCommitter

        Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5072//testReport/
        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5072//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12686433/MAPREDUCE-6191.patch against trunk revision 9a44db4. +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The following test timeouts occurred in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient: org.apache.hadoop.mapreduce.lib.output.TestJobOutputCommitter Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5072//testReport/ Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5072//console This message is automatically generated.
        Hide
        sam liu sam liu added a comment -

        In the latest test result, this UT passed and the patch works well.
        Running org.apache.hadoop.mapred.TestJavaSerialization
        Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.204 sec - in org.apache.hadoop.mapred.TestJavaSerialization

        https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5072//consoleFull

        Show
        sam liu sam liu added a comment - In the latest test result, this UT passed and the patch works well. Running org.apache.hadoop.mapred.TestJavaSerialization Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.204 sec - in org.apache.hadoop.mapred.TestJavaSerialization https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/5072//consoleFull
        Hide
        eyang Eric Yang added a comment -

        +1 looks good.

        Show
        eyang Eric Yang added a comment - +1 looks good.
        Hide
        eyang Eric Yang added a comment -

        I just committed this, thanks Sam.

        Show
        eyang Eric Yang added a comment - I just committed this, thanks Sam.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #6727 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6727/)
        MAPREDUCE-6191. Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675)

        • hadoop-mapreduce-project/CHANGES.txt
        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #6727 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6727/ ) MAPREDUCE-6191 . Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675) hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #43 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/43/)
        MAPREDUCE-6191. Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675)

        • hadoop-mapreduce-project/CHANGES.txt
        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #43 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/43/ ) MAPREDUCE-6191 . Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675) hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #777 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/777/)
        MAPREDUCE-6191. Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675)

        • hadoop-mapreduce-project/CHANGES.txt
        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #777 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/777/ ) MAPREDUCE-6191 . Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675) hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #1994 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1994/)
        MAPREDUCE-6191. Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675)

        • hadoop-mapreduce-project/CHANGES.txt
        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1994 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1994/ ) MAPREDUCE-6191 . Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675) hadoop-mapreduce-project/CHANGES.txt hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk #1975 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1975/)
        MAPREDUCE-6191. Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675)

        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        • hadoop-mapreduce-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1975 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1975/ ) MAPREDUCE-6191 . Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java hadoop-mapreduce-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #40 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/40/)
        MAPREDUCE-6191. Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675)

        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        • hadoop-mapreduce-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #40 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/40/ ) MAPREDUCE-6191 . Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java hadoop-mapreduce-project/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #44 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/44/)
        MAPREDUCE-6191. Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675)

        • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java
        • hadoop-mapreduce-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #44 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/44/ ) MAPREDUCE-6191 . Improve clearing stale state of Java serialization (eyang: rev c379e102ddab1b83fd69e4492a40c9901fb50675) hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestJavaSerialization.java hadoop-mapreduce-project/CHANGES.txt
        Hide
        eyang Eric Yang added a comment -

        Jenkins failure is not related to this commit. There are changes since December 12 which is breaking trunk:

        HADOOP-11353. Add support for .hadooprc (aw) (detail)
        YARN-2917. Fixed potential deadlock when system.exit is called in AsyncDispatcher. Contributed by Rohith Sharmaks (detail)
        HDFS-7515. Fix new findbugs warnings in hadoop-hdfs. Contributed by Haohui Mai. (detail)
        HADOOP-11211. mapreduce.job.classloader.system.classes semantics should be order-independent. (Yitong Zhou via gera) (detail)
        HDFS-7449. Add metrics to NFS gateway. Contributed by Brandon Li (detail)
        HADOOP-11389. Clean up byte to string encoding issues in hadoop-common. Contributed by Haohui Mai. (detail)
        HDFS-7497. Inconsistent report of decommissioning DataNodes between dfsadmin and NameNode webui. Contributed by Yongjun Zhang. (detail)
        MAPREDUCE-6046. Change the class name for logs in RMCommunicator. (detail)
        YARN-2243. Order of arguments for Preconditions.checkNotNull() is wrong in (detail)

        Show
        eyang Eric Yang added a comment - Jenkins failure is not related to this commit. There are changes since December 12 which is breaking trunk: HADOOP-11353 . Add support for .hadooprc (aw) (detail) YARN-2917 . Fixed potential deadlock when system.exit is called in AsyncDispatcher. Contributed by Rohith Sharmaks (detail) HDFS-7515 . Fix new findbugs warnings in hadoop-hdfs. Contributed by Haohui Mai. (detail) HADOOP-11211 . mapreduce.job.classloader.system.classes semantics should be order-independent. (Yitong Zhou via gera) (detail) HDFS-7449 . Add metrics to NFS gateway. Contributed by Brandon Li (detail) HADOOP-11389 . Clean up byte to string encoding issues in hadoop-common. Contributed by Haohui Mai. (detail) HDFS-7497 . Inconsistent report of decommissioning DataNodes between dfsadmin and NameNode webui. Contributed by Yongjun Zhang. (detail) MAPREDUCE-6046 . Change the class name for logs in RMCommunicator. (detail) YARN-2243 . Order of arguments for Preconditions.checkNotNull() is wrong in (detail)
        Hide
        jlowe Jason Lowe added a comment -

        I committed this to branch-2, branch-2.8, branch-2.7, and branch-2.6.

        Show
        jlowe Jason Lowe added a comment - I committed this to branch-2, branch-2.8, branch-2.7, and branch-2.6.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #9274 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9274/)
        Update CHANGES.txt for commit of MAPREDUCE-6191 to other branches. (jlowe: rev a429f857b2aea63e23128728274bb2985c5bf087)

        • hadoop-mapreduce-project/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #9274 (See https://builds.apache.org/job/Hadoop-trunk-Commit/9274/ ) Update CHANGES.txt for commit of MAPREDUCE-6191 to other branches. (jlowe: rev a429f857b2aea63e23128728274bb2985c5bf087) hadoop-mapreduce-project/CHANGES.txt
        Hide
        vinodkv Vinod Kumar Vavilapalli added a comment -

        Closing the JIRA as part of 2.7.3 release.

        Show
        vinodkv Vinod Kumar Vavilapalli added a comment - Closing the JIRA as part of 2.7.3 release.

          People

          • Assignee:
            sam liu sam liu
            Reporter:
            sam liu sam liu
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development