hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject git commit: YARN-2747. Fixed the test failure of TestAggregatedLogFormat when native I/O is enabled. Contributed by Xuan Gong.
Date Wed, 29 Oct 2014 05:46:02 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 160aebcae -> 734cbe7de


YARN-2747. Fixed the test failure of TestAggregatedLogFormat when native I/O is enabled. Contributed
by Xuan Gong.

(cherry picked from commit ec63a3ffbd9413e7434594682fdbbd36eef7413c)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/734cbe7d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/734cbe7d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/734cbe7d

Branch: refs/heads/branch-2
Commit: 734cbe7de225d47a6730741e9e6e986de579bd48
Parents: 160aebc
Author: Zhijie Shen <zjshen@apache.org>
Authored: Tue Oct 28 22:43:40 2014 -0700
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Tue Oct 28 22:45:20 2014 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                         |  3 +++
 .../yarn/logaggregation/TestAggregatedLogFormat.java    | 12 +++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/734cbe7d/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 7daefa1..13a3c94 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -759,6 +759,9 @@ Release 2.6.0 - UNRELEASED
     YARN-2741. Made NM web UI serve logs on the drive other than C: on Windows. (Craig
     Welch via zjshen)
 
+    YARN-2747. Fixed the test failure of TestAggregatedLogFormat when native I/O is
+    enabled. (Xuan Gong via zjshen)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/734cbe7d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
index 1d607b1..bc0485e 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
@@ -305,6 +305,8 @@ public class TestAggregatedLogFormat {
     
     // It is trying simulate a situation where first log file is owned by
     // different user (probably symlink) and second one by the user itself.
+    // The first file should not be aggregated. Because this log file has the invalid
+    // user name.
     when(logValue.getUser()).thenReturn(randomUser).thenReturn(
         ugi.getShortUserName());
     logWriter.append(logKey, logValue);
@@ -329,6 +331,9 @@ public class TestAggregatedLogFormat {
         expectedOwner = adminsGroupString;
       }
     }
+
+    // This file: stderr should not be aggregated.
+    // And we will not aggregate the log message.
     String stdoutFile1 =
         StringUtils.join(
             File.separator,
@@ -336,10 +341,8 @@ public class TestAggregatedLogFormat {
                 workDir.getAbsolutePath(), "srcFiles",
                 testContainerId1.getApplicationAttemptId().getApplicationId()
                     .toString(), testContainerId1.toString(), stderr }));
-    String message1 =
-        "Owner '" + expectedOwner + "' for path " + stdoutFile1
-        + " did not match expected owner '" + randomUser + "'";
-    
+
+    // The file: stdout is expected to be aggregated.
     String stdoutFile2 =
         StringUtils.join(
             File.separator,
@@ -352,7 +355,6 @@ public class TestAggregatedLogFormat {
             + stdoutFile2 + " did not match expected owner '"
             + ugi.getShortUserName() + "'";
     
-    Assert.assertTrue(line.contains(message1));
     Assert.assertFalse(line.contains(message2));
     Assert.assertFalse(line.contains(data + testContainerId1.toString()
         + stderr));


Mime
View raw message