flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject git commit: FLUME-2245. Pre-close flush failure can cause HDFS Sinks to not process events.
Date Thu, 15 May 2014 00:43:31 GMT
Repository: flume
Updated Branches:
  refs/heads/trunk f99113042 -> 33cdcf0d4


FLUME-2245. Pre-close flush failure can cause HDFS Sinks to not process events.

(Juhani Connolly, Brock Noland via Hari Shreedharan)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/33cdcf0d
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/33cdcf0d
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/33cdcf0d

Branch: refs/heads/trunk
Commit: 33cdcf0d4e85e68e6df9e1ca4be729889d480246
Parents: f991130
Author: Hari Shreedharan <hshreedharan@apache.org>
Authored: Wed May 14 17:42:09 2014 -0700
Committer: Hari Shreedharan <hshreedharan@apache.org>
Committed: Wed May 14 17:42:09 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/33cdcf0d/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java
----------------------------------------------------------------------
diff --git a/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java
b/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java
index fba3f66..f9e39ac 100644
--- a/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java
+++ b/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/BucketWriter.java
@@ -404,7 +404,11 @@ class BucketWriter {
   public synchronized void close(boolean callCloseCallback)
     throws IOException, InterruptedException {
     checkAndThrowInterruptedException();
-    flush();
+    try {
+      flush();
+    } catch (IOException e) {
+      LOG.warn("pre-close flush failed", e);
+    }
     boolean failedToClose = false;
     LOG.info("Closing {}", bucketPath);
     CallRunner<Void> closeCallRunner = createCloseCallRunner();


Mime
View raw message