diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index aa9f30d64b..230dcb23b2 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -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) 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 74daed18a9..49d8b2d732 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 @@ -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() + "'";