ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject [1/2] git commit: ARGUS-147: default value of audit configurations updated for renaming of Argus to Ranger. Also fixed incorrect default value of couple async-audit logger configurations.
Date Sat, 01 Nov 2014 00:46:42 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master 5e4836750 -> 6dc34963f


ARGUS-147: default value of audit configurations updated for renaming of Argus to Ranger.
Also fixed incorrect default value of couple async-audit logger configurations.

Signed-off-by: sneethiraj <sneethir@apache.org>


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

Branch: refs/heads/master
Commit: 8fedc05d788d855a16b2b72712328157402edaac
Parents: a28f5f6
Author: Madhan Neethiraj <madhan@apache.org>
Authored: Fri Oct 31 17:26:30 2014 -0700
Committer: sneethiraj <sneethir@apache.org>
Committed: Fri Oct 31 17:40:08 2014 -0700

----------------------------------------------------------------------
 .../xasecure/audit/provider/AsyncAuditProvider.java  | 10 ++++++++--
 .../audit/provider/AuditProviderFactory.java         | 15 +++++++++------
 hbase-agent/conf/xasecure-audit.xml                  |  2 +-
 hbase-agent/scripts/install.properties               |  6 +++---
 hdfs-agent/conf/xasecure-audit.xml                   |  2 +-
 hdfs-agent/scripts/install.properties                |  2 +-
 hive-agent/conf/xasecure-audit.xml                   |  2 +-
 hive-agent/scripts/install.properties                |  2 +-
 knox-agent/conf/xasecure-audit.xml                   |  2 +-
 knox-agent/scripts/install.properties                |  2 +-
 storm-agent/conf/xasecure-audit.xml                  |  2 +-
 storm-agent/scripts/install.properties               |  2 +-
 12 files changed, 29 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/agents-audit/src/main/java/com/xasecure/audit/provider/AsyncAuditProvider.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/com/xasecure/audit/provider/AsyncAuditProvider.java
b/agents-audit/src/main/java/com/xasecure/audit/provider/AsyncAuditProvider.java
index fcb013d..3ab7d5f 100644
--- a/agents-audit/src/main/java/com/xasecure/audit/provider/AsyncAuditProvider.java
+++ b/agents-audit/src/main/java/com/xasecure/audit/provider/AsyncAuditProvider.java
@@ -40,8 +40,8 @@ public class AsyncAuditProvider extends MultiDestAuditProvider implements
 	private Thread  mThread           = null;
 	private boolean mStopThread       = false;
 	private String  mName             = null;
-	private int     mMaxQueueSize     = -1;
-	private int     mMaxFlushInterval = -1;
+	private int     mMaxQueueSize     = 10 * 1024;
+	private int     mMaxFlushInterval = 5000; // 5 seconds
 
 	// Summary of logs handled
 	private AtomicLong lifeTimeInLogCount  = new AtomicLong(0); // Total count, including drop
