chukwa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ey...@apache.org
Subject svn commit: r1157562 - in /incubator/chukwa/trunk: CHANGES.txt src/java/org/apache/hadoop/chukwa/datacollection/connector/http/HttpConnector.java
Date Sun, 14 Aug 2011 16:54:03 GMT
Author: eyang
Date: Sun Aug 14 16:54:03 2011
New Revision: 1157562

URL: http://svn.apache.org/viewvc?rev=1157562&view=rev
Log:
CHUKWA_595.  Fixed buffering time calculation for Agent to send data to Col
lector.  (Eric Yang)

Modified:
    incubator/chukwa/trunk/CHANGES.txt
    incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/connector/http/HttpConnector.java

Modified: incubator/chukwa/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/CHANGES.txt?rev=1157562&r1=1157561&r2=1157562&view=diff
==============================================================================
--- incubator/chukwa/trunk/CHANGES.txt (original)
+++ incubator/chukwa/trunk/CHANGES.txt Sun Aug 14 16:54:03 2011
@@ -88,6 +88,8 @@ Trunk (unreleased changes)
 
   BUG FIXES
 
+    CHUKWA_595.  Fixed buffering time calculation for Agent to send data to Collector.  (Eric
Yang)
+
     CHUKWA-594.  Fix row key matching in HICC web interface. (Preetam Patil via Eric Yang)
 
     CHUKWA-592.  Enable test case for HBaseWriter. (Eric Yang)

Modified: incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/connector/http/HttpConnector.java
URL: http://svn.apache.org/viewvc/incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/connector/http/HttpConnector.java?rev=1157562&r1=1157561&r2=1157562&view=diff
==============================================================================
--- incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/connector/http/HttpConnector.java
(original)
+++ incubator/chukwa/trunk/src/java/org/apache/hadoop/chukwa/datacollection/connector/http/HttpConnector.java
Sun Aug 14 16:54:03 2011
@@ -176,8 +176,10 @@ public class HttpConnector implements Co
         }
 
         long now = System.currentTimeMillis();
-        if (now - lastPost < MIN_POST_INTERVAL)
-          Thread.sleep(now - lastPost); // wait for stuff to accumulate
+        long delta = MIN_POST_INTERVAL - now + lastPost;
+        if(delta > 0) {
+          Thread.sleep(delta); // wait for stuff to accumulate
+        }
         lastPost = now;
       } // end of try forever loop
       log.info("received stop() command so exiting run() loop to shutdown connector");



Mime
View raw message