ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [09/10] git commit: ARGUS-5: log filename generation logic updated to use start-time of the current rollover period (instead of current time).
Date Mon, 22 Sep 2014 18:29:23 GMT
ARGUS-5: log filename generation logic updated to use start-time of the
current rollover period (instead of current time).

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

Branch: refs/heads/master
Commit: 46584e44293f2bf379f5206c374ad7644a7b54b7
Parents: efd3501
Author: mneethiraj <mneethiraj@hortonworks.com>
Authored: Mon Sep 22 11:13:34 2014 -0700
Committer: mneethiraj <mneethiraj@hortonworks.com>
Committed: Mon Sep 22 11:13:34 2014 -0700

----------------------------------------------------------------------
 .../audit/provider/LocalFileLogBuffer.java      | 10 ++--
 .../com/xasecure/audit/provider/MiscUtil.java   | 49 +++++++++++---------
 .../audit/provider/hdfs/HdfsLogDestination.java |  6 ++-
 hbase-agent/conf/xasecure-audit.xml             |  4 +-
 hbase-agent/scripts/install.properties          |  4 +-
 hdfs-agent/conf/xasecure-audit.xml              |  4 +-
 hdfs-agent/scripts/install.properties           |  4 +-
 hive-agent/conf/xasecure-audit.xml              |  4 +-
 hive-agent/scripts/install.properties           |  4 +-
 knox-agent/conf/xasecure-audit.xml              |  4 +-
 knox-agent/scripts/install.properties           |  4 +-
 storm-agent/conf/xasecure-audit.xml             |  4 +-
 storm-agent/scripts/install.properties          |  4 +-
 13 files changed, 58 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/agents-audit/src/main/java/com/xasecure/audit/provider/LocalFileLogBuffer.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/com/xasecure/audit/provider/LocalFileLogBuffer.java
