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

TestStreamingTaskLog#testStreamingTaskLogWithHadoopCmd is failing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 2.4.0
    • 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
          Mit Desai added a comment -

          I have attached the surefire-report as log.txt

          Show
          Mit Desai added a comment - I have attached the surefire-report as log.txt
          Hide
          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
          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
          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
          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
          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
          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
          Akira AJISAKA added a comment -

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

          Show
          Akira AJISAKA added a comment - Moved to MapReduce project, and attaching a patch to delete the test.
          Hide
          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
          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
          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
          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
          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
          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
          Vinod Kumar Vavilapalli added a comment -

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

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

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

          Show
          Vinod Kumar Vavilapalli added a comment - Committed this to trunk, branch-2 and branch-2.4. Thanks Akira!
          Hide
          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 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
          Akira AJISAKA added a comment -

          Thanks Varun and Vinod for the reviews!

          Show
          Akira AJISAKA added a comment - Thanks Varun and Vinod for the reviews!
          Hide
          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 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 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 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 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 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:
              Akira AJISAKA
              Reporter:
              Mit Desai
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development