You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flume.apache.org by mp...@apache.org on 2017/02/17 01:05:36 UTC

flume git commit: FLUME-2427. Be less verbose in isFileClosed() notification

Repository: flume
Updated Branches:
  refs/heads/trunk f215374bd -> 9604c5ae1


FLUME-2427. Be less verbose in isFileClosed() notification

Some versions of HDFS and implementations of Filesystem do not implement
the isFileClosed() method.

We perform a check for that method each time a new file is opened. This
patch lowers the severity of the message printed when we detect that the
method id not present from LOG.warn() to LOG.info().

We also remove the stack trace from the log message.

(Ping Wang via Mike Percy)


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

Branch: refs/heads/trunk
Commit: 9604c5ae1c9f2b266200889219b5604fe0e756e4
Parents: f215374
Author: Ping Wang <wp...@cn.ibm.com>
Authored: Thu Feb 16 16:53:05 2017 -0800
Committer: Mike Percy <mp...@apache.org>
Committed: Thu Feb 16 17:00:34 2017 -0800

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


http://git-wip-us.apache.org/repos/asf/flume/blob/9604c5ae/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 300496a..f6b1734 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
@@ -198,10 +198,10 @@ class BucketWriter {
       return fileSystem.getClass().getMethod("isFileClosed",
         Path.class);
     } catch (Exception e) {
-      LOG.warn("isFileClosed is not available in the " +
-          "version of HDFS being used. Flume will not " +
-          "attempt to close files if the close fails on " +
-          "the first attempt",e);
+      LOG.info("isFileClosed() is not available in the version of the " +
+               "distributed filesystem being used. " +
+               "Flume will not attempt to re-close files if the close fails " +
+               "on the first attempt");
       return null;
     }
   }