b/agents-audit/src/main/java/com/xasecure/audit/provider/LocalFileLogBuffer.java
index 3e715a9..753c2e4 100644
--- a/agents-audit/src/main/java/com/xasecure/audit/provider/LocalFileLogBuffer.java
+++ b/agents-audit/src/main/java/com/xasecure/audit/provider/LocalFileLogBuffer.java
@@ -183,9 +183,11 @@ public class LocalFileLogBuffer<T> implements LogBuffer<T>
{
 	private synchronized void openFile() {
 		LogLog.debug("==> LocalFileLogBuffer.openFile()");
 
+		long currentRolloverStartTime = MiscUtil.getCurrentRolloverStartTime(mNextRolloverTime,
(mRolloverIntervalSeconds * 1000));
+
 		closeFile();
 
-		mBufferFilename = MiscUtil.replaceTokens(mDirectory + File.separator + mFile);
+		mBufferFilename = MiscUtil.replaceTokens(mDirectory + File.separator + mFile, currentRolloverStartTime);
 
 		FileOutputStream ostream = null;
 		try {
@@ -365,7 +367,7 @@ class DestinationDispatcherThread<T> extends Thread {
 	private void init() {
 		LogLog.debug("==> DestinationDispatcherThread.init()");
 
-		String dirName   = MiscUtil.replaceTokens(mFileLogBuffer.getDirectory());
+		String dirName   = MiscUtil.replaceTokens(mFileLogBuffer.getDirectory(), 0);
 		File   directory = new File(dirName);
 
 		if(directory.exists() && directory.isDirectory()) {
@@ -495,8 +497,8 @@ class DestinationDispatcherThread<T> extends Thread {
 	private void archiveCurrentFile() {
 		if(mCurrentLogfile != null) {
 			File   logFile         = new File(mCurrentLogfile);
-			String archiveDirName  = MiscUtil.replaceTokens(mFileLogBuffer.getArchiveDirectory());
-			String archiveFilename = archiveDirName + File.separator + MiscUtil.replaceTokens(logFile.getName());
+			String archiveDirName  = MiscUtil.replaceTokens(mFileLogBuffer.getArchiveDirectory(),
0);
+			String archiveFilename = archiveDirName + File.separator +logFile.getName();
 
 			try {
 				if(logFile.exists()) {

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/agents-audit/src/main/java/com/xasecure/audit/provider/MiscUtil.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/com/xasecure/audit/provider/MiscUtil.java b/agents-audit/src/main/java/com/xasecure/audit/provider/MiscUtil.java
index 76b367a..8aa7368 100644
--- a/agents-audit/src/main/java/com/xasecure/audit/provider/MiscUtil.java
+++ b/agents-audit/src/main/java/com/xasecure/audit/provider/MiscUtil.java
@@ -5,7 +5,6 @@ import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.rmi.dgc.VMID;
 import java.text.SimpleDateFormat;
-import java.util.Date;
 
 import org.apache.log4j.helpers.LogLog;
 
@@ -13,11 +12,11 @@ import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 
 public class MiscUtil {
-	public static final String TOKEN_HOSTNAME          = "%hostname%";
-	public static final String TOKEN_APP_INSTANCE      = "%app-instance%";
-	public static final String TOKEN_CREATE_TIME_START = "%create-time:";
-	public static final String TOKEN_CREATE_TIME_END   = "%";
-	public static final String ESCAPE_STR = "\\";
+	public static final String TOKEN_HOSTNAME     = "%hostname%";
+	public static final String TOKEN_JVM_INSTANCE = "%jvm-instance%";
+	public static final String TOKEN_TIME_START   = "%time:";
+	public static final String TOKEN_TIME_END     = "%";
+	public static final String ESCAPE_STR         = "\\";
 
 	static VMID sJvmID = new VMID();
 
@@ -32,14 +31,14 @@ public class MiscUtil {
 		}
 	}
 
-	public static String replaceTokens(String str) {
+	public static String replaceTokens(String str, long time) {
 		if(str == null) {
 			return str;
 		}
 
 		str = replaceHostname(str);
-		str = replaceAppInstance(str);
-		str = replaceCreateTime(str);
+		str = replaceJvmInstance(str);
+		str = replaceTime(str, time);
 
 		return str;
 	}
@@ -64,36 +63,38 @@ public class MiscUtil {
 		return str.replace(TOKEN_HOSTNAME, hostName);
 	}
 	
-	public static String replaceAppInstance(String str) {
-		if(!str.contains(TOKEN_APP_INSTANCE)) {
+	public static String replaceJvmInstance(String str) {
+		if(!str.contains(TOKEN_JVM_INSTANCE)) {
 			return str;
 		}
 
-		String appInstance = Integer.toString(Math.abs(sJvmID.hashCode()));
+		String jvmInstance = Integer.toString(Math.abs(sJvmID.hashCode()));
 
-		return str.replace(TOKEN_APP_INSTANCE, appInstance);
+		return str.replace(TOKEN_JVM_INSTANCE, jvmInstance);
 	}
 
-	public static String replaceCreateTime(String str) {
-		Date now = new Date();
+	public static String replaceTime(String str, long time) {
+		if(time <= 0) {
+			time = System.currentTimeMillis();
+		}
 
-        while(str.contains(TOKEN_CREATE_TIME_START)) {
-            int tagStartPos = str.indexOf(TOKEN_CREATE_TIME_START);
-            int tagEndPos   = str.indexOf(TOKEN_CREATE_TIME_END, tagStartPos + TOKEN_CREATE_TIME_START.length());
+        while(str.contains(TOKEN_TIME_START)) {
+            int tagStartPos = str.indexOf(TOKEN_TIME_START);
+            int tagEndPos   = str.indexOf(TOKEN_TIME_END, tagStartPos + TOKEN_TIME_START.length());
 
             if(tagEndPos <= tagStartPos) {
             	break;
             }
 
             String tag      = str.substring(tagStartPos, tagEndPos+1);
-            String dtFormat = tag.substring(TOKEN_CREATE_TIME_START.length(), tag.lastIndexOf(TOKEN_CREATE_TIME_END));
+            String dtFormat = tag.substring(TOKEN_TIME_START.length(), tag.lastIndexOf(TOKEN_TIME_END));
 
             String replaceStr = "";
 
             if(dtFormat != null) {
                 SimpleDateFormat sdf = new SimpleDateFormat(dtFormat);
 
-                replaceStr = sdf.format(now);
+                replaceStr = sdf.format(time);
             }
 
             str = str.replace(tag, replaceStr);
@@ -134,6 +135,10 @@ public class MiscUtil {
 		}
 	}
 
+	public static long getCurrentRolloverStartTime(long nextRolloverTime, long interval) {
+		return (nextRolloverTime <= interval) ? System.currentTimeMillis() : nextRolloverTime
- interval;
+	}
+
 	public static int parseInteger(String str, int defValue) {
 		int ret = defValue;
 
@@ -152,7 +157,9 @@ public class MiscUtil {
 		String ret = null;
 
 		if(log != null) {
-			if(MiscUtil.sGsonBuilder != null) {
+			if(log instanceof String) {
+				ret = (String)log;
+			} else if(MiscUtil.sGsonBuilder != null) {
 				ret = MiscUtil.sGsonBuilder.toJson(log);
 			} else {
 				ret = log.toString();

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/agents-audit/src/main/java/com/xasecure/audit/provider/hdfs/HdfsLogDestination.java
----------------------------------------------------------------------
diff --git a/agents-audit/src/main/java/com/xasecure/audit/provider/hdfs/HdfsLogDestination.java
b/agents-audit/src/main/java/com/xasecure/audit/provider/hdfs/HdfsLogDestination.java
index fbc0431..defb39f 100644
--- a/agents-audit/src/main/java/com/xasecure/audit/provider/hdfs/HdfsLogDestination.java
+++ b/agents-audit/src/main/java/com/xasecure/audit/provider/hdfs/HdfsLogDestination.java
@@ -158,9 +158,11 @@ public class HdfsLogDestination<T> implements LogDestination<T>
{
 	private void openFile() {
 		LogLog.debug("==> HdfsLogDestination.openFile()");
 
+		long currentRolloverStartTime = MiscUtil.getCurrentRolloverStartTime(mNextRolloverTime,
(mRolloverIntervalSeconds * 1000));
+
 		closeFile();
 
-		mHdfsFilename = MiscUtil.replaceTokens(mDirectory + File.separator + mFile);
+		mHdfsFilename = MiscUtil.replaceTokens(mDirectory + File.separator + mFile, currentRolloverStartTime);
 
 		FSDataOutputStream ostream     = null;
 		FileSystem         fileSystem  = null;
@@ -184,7 +186,7 @@ public class HdfsLogDestination<T> implements LogDestination<T>
{
 						ostream = fileSystem.append(pathLogfile);
 					} catch(IOException excp) {
 						// append may not be supported by the filesystem. rename existing file and create a
new one
-						String fileSuffix    = MiscUtil.replaceTokens("-" + MiscUtil.TOKEN_CREATE_TIME_START
+ "yyyyMMdd-HHmm.ss" + MiscUtil.TOKEN_CREATE_TIME_END);
+						String fileSuffix    = MiscUtil.replaceTokens("-" + MiscUtil.TOKEN_TIME_START + "yyyyMMdd-HHmm.ss"
+ MiscUtil.TOKEN_TIME_END, currentRolloverStartTime);
 						String movedFilename = appendToFilename(mHdfsFilename, fileSuffix);
 						Path   movedFilePath = new Path(movedFilename);
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/hbase-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/hbase-agent/conf/xasecure-audit.xml b/hbase-agent/conf/xasecure-audit.xml
index 11597b3..93f06d1 100644
--- a/hbase-agent/conf/xasecure-audit.xml
+++ b/hbase-agent/conf/xasecure-audit.xml
@@ -122,7 +122,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directroy</name>
-		<value>hdfs://namenodehost:8020/audit/hbase/%create-time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/audit/hbase/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>
@@ -147,7 +147,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.local.buffer.file</name>
-		<value>%create-time:yyyyMMdd-HHmm.ss%.log</value>
+		<value>%time:yyyyMMdd-HHmm.ss%.log</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/hbase-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/hbase-agent/scripts/install.properties b/hbase-agent/scripts/install.properties
index bfc5292..337b3f5 100644
--- a/hbase-agent/scripts/install.properties
+++ b/hbase-agent/scripts/install.properties
@@ -112,12 +112,12 @@ XAAUDIT.DB.JDBC_DRIVER=com.mysql.jdbc.Driver
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/hbase/%create-time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/hbase/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400
 XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS=60
 XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY=/tmp/logs/hbase
-XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%create-time:yyyyMMdd-HHmm.ss%.log
+XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%time:yyyyMMdd-HHmm.ss%.log
 XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS=600
 XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY=/tmp/logs/archive/hbase
 XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT=10

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/hdfs-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/hdfs-agent/conf/xasecure-audit.xml b/hdfs-agent/conf/xasecure-audit.xml
index 6189cf2..e2b8f9d 100644
--- a/hdfs-agent/conf/xasecure-audit.xml
+++ b/hdfs-agent/conf/xasecure-audit.xml
@@ -103,7 +103,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directroy</name>
-		<value>hdfs://namenodehost:8020/audit/hdfs/%create-time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/audit/hdfs/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>
@@ -128,7 +128,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.local.buffer.file</name>
-		<value>%create-time:yyyyMMdd-HHmm.ss%.log</value>
+		<value>%time:yyyyMMdd-HHmm.ss%.log</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/hdfs-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/hdfs-agent/scripts/install.properties b/hdfs-agent/scripts/install.properties
index 73643b8..5cfa476 100644
--- a/hdfs-agent/scripts/install.properties
+++ b/hdfs-agent/scripts/install.properties
@@ -105,12 +105,12 @@ XAAUDIT.DB.JDBC_DRIVER=com.mysql.jdbc.Driver
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/hdfs/%create-time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/hdfs/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400
 XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS=60
 XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY=/tmp/logs/hdfs
-XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%create-time:yyyyMMdd-HHmm.ss%.log
+XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%time:yyyyMMdd-HHmm.ss%.log
 XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS=600
 XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY=/tmp/logs/archive/hdfs
 XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT=10

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/hive-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/hive-agent/conf/xasecure-audit.xml b/hive-agent/conf/xasecure-audit.xml
index 73c3d74..319ae09 100644
--- a/hive-agent/conf/xasecure-audit.xml
+++ b/hive-agent/conf/xasecure-audit.xml
@@ -122,7 +122,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directroy</name>
-		<value>hdfs://namenodehost:8020/audit/hive/%create-time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/audit/hive/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>
@@ -147,7 +147,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.local.buffer.file</name>
-		<value>%create-time:yyyyMMdd-HHmm.ss%.log</value>
+		<value>%time:yyyyMMdd-HHmm.ss%.log</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/hive-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/hive-agent/scripts/install.properties b/hive-agent/scripts/install.properties
index 436c53d..4cbdde0 100644
--- a/hive-agent/scripts/install.properties
+++ b/hive-agent/scripts/install.properties
@@ -112,12 +112,12 @@ XAAUDIT.DB.JDBC_DRIVER=com.mysql.jdbc.Driver
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/hive/%create-time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/hive/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400
 XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS=60
 XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY=/tmp/logs/hive
-XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%create-time:yyyyMMdd-HHmm.ss%.log
+XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%time:yyyyMMdd-HHmm.ss%.log
 XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS=600
 XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY=/tmp/logs/archive/hive
 XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT=10

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/knox-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/knox-agent/conf/xasecure-audit.xml b/knox-agent/conf/xasecure-audit.xml
index d7d1a8d..4a7303e 100644
--- a/knox-agent/conf/xasecure-audit.xml
+++ b/knox-agent/conf/xasecure-audit.xml
@@ -117,7 +117,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directroy</name>
-		<value>hdfs://namenodehost:8020/audit/knox/%create-time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/audit/knox/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>
@@ -142,7 +142,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.local.buffer.file</name>
-		<value>%create-time:yyyyMMdd-HHmm.ss%.log</value>
+		<value>%time:yyyyMMdd-HHmm.ss%.log</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/knox-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/knox-agent/scripts/install.properties b/knox-agent/scripts/install.properties
index 3f9aa33..1f0e01e 100644
--- a/knox-agent/scripts/install.properties
+++ b/knox-agent/scripts/install.properties
@@ -98,12 +98,12 @@ XAAUDIT.DB.JDBC_DRIVER=com.mysql.jdbc.Driver
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/knox/%create-time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/knox/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400
 XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS=60
 XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY=/tmp/logs/knox
-XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%create-time:yyyyMMdd-HHmm.ss%.log
+XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%time:yyyyMMdd-HHmm.ss%.log
 XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS=600
 XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY=/tmp/logs/archive/knox
 XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT=10

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/storm-agent/conf/xasecure-audit.xml
----------------------------------------------------------------------
diff --git a/storm-agent/conf/xasecure-audit.xml b/storm-agent/conf/xasecure-audit.xml
index b103aca..f8c07d2 100644
--- a/storm-agent/conf/xasecure-audit.xml
+++ b/storm-agent/conf/xasecure-audit.xml
@@ -122,7 +122,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.destination.directroy</name>
-		<value>hdfs://namenodehost:8020/audit/storm/%create-time:yyyyMMdd%</value>
+		<value>hdfs://namenodehost:8020/audit/storm/%time:yyyyMMdd%</value>
 	</property>	
 
 	<property>
@@ -147,7 +147,7 @@
 
 	<property>
 		<name>xasecure.audit.hdfs.config.local.buffer.file</name>
-		<value>%create-time:yyyyMMdd-HHmm.ss%.log</value>
+		<value>%time:yyyyMMdd-HHmm.ss%.log</value>
 	</property>	
 
 	<property>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/46584e44/storm-agent/scripts/install.properties
----------------------------------------------------------------------
diff --git a/storm-agent/scripts/install.properties b/storm-agent/scripts/install.properties
index 8e0ec8f..c1e3e44 100644
--- a/storm-agent/scripts/install.properties
+++ b/storm-agent/scripts/install.properties
@@ -102,12 +102,12 @@ XAAUDIT.DB.JDBC_DRIVER=com.mysql.jdbc.Driver
 #  Audit to HDFS
 #
 XAAUDIT.HDFS.IS_ENABLED=false
-XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/storm/%create-time:yyyyMMdd%
+XAAUDIT.HDFS.DESTINATION_DIRECTORY=hdfs://localhost:8020/audit/storm/%time:yyyyMMdd%
 XAAUDIT.HDFS.DESTINTATION_FILE=%hostname%-audit.log
 XAAUDIT.HDFS.DESTINTATION_ROLLOVER_INTERVAL_SECONDS=86400
 XAAUDIT.HDFS.DESTINTATION_OPEN_RETRY_INTERVAL_SECONDS=60
 XAAUDIT.HDFS.LOCAL_BUFFER_DIRECTORY=/tmp/logs/storm
-XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%create-time:yyyyMMdd-HHmm.ss%.log
+XAAUDIT.HDFS.LOCAL_BUFFER_FILE=%time:yyyyMMdd-HHmm.ss%.log
 XAAUDIT.HDFS.LOCAL_BUFFER_ROLLOVER_INTERVAL_SECONDS=600
 XAAUDIT.HDFS.LOCAL_ARCHIVE_DIRECTORY=/tmp/logs/archive/storm
 XAAUDIT.HDFS.LOCAL_ARCHIVE_MAX_FILE_COUNT=10


Mime
View raw message