falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajayyad...@apache.org
Subject falcon git commit: FALCON-1429 Fix Falcon monitoring, alert, audit and monitoring plugins by fixing aspectj handling. Contributed by Venkat Ranganathan.
Date Fri, 04 Sep 2015 19:22:03 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 52a79381a -> 3ec8d9534


FALCON-1429 Fix Falcon monitoring, alert, audit and monitoring plugins by fixing aspectj handling.
Contributed by Venkat Ranganathan.


Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/3ec8d953
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/3ec8d953
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/3ec8d953

Branch: refs/heads/master
Commit: 3ec8d9534c29a3671e579dcd312034313faf4362
Parents: 52a7938
Author: Ajay Yadava <ajaynsit@gmail.com>
Authored: Sat Sep 5 00:05:58 2015 +0530
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Sat Sep 5 00:05:58 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../falcon/aspect/AbstractFalconAspect.java     | 13 +++++-----
 .../org/apache/falcon/aspect/GenericAlert.java  |  2 --
 pom.xml                                         | 10 ++++++--
 prism/pom.xml                                   | 25 ++++++++++++++++++++
 .../apache/falcon/aspect/GenericAlertTest.java  |  2 --
 6 files changed, 42 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/3ec8d953/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ddd47a2..8ac2cd1 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,8 @@ Trunk (Unreleased)
   OPTIMIZATIONS
 
   BUG FIXES