count
@@ -56,6 +56,12 @@ public class AsyncAuditProvider extends MultiDestAuditProvider implements
 	public AsyncAuditProvider(String name, int maxQueueSize, int maxFlushInterval) {
 		LOG.info("AsyncAuditProvider(" + name + "): creating..");
 
+		if(maxQueueSize < 1) {
+			LOG.warn("AsyncAuditProvider(" + name + "): invalid maxQueueSize=" + maxQueueSize + ".
will use default " + mMaxQueueSize);
+
+			maxQueueSize = mMaxQueueSize;
+		}
+
 		mName             = name;
 		mMaxQueueSize     = maxQueueSize;
 		mMaxFlushInterval = maxFlushInterval;

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/agents-audit/src/main/java/com/xasecure/audit/provider/AuditProviderFactory.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/com/xasecure/audit/provider/AuditProviderFactory.java
b/agents-audit/src/main/java/com/xasecure/audit/provider/AuditProviderFactory.java
index 8a49259..5a0c4da 100644
--- a/agents-audit/src/main/java/com/xasecure/audit/provider/AuditProviderFactory.java
+++ b/agents-audit/src/main/java/com/xasecure/audit/provider/AuditProviderFactory.java
@@ -67,6 +67,9 @@ public class AuditProviderFactory {
 	private static final String AUDIT_LOG4J_IS_ASYNC_PROP           = "xasecure.audit.log4j.is.async";
 	private static final String AUDIT_LOG4J_MAX_QUEUE_SIZE_PROP     = "xasecure.audit.log4j.async.max.queue.size"
;
 	private static final String AUDIT_LOG4J_MAX_FLUSH_INTERVAL_PROP = "xasecure.audit.log4j.async.max.flush.interval.ms";
+	
+	private static final int AUDIT_ASYNC_MAX_QUEUE_SIZE_DEFAULT     = 10 * 1024;
+	private static final int AUDIT_ASYNC_MAX_FLUSH_INTERVAL_DEFAULT =  5 * 1000;
 
 	private static AuditProviderFactory sFactory;
 
@@ -152,8 +155,8 @@ public class AuditProviderFactory {
 			DbAuditProvider dbProvider = new DbAuditProvider(jpaInitProperties, dbBatchSize, dbRetryMinIntervalMs);
 			
 			if(isAuditToDbAsync) {
-				int maxQueueSize     = getIntProperty(props, AUDIT_DB_MAX_QUEUE_SIZE_PROP, -1);
-				int maxFlushInterval = getIntProperty(props, AUDIT_DB_MAX_FLUSH_INTERVAL_PROP, -1);
+				int maxQueueSize     = getIntProperty(props, AUDIT_DB_MAX_QUEUE_SIZE_PROP, AUDIT_ASYNC_MAX_QUEUE_SIZE_DEFAULT);
+				int maxFlushInterval = getIntProperty(props, AUDIT_DB_MAX_FLUSH_INTERVAL_PROP, AUDIT_ASYNC_MAX_FLUSH_INTERVAL_DEFAULT);
 
 				AsyncAuditProvider asyncProvider = new AsyncAuditProvider("DbAuditProvider", maxQueueSize,
maxFlushInterval, dbProvider);
 				
@@ -175,8 +178,8 @@ public class AuditProviderFactory {
 			boolean isAuditToHdfsAsync = getBooleanProperty(props, AUDIT_HDFS_IS_ASYNC_PROP, false);
 
 			if(isAuditToHdfsAsync) {
-				int maxQueueSize     = getIntProperty(props, AUDIT_HDFS_MAX_QUEUE_SIZE_PROP, -1);
-				int maxFlushInterval = getIntProperty(props, AUDIT_HDFS_MAX_FLUSH_INTERVAL_PROP, -1);
+				int maxQueueSize     = getIntProperty(props, AUDIT_HDFS_MAX_QUEUE_SIZE_PROP, AUDIT_ASYNC_MAX_QUEUE_SIZE_DEFAULT);
+				int maxFlushInterval = getIntProperty(props, AUDIT_HDFS_MAX_FLUSH_INTERVAL_PROP, AUDIT_ASYNC_MAX_FLUSH_INTERVAL_DEFAULT);
 
 				AsyncAuditProvider asyncProvider = new AsyncAuditProvider("HdfsAuditProvider", maxQueueSize,
maxFlushInterval, hdfsProvider);
 				
@@ -192,8 +195,8 @@ public class AuditProviderFactory {
 			boolean isAuditToLog4jAsync = getBooleanProperty(props, AUDIT_LOG4J_IS_ASYNC_PROP, false);
 			
 			if(isAuditToLog4jAsync) {
-				int maxQueueSize     = getIntProperty(props, AUDIT_LOG4J_MAX_QUEUE_SIZE_PROP, -1);
-				int maxFlushInterval = getIntProperty(props, AUDIT_LOG4J_MAX_FLUSH_INTERVAL_PROP, -1);
+				int maxQueueSize     = getIntProperty(props, AUDIT_LOG4J_MAX_QUEUE_SIZE_PROP, AUDIT_ASYNC_MAX_QUEUE_SIZE_DEFAULT);
+				int maxFlushInterval = getIntProperty(props, AUDIT_LOG4J_MAX_FLUSH_INTERVAL_PROP, AUDIT_ASYNC_MAX_FLUSH_INTERVAL_DEFAULT);
 
 				AsyncAuditProvider asyncProvider = new AsyncAuditProvider("Log4jAuditProvider", maxQueueSize,
maxFlushInterval, log4jProvider);
 				

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/hbase-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/hbase-agent/conf/xasecure-audit.xml b/hbase-agent/conf/xasecure-audit.xml
index 5f14cda..c97f722 100644
--- a/hbase-agent/conf/xasecure-audit.xml
+++ b/hbase-agent/conf/xasecure-audit.xml
@@ -133,7 +133,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directory</name>
-		<value>hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/hbase-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/hbase-agent/scripts/install.properties b/hbase-agent/scripts/install.properties
index 679b5e5..90fea85 100644
--- a/hbase-agent/scripts/install.properties
+++ b/hbase-agent/scripts/install.properties
@@ -91,14 +91,14 @@ UPDATE_XAPOLICIES_ON_GRANT_REVOKE=true
 #
 # Enable DB auditing
 #
-XAAUDIT.DB.IS_ENABLED=true
+XAAUDIT.DB.IS_ENABLED=false
 
 
 #
 #  Audit to HDFS
 #
-XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%
+XAAUDIT.HDFS.IS_ENABLED=true
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS=900
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/hdfs-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/hdfs-agent/conf/xasecure-audit.xml b/hdfs-agent/conf/xasecure-audit.xml
index 01346b8..36f7e24 100644
--- a/hdfs-agent/conf/xasecure-audit.xml
+++ b/hdfs-agent/conf/xasecure-audit.xml
@@ -109,7 +109,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directory</name>
-		<value>hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/hdfs-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/hdfs-agent/scripts/install.properties b/hdfs-agent/scripts/install.properties
index debe919..80cef6c 100644
--- a/hdfs-agent/scripts/install.properties
+++ b/hdfs-agent/scripts/install.properties
@@ -90,7 +90,7 @@ XAAUDIT.DB.IS_ENABLED=true
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS=900
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/hive-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/hive-agent/conf/xasecure-audit.xml b/hive-agent/conf/xasecure-audit.xml
index 4c2cf53..4152c05 100644
--- a/hive-agent/conf/xasecure-audit.xml
+++ b/hive-agent/conf/xasecure-audit.xml
@@ -133,7 +133,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directory</name>
-		<value>hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/hive-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/hive-agent/scripts/install.properties b/hive-agent/scripts/install.properties
index 3379558..ecc20be 100644
--- a/hive-agent/scripts/install.properties
+++ b/hive-agent/scripts/install.properties
@@ -97,7 +97,7 @@ XAAUDIT.DB.IS_ENABLED=true
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS=900
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/knox-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/knox-agent/conf/xasecure-audit.xml b/knox-agent/conf/xasecure-audit.xml
index 36b6704..bd2cedb 100644
--- a/knox-agent/conf/xasecure-audit.xml
+++ b/knox-agent/conf/xasecure-audit.xml
@@ -128,7 +128,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directory</name>
-		<value>hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/knox-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/knox-agent/scripts/install.properties b/knox-agent/scripts/install.properties
index fe230c5..bf42b0d 100644
--- a/knox-agent/scripts/install.properties
+++ b/knox-agent/scripts/install.properties
@@ -93,7 +93,7 @@ XAAUDIT.DB.IS_ENABLED=true
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS=900
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/storm-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/storm-agent/conf/xasecure-audit.xml b/storm-agent/conf/xasecure-audit.xml
index c9c57c8..af40b4b 100644
--- a/storm-agent/conf/xasecure-audit.xml
+++ b/storm-agent/conf/xasecure-audit.xml
@@ -133,7 +133,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directory</name>
-		<value>hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/8fedc05d/storm-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/storm-agent/scripts/install.properties b/storm-agent/scripts/install.properties
index b555518..e9d35fa 100644
--- a/storm-agent/scripts/install.properties
+++ b/storm-agent/scripts/install.properties
@@ -88,7 +88,7 @@ XAAUDIT.DB.IS_ENABLED=true
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/argus/audit/%app-type%/%time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://namenodehost:8020/ranger/audit/%app-type%/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_FLUSH_INTERVAL_SECONDS=900
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400


Mime
View raw message