ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject ambari git commit: AMBARI-17307. LogFeeder output to Solr doesn't handle empty buffer queue properly (Bosco Durai via oleewere)
Date Mon, 20 Jun 2016 16:16:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk daa87ea4d -> 9825bc214


AMBARI-17307. LogFeeder output to Solr doesn't handle empty buffer queue properly (Bosco Durai
via oleewere)


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

Branch: refs/heads/trunk
Commit: 9825bc2140948ace88fa06a1b03bbab9f20f2a4d
Parents: daa87ea
Author: oleewere <oleewere@gmail.com>
Authored: Mon Jun 20 18:14:09 2016 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Mon Jun 20 18:15:31 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/ambari/logfeeder/output/OutputSolr.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9825bc21/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
index b14c273..14b2093 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
@@ -307,7 +307,10 @@ public class OutputSolr extends Output {
                   + getShortDescription());
               break;
             }
-            lastDispatchTime = currTimeMS;            
+          }
+          if( localBuffer.size() == 0 ) {
+            //If localBuffer is empty, then reset the timer
+            lastDispatchTime = currTimeMS;
           }
         } catch (InterruptedException e) {
           // Handle thread exiting


Mime
View raw message