hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject svn commit: r1494733 - in /hadoop/common/trunk/hadoop-yarn-project: CHANGES.txt hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
Date Wed, 19 Jun 2013 18:45:37 GMT
Author: cnauroth
Date: Wed Jun 19 18:45:37 2013
New Revision: 1494733

URL: http://svn.apache.org/r1494733
Log:
YARN-852. TestAggregatedLogFormat.testContainerLogsFileAccess fails on Windows. Contributed
by Chuan Liu.

Modified:
    hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java

Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt?rev=1494733&r1=1494732&r2=1494733&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt Wed Jun 19 18:45:37 2013
@@ -677,6 +677,9 @@ Release 2.1.0-beta - UNRELEASED
     YARN-597. TestFSDownload fails on Windows due to dependencies on
     tar/gzip/jar tools. (Ivan Mitic via acmurthy) 
 
+    YARN-852. TestAggregatedLogFormat.testContainerLogsFileAccess fails on
+    Windows. (Chuan Liu via cnauroth)
+
     YARN-795. Fair scheduler queue metrics should subtract allocated vCores from 
     available vCores. (ywskycn via tucu) 
 

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java?rev=1494733&r1=1494732&r2=1494733&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java
Wed Jun 19 18:45:37 2013
@@ -206,27 +206,34 @@ public class TestAggregatedLogFormat {
       sb.append(line);
     }
     line = sb.toString();
-    
+
+    String expectedOwner = ugi.getShortUserName();
+    if (Path.WINDOWS) {
+      final String adminsGroupString = "Administrators";
+      if (Arrays.asList(ugi.getGroupNames()).contains(adminsGroupString)) {
+        expectedOwner = adminsGroupString;
+      }
+    }
     String stdoutFile1 =
         StringUtils.join(
-            Path.SEPARATOR,
+            File.separator,
             Arrays.asList(new String[] {
-                srcFileRoot.toUri().toString(),
+                workDir.getAbsolutePath(), "srcFiles",
                 testContainerId1.getApplicationAttemptId().getApplicationId()
                     .toString(), testContainerId1.toString(), stderr }));
     String message1 =
-        "Owner '" + ugi.getShortUserName() + "' for path " + stdoutFile1
+        "Owner '" + expectedOwner + "' for path " + stdoutFile1
         + " did not match expected owner '" + randomUser + "'";
     
     String stdoutFile2 =
         StringUtils.join(
-            Path.SEPARATOR,
+            File.separator,
             Arrays.asList(new String[] {
-                srcFileRoot.toUri().toString(),
+                workDir.getAbsolutePath(), "srcFiles",
                 testContainerId1.getApplicationAttemptId().getApplicationId()
                     .toString(), testContainerId1.toString(), stdout }));
     String message2 =
-        "Owner '" + ugi.getShortUserName() + "' for path "
+        "Owner '" + expectedOwner + "' for path "
             + stdoutFile2 + " did not match expected owner '"
             + ugi.getShortUserName() + "'";
     



Mime
View raw message