YARN-4814. ATS 1.5 timelineclient impl call flush after every event write. Contributed by Xuan Gong

This commit is contained in:
Jason Lowe 2016-03-25 20:15:49 +00:00
parent 3f622a143c
commit e8fc81f9c8

View File

@ -379,6 +379,8 @@ protected void prepareForWrite() throws IOException{
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();
}