flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: FLUME-2305. BucketWriter#close must cancel idleFuture
Date Tue, 28 Jan 2014 23:51:30 GMT
Updated Branches:
  refs/heads/trunk fa3fb3dea -> 044ba3003


FLUME-2305. BucketWriter#close must cancel idleFuture

(Hari Shreedharan via Jarek Jarcec Cecho)


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

Branch: refs/heads/trunk
Commit: 044ba300311a4a3e682a946bd0821c2b52acc190
Parents: fa3fb3d
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Tue Jan 28 15:49:44 2014 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Tue Jan 28 15:49:44 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/flume/blob/044ba300/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 62e47de..7fb3bdd 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
@@ -317,6 +317,11 @@ class BucketWriter {
       timedRollFuture = null;
     }
 
+    if (idleFuture != null && !idleFuture.isDone()) {
+      idleFuture.cancel(false); // do not cancel myself if running!
+      idleFuture = null;
+    }
+
     if (bucketPath != null && fileSystem != null) {
       renameBucket(); // could block or throw IOException
       fileSystem = null;


Mime
View raw message