Skip to content

Commit 1a4b528

Browse files
committed
YARN-2777. Mark the end of individual log in aggregated log. Contributed
by Varun Saxena
1 parent 1561231 commit 1a4b528

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

hadoop-yarn-project/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ Release 2.7.0 - UNRELEASED
411411
YARN-2854. Updated the documentation of the timeline service and the generic
412412
history service. (Naganarasimha G R via zjshen)
413413

414+
YARN-2777. Mark the end of individual log in aggregated log.
415+
(Varun Saxena via xgong)
416+
414417
OPTIMIZATIONS
415418

416419
YARN-2990. FairScheduler's delay-scheduling always waits for node-local and

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/logaggregation/AggregatedLogFormat.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ private static void readContainerLogs(DataInputStream valueStream,
711711
pendingRead > buf.length ? buf.length : (int) pendingRead;
712712
len = valueStream.read(buf, 0, toRead);
713713
}
714+
out.println("End of LogType:" + fileType);
714715
out.println("");
715716
}
716717

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/logaggregation/TestAggregatedLogFormat.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ private void testReadAcontainerLog(boolean logUploadedTime) throws Exception {
257257
+ (logUploadedTime ? ("\nLog Upload Time:" + Times.format(System
258258
.currentTimeMillis())).length() : 0)
259259
+ ("\nLogLength:" + numChars).length()
260-
+ "\nLog Contents:\n".length() + numChars + "\n".length();
260+
+ "\nLog Contents:\n".length() + numChars + "\n".length()
261+
+ "End of LogType:stdout\n".length();
261262
Assert.assertTrue("LogType not matched", s.contains("LogType:stdout"));
262263
Assert.assertTrue("log file:stderr should not be aggregated.", !s.contains("LogType:stderr"));
263264
Assert.assertTrue("log file:logs should not be aggregated.", !s.contains("LogType:logs"));

0 commit comments

Comments
 (0)