chukwa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject chukwa git commit: CHUKWA-784. Improve CharFileTailingAdaptorUTF8NewLineEscaped and LocalWriter logic to send proper data chunk. (Eric Yang)
Date Sun, 11 Oct 2015 20:21:36 GMT
Repository: chukwa
Updated Branches:
  refs/heads/master 93a1f75c4 -> c440a9f90


CHUKWA-784. Improve CharFileTailingAdaptorUTF8NewLineEscaped and LocalWriter
                    logic to send proper data chunk. (Eric Yang)


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

Branch: refs/heads/master
Commit: c440a9f901a9f29b60f10047cb67e0b1cb188f89
Parents: 93a1f75
Author: Eric Yang <eyang@apache.org>
Authored: Sun Oct 11 13:21:19 2015 -0700
Committer: Eric Yang <eyang@apache.org>
Committed: Sun Oct 11 13:21:19 2015 -0700

----------------------------------------------------------------------
 .../hadoop/chukwa/datacollection/writer/localfs/LocalWriter.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/chukwa/blob/c440a9f9/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalWriter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalWriter.java
b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalWriter.java
index 527b4c3..6d4babe 100644
--- a/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalWriter.java
+++ b/src/main/java/org/apache/hadoop/chukwa/datacollection/writer/localfs/LocalWriter.java
@@ -219,6 +219,9 @@ public class LocalWriter implements ChukwaWriter {
       long interval = time - lastTs;
       lastTs = time;
 
+      if(interval <= 0) {
+        interval = 1;
+      }
       long dataRate = 1000 * currentDs / interval; // kb/sec
       log.info("stat:datacollection.writer.local.LocalWriter dataSize="
           + currentDs + " dataRate=" + dataRate);


Mime
View raw message