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

TestStreamingTaskLog#testStreamingTaskLogWithHadoopCmd is failing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 3.0.0-alpha1
    • Fix Version/s: 2.4.0
    • Component/s: contrib/streaming
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      testStreamingTaskLogWithHadoopCmd(org.apache.hadoop.streaming.TestStreamingTaskLog) Time elapsed: 44.069 sec <<< FAILURE!
      java.lang.AssertionError: environment set for child is wrong
      at org.junit.Assert.fail(Assert.java:93)
      at org.junit.Assert.assertTrue(Assert.java:43)
      at org.apache.hadoop.streaming.TestStreamingTaskLog.runStreamJobAndValidateEnv(TestStreamingTaskLog.java:157)
      at org.apache.hadoop.streaming.TestStreamingTaskLog.testStreamingTaskLogWithHadoopCmd(TestStreamingTaskLog.java:107)

      Results :

      Failed tests:
      TestStreamingTaskLog.testStreamingTaskLogWithHadoopCmd:107->runStreamJobAndValidateEnv:157 environment set for child is wrong

      1. log.txt
        98 kB
        Mit Desai
      2. MAPREDUCE-5810.patch
        6 kB
        Akira Ajisaka

        Issue Links

          Activity

          Hide
          mitdesai Mit Desai added a comment -

          I have attached the surefire-report as log.txt

          Show
          mitdesai Mit Desai added a comment - I have attached the surefire-report as log.txt
          Hide
          ajisakaa Akira Ajisaka added a comment -

          At first I divide the assertion to find the cause.

          -    assertTrue("environment set for child is wrong", env.contains("INFO,CLA")
          -               && env.contains("-Dyarn.app.container.log.dir=")
          -               && env.contains("-Dyarn.app.container.log.filesize=" + logSize)
          -               && env.contains("-Dlog4j.configuration="));
          +    assertTrue("environment set for child should contain INFO,CLA",
          +        env.contains("INFO,CLA"));
          +    assertTrue(env.contains("-Dyarn.app.container.log.dir="));
          +    assertTrue(env.contains("-Dyarn.app.container.log.filesize=" + logSize));
          +    assertTrue(env.contains("-Dlog4j.configuration="));
          

          The test fails at the following.

          +    assertTrue("environment set for child should contain INFO,CLA",
          +        env.contains("INFO,CLA"));
          
          Show
          ajisakaa Akira Ajisaka added a comment - At first I divide the assertion to find the cause. - assertTrue( "environment set for child is wrong" , env.contains( "INFO,CLA" ) - && env.contains( "-Dyarn.app.container.log.dir=" ) - && env.contains( "-Dyarn.app.container.log.filesize=" + logSize) - && env.contains( "-Dlog4j.configuration=" )); + assertTrue( "environment set for child should contain INFO,CLA" , + env.contains( "INFO,CLA" )); + assertTrue(env.contains( "-Dyarn.app.container.log.dir=" )); + assertTrue(env.contains( "-Dyarn.app.container.log.filesize=" + logSize)); + assertTrue(env.contains( "-Dlog4j.configuration=" )); The test fails at the following. + assertTrue( "environment set for child should contain INFO,CLA" , + env.contains( "INFO,CLA" ));
          Hide
          ajisakaa Akira Ajisaka added a comment -

          The test fails because echo $HADOOP_ROOT_LOGGER $HADOOP_CLIENT_OPTS returns nothing in Hadoop Streaming after MAPREDUCE-5806.
          I suppose it is sufficient to confirm the environment variables by MRApp.cmdEnvironment instead of echo command.

          Show
          ajisakaa Akira Ajisaka added a comment - The test fails because echo $HADOOP_ROOT_LOGGER $HADOOP_CLIENT_OPTS returns nothing in Hadoop Streaming after MAPREDUCE-5806 . I suppose it is sufficient to confirm the environment variables by MRApp.cmdEnvironment instead of echo command.
          Hide
          ajisakaa Akira Ajisaka added a comment -

          MRApp.cmdEnvironment

          My above comment was wrong, MyMRApp.cmdEnvironment in TestMapReduceChildJVM is the right.
          Now I'm thinking the test can be removed because the environment variables are already tested in TestMapReduceChildJVM.

          Show
          ajisakaa Akira Ajisaka added a comment - MRApp.cmdEnvironment My above comment was wrong, MyMRApp.cmdEnvironment in TestMapReduceChildJVM is the right. Now I'm thinking the test can be removed because the environment variables are already tested in TestMapReduceChildJVM .
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Moved to MapReduce project, and attaching a patch to delete the test.

          Show
          ajisakaa Akira Ajisaka added a comment - Moved to MapReduce project, and attaching a patch to delete the test.
          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/12636860/MAPREDUCE-5810.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 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 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 hadoop-tools/hadoop-streaming.

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

          Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4460//testReport/
          Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4460//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/12636860/MAPREDUCE-5810.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 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 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 hadoop-tools/hadoop-streaming. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4460//testReport/ Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/4460//console This message is automatically generated.
          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          The test fails because echo $HADOOP_ROOT_LOGGER $HADOOP_CLIENT_OPTS returns nothing

          I think this is wrong. May be MAPREDUCE-5806 is broken. Varun Vasudev, can you please look at this?

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - The test fails because echo $HADOOP_ROOT_LOGGER $HADOOP_CLIENT_OPTS returns nothing I think this is wrong. May be MAPREDUCE-5806 is broken. Varun Vasudev , can you please look at this?
          Hide
          vvasudev Varun Vasudev added a comment -

          This is expected behaviour. The test looks at two variables HADOOP_ROOT_LOGGER and HADOOP_CLIENT_OPTS. HADOOP_ROOT_LOGGER is explicitly unset by StreamJob.java. MAPREDUCE-5806 stops setting log settings as part of HADOOP_CLIENT_OPTS. If users wish to set HADOOP_CLIENT_OPTS for the map tasks, they can set it via the AM settings.
          I agree with Akira Ajisaka that we should remove the test.

          Show
          vvasudev Varun Vasudev added a comment - This is expected behaviour. The test looks at two variables HADOOP_ROOT_LOGGER and HADOOP_CLIENT_OPTS. HADOOP_ROOT_LOGGER is explicitly unset by StreamJob.java. MAPREDUCE-5806 stops setting log settings as part of HADOOP_CLIENT_OPTS. If users wish to set HADOOP_CLIENT_OPTS for the map tasks, they can set it via the AM settings. I agree with Akira Ajisaka that we should remove the test.
          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          Thanks for the clarification, Varun! Checking in Akira's patch.

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - Thanks for the clarification, Varun! Checking in Akira's patch.
          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          Committed this to trunk, branch-2 and branch-2.4. Thanks Akira!

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - Committed this to trunk, branch-2 and branch-2.4. Thanks Akira!
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #5428 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5428/)
          MAPREDUCE-5810. Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896)

          • /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #5428 (See https://builds.apache.org/job/Hadoop-trunk-Commit/5428/ ) MAPREDUCE-5810 . Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896 ) /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java
          Hide
          ajisakaa Akira Ajisaka added a comment -

          Thanks Varun and Vinod for the reviews!

          Show
          ajisakaa Akira Ajisaka added a comment - Thanks Varun and Vinod for the reviews!
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #1741 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1741/)
          MAPREDUCE-5810. Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896)

          • /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #1741 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1741/ ) MAPREDUCE-5810 . Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896 ) /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #524 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/524/)
          MAPREDUCE-5810. Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896)

          • /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #524 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/524/ ) MAPREDUCE-5810 . Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896 ) /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #1716 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1716/)
          MAPREDUCE-5810. Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896)

          • /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
          • /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #1716 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1716/ ) MAPREDUCE-5810 . Removed the faulty and failing streaming test TestStreamingTaskLog. Contributed by Akira Ajisaka. (vinodkv: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1582896 ) /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt /hadoop/common/trunk/hadoop-tools/hadoop-streaming/src/test/java/org/apache/hadoop/streaming/TestStreamingTaskLog.java

            People

            • Assignee:
              ajisakaa Akira Ajisaka
              Reporter:
              mitdesai Mit Desai
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development