falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pall...@apache.org
Subject falcon git commit: FALCON-2053 Send entityType to FeedAlertListeners
Date Thu, 30 Jun 2016 07:17:59 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 2dc3b1d77 -> a78795c3d


FALCON-2053 Send entityType to FeedAlertListeners

Author: Praveen Adlakha <adlakha.praveen@gmail.com>

Reviewers: @pallavi-rao

Closes #199 from PraveenAdlakha/2053 and squashes the following commits:

a7ed45e [Praveen Adlakha] comments addressed
44ab559 [Praveen Adlakha] FALCON-2053 Send entityType to FeedAlertListeners


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

Branch: refs/heads/master
Commit: a78795c3d0a4e3e5bd96e47b670946cc56ae76ac
Parents: 2dc3b1d
Author: Praveen Adlakha <adlakha.praveen@gmail.com>
Authored: Thu Jun 30 12:48:02 2016 +0530
Committer: Pallavi Rao <pallavi.rao@inmobi.com>
Committed: Thu Jun 30 12:48:02 2016 +0530

----------------------------------------------------------------------
 .../java/org/apache/falcon/service/EntitySLAListener.java     | 4 +++-
 .../java/org/apache/falcon/service/FeedSLAAlertService.java   | 7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/a78795c3/prism/src/main/java/org/apache/falcon/service/EntitySLAListener.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/service/EntitySLAListener.java b/prism/src/main/java/org/apache/falcon/service/EntitySLAListener.java
index c0ab257..991052f 100644
--- a/prism/src/main/java/org/apache/falcon/service/EntitySLAListener.java
+++ b/prism/src/main/java/org/apache/falcon/service/EntitySLAListener.java
@@ -18,6 +18,7 @@
 package org.apache.falcon.service;
 
 import org.apache.falcon.FalconException;
+import org.apache.falcon.entity.v0.EntityType;
 
 import java.util.Date;
 
@@ -25,5 +26,6 @@ import java.util.Date;
  * Interface for FeedSLAAlert to be used by Listeners.
  */
 public interface EntitySLAListener {
-    void highSLAMissed(String feedName , String clusterName, Date nominalTime) throws FalconException;
+    void highSLAMissed(String enityName, EntityType entityType, String clusterName, Date
nominalTime)
+        throws FalconException;
 }

http://git-wip-us.apache.org/repos/asf/falcon/blob/a78795c3/prism/src/main/java/org/apache/falcon/service/FeedSLAAlertService.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/service/FeedSLAAlertService.java b/prism/src/main/java/org/apache/falcon/service/FeedSLAAlertService.java
index 4f6dab7..c09c7ae 100644
--- a/prism/src/main/java/org/apache/falcon/service/FeedSLAAlertService.java
+++ b/prism/src/main/java/org/apache/falcon/service/FeedSLAAlertService.java
@@ -143,7 +143,7 @@ public final class FeedSLAAlertService implements FalconService, EntitySLAListen
                     store.updateSLAAlertInstance(feedName, clusterName, nominalTime);
                     LOG.info("Feed :"+ feedName
                             + "Cluster:" + clusterName + "Nominal Time:" + nominalTime +
"missed SLAHigh");
-                    highSLAMissed(feedName, clusterName, nominalTime);
+                    highSLAMissed(feedName, EntityType.FEED, clusterName, nominalTime);
                 }
             }
         } catch (FalconException e){
@@ -153,9 +153,10 @@ public final class FeedSLAAlertService implements FalconService, EntitySLAListen
     }
 
     @Override
-    public void highSLAMissed(String feedName , String clusterName, Date nominalTime) throws
FalconException{
+    public void highSLAMissed(String feedName, EntityType entityType, String clusterName,
Date nominalTime)
+        throws FalconException{
         for (EntitySLAListener listener : listeners) {
-            listener.highSLAMissed(feedName, clusterName, nominalTime);
+            listener.highSLAMissed(feedName, entityType, clusterName, nominalTime);
         }
         store.deleteFeedAlertInstance(feedName, clusterName, nominalTime);
     }


Mime
View raw message