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:18:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 3e91a1826 -> 6b33a6c27


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/6b33a6c2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b33a6c2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b33a6c2

Branch: refs/heads/branch-2.4
Commit: 6b33a6c27d4e835d586a05cd22e34701f9e41a3b
Parents: 3e91a18
Author: oleewere <oleewere@gmail.com>
Authored: Mon Jun 20 18:14:09 2016 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Mon Jun 20 18:17:29 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/6b33a6c2/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