You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by jl...@apache.org on 2016/12/02 17:01:04 UTC
hadoop git commit: YARN-5915. ATS 1.5 FileSystemTimelineWriter causes
flush() to be called after every event write. Contributed by Atul Sikaria
(cherry picked from commit 6b17d449bf93e55c4f373ba96f12af6319a8411c)
Repository: hadoop
Updated Branches:
refs/heads/branch-2.8 5025a898e -> e6394e3a3
YARN-5915. ATS 1.5 FileSystemTimelineWriter causes flush() to be called after every event write. Contributed by Atul Sikaria
(cherry picked from commit 6b17d449bf93e55c4f373ba96f12af6319a8411c)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e6394e3a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e6394e3a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e6394e3a
Branch: refs/heads/branch-2.8
Commit: e6394e3a35cef630e8b3b4df29af79f6f252f242
Parents: 5025a89
Author: Jason Lowe <jl...@apache.org>
Authored: Fri Dec 2 16:58:43 2016 +0000
Committer: Jason Lowe <jl...@apache.org>
Committed: Fri Dec 2 17:00:05 2016 +0000
----------------------------------------------------------------------
.../hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/e6394e3a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java
index 55d6bd2..5ebff41 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java
@@ -286,6 +286,7 @@ public class FileSystemTimelineWriter extends TimelineWriter{
mapper.setAnnotationIntrospector(new JaxbAnnotationIntrospector());
mapper.setSerializationInclusion(Inclusion.NON_NULL);
mapper.configure(Feature.CLOSE_CLOSEABLE, false);
+ mapper.configure(Feature.FLUSH_AFTER_WRITE_VALUE, false);
return mapper;
}
@@ -366,6 +367,7 @@ public class FileSystemTimelineWriter extends TimelineWriter{
public void flush() throws IOException {
if (stream != null) {
+ jsonGenerator.flush();
stream.hflush();
}
}
@@ -378,8 +380,6 @@ public class FileSystemTimelineWriter extends TimelineWriter{
this.stream = createLogFileStream(fs, logPath);
this.jsonGenerator = new JsonFactory().createJsonGenerator(stream);
this.jsonGenerator.setPrettyPrinter(new MinimalPrettyPrinter("\n"));
- this.jsonGenerator.configure(
- JsonGenerator.Feature.FLUSH_PASSED_TO_STREAM, false);
this.lastModifiedTime = Time.monotonicNow();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org