YARN-5122. "yarn logs" for running containers should print an explicit footer saying that the log may be incomplete. Contributed by Jian He.

(cherry picked from commit d6284428e8)
This commit is contained in:
Varun Vasudev 2016-06-15 12:35:17 +05:30
parent 6ffb557521
commit 5bd39d2f3c
1 changed files with 3 additions and 1 deletions

View File

@ -412,7 +412,9 @@ public void printContainerLogsFromRunningApplication(Configuration conf,
.queryParam("size", Long.toString(request.getBytes()))
.accept(MediaType.TEXT_PLAIN).get(ClientResponse.class);
out.println(response.getEntity(String.class));
out.println("End of LogType:" + logFile);
out.println("End of LogType:" + logFile + ". This log file belongs"
+ " to a running container (" + containerIdStr + ") and so may"
+ " not be complete.");
out.flush();
} catch (ClientHandlerException | UniformInterfaceException ex) {
System.err.println("Can not find the log file:" + logFile