ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject [2/2] incubator-ranger git commit: RANGER-397 - Review comments for log4j porting
Date Mon, 01 Jun 2015 07:14:29 GMT
RANGER-397 - Review comments for log4j porting

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

Branch: refs/heads/master
Commit: e0e5105c9c2ef6a92f47c723fee3b8948518e28c
Parents: e92b2d3
Author: Don Bosco Durai <bosco@apache.org>
Authored: Mon Jun 1 00:11:47 2015 -0700
Committer: Don Bosco Durai <bosco@apache.org>
Committed: Mon Jun 1 00:11:47 2015 -0700

----------------------------------------------------------------------
 .../audit/destination/FileAuditDestination.java |  3 ++-
 .../apache/ranger/audit/queue/AuditQueue.java   | 21 --------------------
 .../admin/client/RangerAdminRESTClient.java     |  2 +-
 3 files changed, 3 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/e0e5105c/agents-audit/src/main/java/org/apache/ranger/audit/destination/FileAuditDestination.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/org/apache/ranger/audit/destination/FileAuditDestination.java
b/agents-audit/src/main/java/org/apache/ranger/audit/destination/FileAuditDestination.java
index 854592d..77c8f61 100644
--- a/agents-audit/src/main/java/org/apache/ranger/audit/destination/FileAuditDestination.java
+++ b/agents-audit/src/main/java/org/apache/ranger/audit/destination/FileAuditDestination.java
@@ -107,9 +107,10 @@ public class FileAuditDestination extends AuditDestination {
 	@Override
 	synchronized public boolean logJSON(Collection<String> events) {
 		logStatusIfRequired(true);
+		addTotalCount(events.size());
+
 		if (isStopped) {
 			logError("log() called after stop was requested. name=" + getName());
-			addTotalCount(events.size());
 			addDeferredCount(events.size());
 			return false;
 		}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/e0e5105c/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditQueue.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditQueue.java b/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditQueue.java
index 7681b82..50a74b5 100644
--- a/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditQueue.java
+++ b/agents-audit/src/main/java/org/apache/ranger/audit/queue/AuditQueue.java
@@ -19,12 +19,10 @@
 
 package org.apache.ranger.audit.queue;
 
-import java.util.Collection;
 import java.util.Properties;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.ranger.audit.model.AuditEventBase;
 import org.apache.ranger.audit.provider.AuditHandler;
 import org.apache.ranger.audit.provider.BaseAuditHandler;
 import org.apache.ranger.audit.provider.MiscUtil;
@@ -112,25 +110,6 @@ public abstract class AuditQueue extends BaseAuditHandler {
 
 	}
 
-	
-	@Override
-	public boolean log(Collection<AuditEventBase> events) {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	@Override
-	public void start() {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public void stop() {
-		// TODO Auto-generated method stub
-		
-	}
-
 	@Override
 	public void setName(String name) {
 		super.setName(name);

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/e0e5105c/agents-common/src/main/java/org/apache/ranger/admin/client/RangerAdminRESTClient.java
----------------------------------------------------------------------
diff --git a/agents-common/src/main/java/org/apache/ranger/admin/client/RangerAdminRESTClient.java
b/agents-common/src/main/java/org/apache/ranger/admin/client/RangerAdminRESTClient.java
index 51082bd..f74bc6d 100644
--- a/agents-common/src/main/java/org/apache/ranger/admin/client/RangerAdminRESTClient.java
+++ b/agents-common/src/main/java/org/apache/ranger/admin/client/RangerAdminRESTClient.java
@@ -77,7 +77,7 @@ public class RangerAdminRESTClient implements RangerAdminClient {
 		} else {
 			RESTResponse resp = RESTResponse.fromClientResponse(response);
 			LOG.error("Error getting policies. request=" + webResource.toString() 
-					+ ", response=" + response.toString() + ", serviceName=" + serviceName);
+					+ ", response=" + resp.toString() + ", serviceName=" + serviceName);
 			throw new Exception(resp.getMessage());
 		}
 


Mime
View raw message