flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject git commit: FLUME-1736: SpoolingFileLineReader must close the reader before renaming
Date Mon, 19 Nov 2012 16:00:21 GMT
Updated Branches:
  refs/heads/flume-1.3.0 395a06dfe -> e356446cc


FLUME-1736: SpoolingFileLineReader must close the reader before renaming

(Hari Shreedharan via Brock Noland)


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

Branch: refs/heads/flume-1.3.0
Commit: e356446ccb04f7c464093b00594b952289e4f4c0
Parents: 395a06d
Author: Brock Noland <brock@apache.org>
Authored: Mon Nov 19 09:58:59 2012 -0600
Committer: Brock Noland <brock@apache.org>
Committed: Mon Nov 19 09:59:16 2012 -0600

----------------------------------------------------------------------
 .../flume/client/avro/SpoolingFileLineReader.java  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/e356446c/flume-ng-core/src/main/java/org/apache/flume/client/avro/SpoolingFileLineReader.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/client/avro/SpoolingFileLineReader.java
b/flume-ng-core/src/main/java/org/apache/flume/client/avro/SpoolingFileLineReader.java
index b37b730..8362299 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/client/avro/SpoolingFileLineReader.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/client/avro/SpoolingFileLineReader.java
@@ -228,6 +228,7 @@ public class SpoolingFileLineReader implements LineReader {
     String newPath = currPath + completedSuffix;
     logger.info("Preparing to move file " + currPath + " to " + newPath);
 
+    currentFile.get().reader.close();
     File newFile = new File(currPath);
 
     // Verify that spooling assumptions hold
@@ -281,7 +282,6 @@ public class SpoolingFileLineReader implements LineReader {
         throw new FlumeException(message);
       }
     }
-    currentFile.get().reader.close();
   }
 
   /**


Mime
View raw message