Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-5475

Test failed for TestAggregatedLogFormat on trunk

    Details

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

      Description

      From some jenkins run: https://builds.apache.org/job/PreCommit-YARN-Build/12651/artifact/patchprocess/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
      The error message for the test is:

      Tests run: 3, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 1.114 sec <<< FAILURE! - in org.apache.hadoop.yarn.logaggregation.TestAggregatedLogFormat
      testReadAcontainerLogs1(org.apache.hadoop.yarn.logaggregation.TestAggregatedLogFormat)  Time elapsed: 0.012 sec  <<< ERROR!
      java.io.IOException: Unable to create directory : /testptch/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/target/TestAggregatedLogFormat/testReadAcontainerLogs1/srcFiles/application_1_0001/container_1_0001_01_000001/subDir
      	at org.apache.hadoop.yarn.logaggregation.TestAggregatedLogFormat.getOutputStreamWriter(TestAggregatedLogFormat.java:403)
      	at org.apache.hadoop.yarn.logaggregation.TestAggregatedLogFormat.writeSrcFile(TestAggregatedLogFormat.java:382)
      	at org.apache.hadoop.yarn.logaggregation.TestAggregatedLogFormat.testReadAcontainerLog(TestAggregatedLogFormat.java:211)
      	at org.apache.hadoop.yarn.logaggregation.TestAggregatedLogFormat.testReadAcontainerLogs1(TestAggregatedLogFormat.java:185)
      
      1. YARN-5475.01.patch
        1.0 kB
        Jun Gong
      2. YARN-5475.02.patch
        1 kB
        Jun Gong

        Activity

        Hide
        GergelyNovak Gergely Novák added a comment -

        This is a permission issue. Some observations:

        • testReadAcontainerLogs1 only fails if ran after testForCorruptedAggregatedLogs
        • TestAggregatedLogFormat's permissions:
          • after testForCorruptedAggregatedLogs: rwxr-xr-x
          • after testReadAcontainerLogs1 (if testForCorruptedAggregatedLogs ran): rw-r-----
          • after testReadAcontainerLogs1 (if testForCorruptedAggregatedLogs did'n run) rwxr-xr-x
        • removing the line fs.mkdirs(subDir); from testReadAcontainerLog() seems to solve the issue
        Show
        GergelyNovak Gergely Novák added a comment - This is a permission issue. Some observations: testReadAcontainerLogs1 only fails if ran after testForCorruptedAggregatedLogs TestAggregatedLogFormat's permissions: after testForCorruptedAggregatedLogs: rwxr-xr-x after testReadAcontainerLogs1 (if testForCorruptedAggregatedLogs ran): rw-r----- after testReadAcontainerLogs1 (if testForCorruptedAggregatedLogs did'n run) rwxr-xr-x removing the line fs.mkdirs(subDir); from testReadAcontainerLog() seems to solve the issue
        Hide
        hex108 Jun Gong added a comment -

        Thanks Gergely Novák for the analysis.

        testForCorruptedAggregatedLogs() calls writeSrcFileAndALog, and there is LogWriter logWriter = new LogWriter(conf, remoteAppLogFile, ugi); in writeSrcFileAndALog(note that the conf is a global variable), it will change conf's file mask by fc.setUMask(APP_LOG_FILE_UMASK); in LogWriter's default constructor. So after testForCorruptedAggregatedLogs, the file mask will changed to rw-r----, and it causes the problem.

        Show
        hex108 Jun Gong added a comment - Thanks Gergely Novák for the analysis. testForCorruptedAggregatedLogs() calls writeSrcFileAndALog , and there is LogWriter logWriter = new LogWriter(conf, remoteAppLogFile, ugi); in writeSrcFileAndALog (note that the conf is a global variable), it will change conf 's file mask by fc.setUMask(APP_LOG_FILE_UMASK); in LogWriter's default constructor. So after testForCorruptedAggregatedLogs, the file mask will changed to rw-r----, and it causes the problem.
        Hide
        hex108 Jun Gong added a comment -

        In the patch, create a new configuration to avoid the change.

        Show
        hex108 Jun Gong added a comment - In the patch, create a new configuration to avoid the change.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 18s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 6m 45s trunk passed
        +1 compile 0m 26s trunk passed
        +1 checkstyle 0m 18s trunk passed
        +1 mvnsite 0m 30s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 0m 54s trunk passed
        +1 javadoc 0m 27s trunk passed
        +1 mvninstall 0m 26s the patch passed
        +1 compile 0m 24s the patch passed
        +1 javac 0m 24s the patch passed
        -1 checkstyle 0m 14s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common: The patch generated 1 new + 19 unchanged - 0 fixed = 20 total (was 19)
        +1 mvnsite 0m 27s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 1s the patch passed
        +1 javadoc 0m 24s the patch passed
        +1 unit 2m 13s hadoop-yarn-common in the patch passed.
        +1 asflicense 0m 15s The patch does not generate ASF License warnings.
        16m 2s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12823494/YARN-5475.01.patch
        JIRA Issue YARN-5475
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 6d1dd6374891 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 23c6e3c
        Default Java 1.8.0_101
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-YARN-Build/12757/artifact/patchprocess/diff-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
        Test Results https://builds.apache.org/job/PreCommit-YARN-Build/12757/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/12757/console
        Powered by Apache Yetus 0.3.0 http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall Vote Subsystem Runtime Comment 0 reexec 0m 18s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 6m 45s trunk passed +1 compile 0m 26s trunk passed +1 checkstyle 0m 18s trunk passed +1 mvnsite 0m 30s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 0m 54s trunk passed +1 javadoc 0m 27s trunk passed +1 mvninstall 0m 26s the patch passed +1 compile 0m 24s the patch passed +1 javac 0m 24s the patch passed -1 checkstyle 0m 14s hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common: The patch generated 1 new + 19 unchanged - 0 fixed = 20 total (was 19) +1 mvnsite 0m 27s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 1s the patch passed +1 javadoc 0m 24s the patch passed +1 unit 2m 13s hadoop-yarn-common in the patch passed. +1 asflicense 0m 15s The patch does not generate ASF License warnings. 16m 2s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12823494/YARN-5475.01.patch JIRA Issue YARN-5475 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 6d1dd6374891 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 23c6e3c Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-YARN-Build/12757/artifact/patchprocess/diff-checkstyle-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt Test Results https://builds.apache.org/job/PreCommit-YARN-Build/12757/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common Console output https://builds.apache.org/job/PreCommit-YARN-Build/12757/console Powered by Apache Yetus 0.3.0 http://yetus.apache.org This message was automatically generated.
        Hide
        hex108 Jun Gong added a comment -

        Fix checkstyle error.

        Show
        hex108 Jun Gong added a comment - Fix checkstyle error.
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 18s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 2s trunk passed
        +1 compile 0m 26s trunk passed
        +1 checkstyle 0m 18s trunk passed
        +1 mvnsite 0m 30s trunk passed
        +1 mvneclipse 0m 13s trunk passed
        +1 findbugs 0m 54s trunk passed
        +1 javadoc 0m 28s trunk passed
        +1 mvninstall 0m 25s the patch passed
        +1 compile 0m 23s the patch passed
        +1 javac 0m 23s the patch passed
        +1 checkstyle 0m 16s the patch passed
        +1 mvnsite 0m 27s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 0s the patch passed
        +1 javadoc 0m 25s the patch passed
        +1 unit 2m 13s hadoop-yarn-common in the patch passed.
        +1 asflicense 0m 15s The patch does not generate ASF License warnings.
        16m 21s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12823797/YARN-5475.02.patch
        JIRA Issue YARN-5475
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux bc0d2cb59aff 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 9daa997
        Default Java 1.8.0_101
        findbugs v3.0.0
        Test Results https://builds.apache.org/job/PreCommit-YARN-Build/12781/testReport/
        modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common
        Console output https://builds.apache.org/job/PreCommit-YARN-Build/12781/console
        Powered by Apache Yetus 0.3.0 http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 18s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 2s trunk passed +1 compile 0m 26s trunk passed +1 checkstyle 0m 18s trunk passed +1 mvnsite 0m 30s trunk passed +1 mvneclipse 0m 13s trunk passed +1 findbugs 0m 54s trunk passed +1 javadoc 0m 28s trunk passed +1 mvninstall 0m 25s the patch passed +1 compile 0m 23s the patch passed +1 javac 0m 23s the patch passed +1 checkstyle 0m 16s the patch passed +1 mvnsite 0m 27s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 0s the patch passed +1 javadoc 0m 25s the patch passed +1 unit 2m 13s hadoop-yarn-common in the patch passed. +1 asflicense 0m 15s The patch does not generate ASF License warnings. 16m 21s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12823797/YARN-5475.02.patch JIRA Issue YARN-5475 Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux bc0d2cb59aff 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 9daa997 Default Java 1.8.0_101 findbugs v3.0.0 Test Results https://builds.apache.org/job/PreCommit-YARN-Build/12781/testReport/ modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common Console output https://builds.apache.org/job/PreCommit-YARN-Build/12781/console Powered by Apache Yetus 0.3.0 http://yetus.apache.org This message was automatically generated.
        Hide
        varun_saxena Varun Saxena added a comment -

        Thanks Jun Gong for the patch. Changes LGTM
        Will commit it later today.

        Show
        varun_saxena Varun Saxena added a comment - Thanks Jun Gong for the patch. Changes LGTM Will commit it later today.
        Hide
        varun_saxena Varun Saxena added a comment -

        Committed to trunk, branch-2.
        Thanks Jun Gong to your contribution and Gergely Novák for the review.

        Show
        varun_saxena Varun Saxena added a comment - Committed to trunk, branch-2. Thanks Jun Gong to your contribution and Gergely Novák for the review.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10283 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10283/)
        YARN-5475. Fix test failure of (varunsaxena: rev b427ce12bcdd35e12b212c18430f0114fbbc1fea)

        • (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10283 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10283/ ) YARN-5475 . Fix test failure of (varunsaxena: rev b427ce12bcdd35e12b212c18430f0114fbbc1fea) (edit) hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
        Hide
        hex108 Jun Gong added a comment -

        Thanks Varun Saxena for the review and commit! Thanks Junping Du for reporting the issue!

        Show
        hex108 Jun Gong added a comment - Thanks Varun Saxena for the review and commit! Thanks Junping Du for reporting the issue!

          People

          • Assignee:
            hex108 Jun Gong
            Reporter:
            djp Junping Du
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development