ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject incubator-ranger git commit: RANGER-724: AuditBatchQueue.waitToComplete() updated to recompute prevQueueSize within while loop
Date Mon, 09 Nov 2015 03:56:29 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/ranger-0.5 cee8c46b0 -> ae3697584


RANGER-724: AuditBatchQueue.waitToComplete() updated to recompute prevQueueSize within while
loop

(cherry picked from commit c89b01f28aeda1fa7fc05de7546e1e12614a4319)


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

Branch: refs/heads/ranger-0.5
Commit: ae369758409e75e615c335836bfa66ccae2027f2
Parents: cee8c46
Author: Madhan Neethiraj <madhan@apache.org>
Authored: Sun Nov 8 11:07:14 2015 -0800
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Sun Nov 8 19:46:04 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ae369758/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
b/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
index f3a38dc..5b56c96 100644
--- a/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
+++ b/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditBatchQueue.java
@@ -168,9 +168,11 @@ public class AuditBatchQueue extends AuditQueue implements Runnable {
 				if (staticLoopCount > 5) {
 					logger.error("Aborting writing to consumer. Some logs will be discarded."
 							+ getName() + ".size=" + queue.size());
+					break;
 				}
 			} else {
 				staticLoopCount = 0;
+				prevQueueSize = queue.size();
 			}
 			if (consumerThread != null) {
 				consumerThread.interrupt();


Mime
View raw message