eagle-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject incubator-eagle git commit: [EAGLE-46] Fixed org.apache package name
Date Thu, 19 Nov 2015 11:08:57 GMT
Repository: incubator-eagle
Updated Branches:
  refs/heads/master bf35ede03 -> 2bae00443


[EAGLE-46] Fixed org.apache package name


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

Branch: refs/heads/master
Commit: 2bae0044361437155ec73fa7ce64bec6affbd1db
Parents: bf35ede
Author: Hao Chen <hchen9@ebay.com>
Authored: Thu Nov 19 19:06:53 2015 +0800
Committer: Hao Chen <hchen9@ebay.com>
Committed: Thu Nov 19 19:06:53 2015 +0800

----------------------------------------------------------------------
 .../java/eagle/security/util/LogParseUtil.java  | 65 --------------------
 .../eagle/security/util/LogParseUtil.java       | 65 ++++++++++++++++++++
 .../parse/HDFSSecurityLogParser.java            |  2 +-
 3 files changed, 66 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2bae0044/eagle-security/eagle-security-common/src/main/java/eagle/security/util/LogParseUtil.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/eagle/security/util/LogParseUtil.java
b/eagle-security/eagle-security-common/src/main/java/eagle/security/util/LogParseUtil.java
deleted file mode 100644
index 1d59d12..0000000
--- a/eagle-security/eagle-security-common/src/main/java/eagle/security/util/LogParseUtil.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package eagle.security.util;
-
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class LogParseUtil {
-    /**
-     * .e.g. user@APD.xyz.com
-     */
-    private final static Pattern UGI_PATTERN_DEFAULT = Pattern.compile("^([\\w\\d\\-]+)@.*");
-    /**
-     * .e.g. hadoop/123.dc1.xyz.com@xyz.com (auth:KERBEROS)
-     */
-    private final static Pattern UGI_PATTERN_SYSTEM = Pattern.compile("^([\\w\\d\\-]+)/[\\w\\d\\-.]+@.*");
-
-    /**
-     * .e.g. hadoop (auth:KERBEROS)
-     */
-    private final static Pattern UGI_PATTERN_WITHBLANK = Pattern.compile("^([\\w\\d.\\-_]+)[\\s(]+.*");
-
-    /**
-     * @param ugi UGI field of audit log
-     * @return resultToMetrics user from UGI field of audit log
-     */
-    public static  String parseUserFromUGI(String ugi) {
-        if(ugi == null) return null;
-        String newugi = ugi.trim();
-
-        Matcher defaultMatcher = UGI_PATTERN_DEFAULT.matcher(newugi);
-        if(defaultMatcher.matches()){
-            return defaultMatcher.group(1);
-        }
-
-        Matcher sysMatcher = UGI_PATTERN_SYSTEM.matcher(newugi);
-        if(sysMatcher.matches()){
-            return sysMatcher.group(1);
-        }
-
-        Matcher viaMatcher = UGI_PATTERN_WITHBLANK.matcher(newugi);
-        if(viaMatcher.matches()){
-            return viaMatcher.group(1);
-        }
-
-        return newugi;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2bae0044/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/LogParseUtil.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/LogParseUtil.java
b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/LogParseUtil.java
new file mode 100644
index 0000000..6d7d2ed
--- /dev/null
+++ b/eagle-security/eagle-security-common/src/main/java/org/apache/eagle/security/util/LogParseUtil.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.eagle.security.util;
+
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class LogParseUtil {
+    /**
+     * .e.g. user@APD.xyz.com
+     */
+    private final static Pattern UGI_PATTERN_DEFAULT = Pattern.compile("^([\\w\\d\\-]+)@.*");
+    /**
+     * .e.g. hadoop/123.dc1.xyz.com@xyz.com (auth:KERBEROS)
+     */
+    private final static Pattern UGI_PATTERN_SYSTEM = Pattern.compile("^([\\w\\d\\-]+)/[\\w\\d\\-.]+@.*");
+
+    /**
+     * .e.g. hadoop (auth:KERBEROS)
+     */
+    private final static Pattern UGI_PATTERN_WITHBLANK = Pattern.compile("^([\\w\\d.\\-_]+)[\\s(]+.*");
+
+    /**
+     * @param ugi UGI field of audit log
+     * @return resultToMetrics user from UGI field of audit log
+     */
+    public static  String parseUserFromUGI(String ugi) {
+        if(ugi == null) return null;
+        String newugi = ugi.trim();
+
+        Matcher defaultMatcher = UGI_PATTERN_DEFAULT.matcher(newugi);
+        if(defaultMatcher.matches()){
+            return defaultMatcher.group(1);
+        }
+
+        Matcher sysMatcher = UGI_PATTERN_SYSTEM.matcher(newugi);
+        if(sysMatcher.matches()){
+            return sysMatcher.group(1);
+        }
+
+        Matcher viaMatcher = UGI_PATTERN_WITHBLANK.matcher(newugi);
+        if(viaMatcher.matches()){
+            return viaMatcher.group(1);
+        }
+
+        return newugi;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-eagle/blob/2bae0044/eagle-security/eagle-security-hdfs-securitylog/src/main/java/eagle/security/securitylog/parse/HDFSSecurityLogParser.java
----------------------------------------------------------------------
diff --git a/eagle-security/eagle-security-hdfs-securitylog/src/main/java/eagle/security/securitylog/parse/HDFSSecurityLogParser.java
b/eagle-security/eagle-security-hdfs-securitylog/src/main/java/eagle/security/securitylog/parse/HDFSSecurityLogParser.java
index fd2fc28..144fb94 100644
--- a/eagle-security/eagle-security-hdfs-securitylog/src/main/java/eagle/security/securitylog/parse/HDFSSecurityLogParser.java
+++ b/eagle-security/eagle-security-hdfs-securitylog/src/main/java/eagle/security/securitylog/parse/HDFSSecurityLogParser.java
@@ -19,7 +19,7 @@
 package eagle.security.securitylog.parse;
 
 
-import eagle.security.util.LogParseUtil;
+import org.apache.eagle.security.util.LogParseUtil;
 import org.apache.eagle.common.DateTimeUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;


Mime
View raw message