+    FALCON-1429 Fix Falcon monitoring, alert, audit and monitoring plugins by fixing aspectj
handling(Venkat Ranganathan via Ajay Yadava)
+
     FALCON-1416 Add ACL (if missing) during touch(Narayan Periwal via Ajay Yadava)
 
     FALCON-1413 Filter By throws wrong error in case of wrong argument being passed(Narayan
Periwal via Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/3ec8d953/metrics/src/main/java/org/apache/falcon/aspect/AbstractFalconAspect.java
----------------------------------------------------------------------
diff --git a/metrics/src/main/java/org/apache/falcon/aspect/AbstractFalconAspect.java b/metrics/src/main/java/org/apache/falcon/aspect/AbstractFalconAspect.java
index b358011..b24292c 100644
--- a/metrics/src/main/java/org/apache/falcon/aspect/AbstractFalconAspect.java
+++ b/metrics/src/main/java/org/apache/falcon/aspect/AbstractFalconAspect.java
@@ -119,13 +119,14 @@ public abstract class AbstractFalconAspect {
         try {
             result = joinPoint.proceed();
         } finally {
+
             AuditMessage auditMessage = new AuditMessage(
-                    getStringValue(args[0], "Unknown-User"),
-                    getStringValue(args[1], "Unknown-Address"),
-                    getStringValue(args[2], "Unknown-Host"),
-                    args[3].toString(),
-                    args[4].toString(),
-                    args[5].toString());
+                 getStringValue(args[0], "Unknown-User"),
+                 getStringValue(args[1], "Unknown-Address"),
+                 getStringValue(args[2], "Unknown-Host"),
+                 getStringValue(args[3], "Unknown-URL"),
+                 getStringValue(args[4], "Unknown-Address"),
+                 getStringValue(args[5], "Unknown-Time"));
             publishAudit(auditMessage);
         }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/3ec8d953/metrics/src/main/java/org/apache/falcon/aspect/GenericAlert.java
----------------------------------------------------------------------
diff --git a/metrics/src/main/java/org/apache/falcon/aspect/GenericAlert.java b/metrics/src/main/java/org/apache/falcon/aspect/GenericAlert.java
index 321c769..05139a1 100644
--- a/metrics/src/main/java/org/apache/falcon/aspect/GenericAlert.java
+++ b/metrics/src/main/java/org/apache/falcon/aspect/GenericAlert.java
@@ -22,14 +22,12 @@ import org.apache.falcon.monitors.Auditable;
 import org.apache.falcon.monitors.Dimension;
 import org.apache.falcon.monitors.Monitored;
 import org.apache.falcon.monitors.TimeTaken;
-import org.aspectj.lang.annotation.Aspect;
 
 /**
  * Create a method with params you want to monitor/alert/audit via Aspect
  * and log in metric, invoke this method from code.
  */
 @SuppressWarnings("UnusedParameters")
-@Aspect
 public final class GenericAlert {
 
     private GenericAlert() {}

http://git-wip-us.apache.org/repos/asf/falcon/blob/3ec8d953/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 583d095..646de69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -686,13 +686,19 @@
             <dependency>
                 <groupId>org.aspectj</groupId>
                 <artifactId>aspectjrt</artifactId>
-                <version>1.6.11</version>
+                <version>1.8.6</version>
             </dependency>
 
             <dependency>
                 <groupId>org.aspectj</groupId>
                 <artifactId>aspectjweaver</artifactId>
-                <version>1.6.11</version>
+                <version>1.8.6</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.aspectj</groupId>
+                <artifactId>aspectjtools</artifactId>
+                <version>1.8.6</version>
             </dependency>
 
             <dependency>

http://git-wip-us.apache.org/repos/asf/falcon/blob/3ec8d953/prism/pom.xml
----------------------------------------------------------------------
diff --git a/prism/pom.xml b/prism/pom.xml
index 5d99274..be04ac9 100644
--- a/prism/pom.xml
+++ b/prism/pom.xml
@@ -197,15 +197,34 @@
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>aspectj-maven-plugin</artifactId>
                 <version>1.7</version>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.aspectj</groupId>
+                        <artifactId>aspectjweaver</artifactId>
+                        <version>1.8.6</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.aspectj</groupId>
+                        <artifactId>aspectjrt</artifactId>
+                        <version>1.8.6</version>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.aspectj</groupId>
+                        <artifactId>aspectjtools</artifactId>
+                        <version>1.8.6</version>
+                    </dependency>
+                </dependencies>
                 <configuration>
                     <verbose>true</verbose>
                     <source>1.7</source>
+                    <target>1.7</target>
                     <complianceLevel>1.7</complianceLevel>
                     <includes>
                         <include>org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java</include>
                         <include>org/apache/falcon/resource/proxy/InstanceManagerProxy.java</include>
                         <include>org/apache/falcon/resource/AbstractInstanceManager.java</include>
                         <include>org/apache/falcon/plugin/ChainableMonitoringPlugin.java</include>
+                        <include>org/apache/falcon/plugin/ChainableMonitoringPluginTest.java</include>
                         <include>org/apache/falcon/aspect/GenericAlert.java</include>
                         <include>org/apache/falcon/aspect/GenericAlertTest.java</include>
                     </includes>
@@ -214,12 +233,18 @@
                             <groupId>org.apache.falcon</groupId>
                             <artifactId>falcon-rerun</artifactId>
                         </weaveDependency>
+                        <weaveDependency>
+                            <groupId>org.apache.falcon</groupId>
+                            <artifactId>falcon-metrics</artifactId>
+                        </weaveDependency>
                     </weaveDependencies>
+                    <Xlint>warning</Xlint>
                 </configuration>
                 <executions>
                     <execution>
                         <goals>
                             <goal>compile</goal>
+                            <goal>test-compile</goal>
                         </goals>
                     </execution>
                 </executions>

http://git-wip-us.apache.org/repos/asf/falcon/blob/3ec8d953/prism/src/test/java/org/apache/falcon/aspect/GenericAlertTest.java
----------------------------------------------------------------------
diff --git a/prism/src/test/java/org/apache/falcon/aspect/GenericAlertTest.java b/prism/src/test/java/org/apache/falcon/aspect/GenericAlertTest.java
index 919f821..0b6a265 100644
--- a/prism/src/test/java/org/apache/falcon/aspect/GenericAlertTest.java
+++ b/prism/src/test/java/org/apache/falcon/aspect/GenericAlertTest.java
@@ -17,13 +17,11 @@
  */
 package org.apache.falcon.aspect;
 
-import org.aspectj.lang.annotation.Aspect;
 import org.testng.annotations.Test;
 
 /**
  * Test class for Alerts.
  */
-@Aspect
 public class GenericAlertTest {
 
     @Test


Mime
View raw message