From 1aad99a71813660b83628cacfed393d0b3a123cc Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Tue, 27 Nov 2018 20:01:11 +0900 Subject: [PATCH] MAPREDUCE-7162. TestEvents#testEvents fails. Contributed by Zhaohui Xin. --- .../java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java index b07c6762f7..02ec53e559 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/jobhistory/EventWriter.java @@ -94,6 +94,7 @@ synchronized void write(HistoryEvent event) throws IOException { wrapper.setEvent(event.getDatum()); writer.write(wrapper, encoder); if (this.jsonOutput) { + encoder.flush(); out.writeBytes("\n"); } }