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-1604 Status API Not working in case of Falcon Native Scheduler. Contributed by Pavan Kumar Kolamuri.
Date Thu, 26 Nov 2015 13:04:27 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 855852ecf -> 50b020965


FALCON-1604 Status API Not working in case of Falcon Native Scheduler. Contributed by Pavan
Kumar Kolamuri.


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

Branch: refs/heads/master
Commit: 50b02096550566d0b8b7bb2cc090da4b01bfd6eb
Parents: 855852e
Author: Ajay Yadava <ajaynsit@gmail.com>
Authored: Thu Nov 26 18:22:59 2015 +0530
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Thu Nov 26 18:22:59 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                                   | 2 ++
 .../java/org/apache/falcon/state/store/EntityStateStore.java  | 7 +++++++
 .../org/apache/falcon/state/store/InMemoryStateStore.java     | 6 ++++++
 .../org/apache/falcon/state/store/jdbc/JDBCStateStore.java    | 6 ++++++
 .../apache/falcon/workflow/engine/FalconWorkflowEngine.java   | 2 +-
 5 files changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/50b02096/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b4bdfa4..780a5bd 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -53,6 +53,8 @@ Trunk (Unreleased)
   OPTIMIZATIONS
 
   BUG FIXES
+    FALCON-1604 Status API Not working in case of Falcon Native Scheduler(Pavan Kumar Kolamuri
via Ajay Yadava)
+
     FALCON- 1589 Package sample recipe properties file(Peeyush Bishnoi via Ajay Yadava)
 
     FALCON-1597 Falcon should not retry in case of an instance being manual kill from user
(Sandeep Samudrala via Pallavi Rao)

http://git-wip-us.apache.org/repos/asf/falcon/blob/50b02096/scheduler/src/main/java/org/apache/falcon/state/store/EntityStateStore.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/EntityStateStore.java b/scheduler/src/main/java/org/apache/falcon/state/store/EntityStateStore.java
index 75a315f..a7deb89 100644
--- a/scheduler/src/main/java/org/apache/falcon/state/store/EntityStateStore.java
+++ b/scheduler/src/main/java/org/apache/falcon/state/store/EntityStateStore.java
@@ -81,4 +81,11 @@ public interface EntityStateStore {
      * @throws StateStoreException
      */
     void deleteEntities() throws StateStoreException;
+
+    /**
+     * Checks whether entity completed or not.
+     * @param entityId
+     * @return
+     */
+    boolean isEntityCompleted(EntityID entityId);
 }

http://git-wip-us.apache.org/repos/asf/falcon/blob/50b02096/scheduler/src/main/java/org/apache/falcon/state/store/InMemoryStateStore.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/InMemoryStateStore.java
b/scheduler/src/main/java/org/apache/falcon/state/store/InMemoryStateStore.java
index 7ab996a..2f3aa3a 100644
--- a/scheduler/src/main/java/org/apache/falcon/state/store/InMemoryStateStore.java
+++ b/scheduler/src/main/java/org/apache/falcon/state/store/InMemoryStateStore.java
@@ -118,6 +118,12 @@ public final class InMemoryStateStore extends AbstractStateStore {
     }
 
     @Override
+    public boolean isEntityCompleted(EntityID entityId) {
+        // ToDo need to implement this, currently returning false.
+        return false;
+    }
+
+    @Override
     public void putExecutionInstance(InstanceState instanceState) throws StateStoreException
{
         String key = new InstanceID(instanceState.getInstance()).getKey();
         if (instanceStates.containsKey(key)) {

http://git-wip-us.apache.org/repos/asf/falcon/blob/50b02096/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
b/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
index ca65b94..b2f8e80 100644
--- a/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
+++ b/scheduler/src/main/java/org/apache/falcon/state/store/jdbc/JDBCStateStore.java
@@ -168,6 +168,12 @@ public final class JDBCStateStore extends AbstractStateStore {
     }
 
     @Override
+    public boolean isEntityCompleted(EntityID entityId) {
+        // ToDo need to implement this, currently returning false.
+        return false;
+    }
+
+    @Override
     public void putExecutionInstance(InstanceState instanceState) throws StateStoreException
{
         InstanceID instanceID = new InstanceID(instanceState.getInstance());
         if (executionInstanceExists(instanceID)) {

http://git-wip-us.apache.org/repos/asf/falcon/blob/50b02096/scheduler/src/main/java/org/apache/falcon/workflow/engine/FalconWorkflowEngine.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/falcon/workflow/engine/FalconWorkflowEngine.java
b/scheduler/src/main/java/org/apache/falcon/workflow/engine/FalconWorkflowEngine.java
index d7d157f..5c7bf91 100644
--- a/scheduler/src/main/java/org/apache/falcon/workflow/engine/FalconWorkflowEngine.java
+++ b/scheduler/src/main/java/org/apache/falcon/workflow/engine/FalconWorkflowEngine.java
@@ -97,7 +97,7 @@ public class FalconWorkflowEngine extends AbstractWorkflowEngine {
 
     @Override
     public boolean isCompleted(Entity entity) throws FalconException {
-        throw new FalconException("Not yet implemented.");
+        return STATE_STORE.isEntityCompleted(new EntityID(entity));
     }
 
     @Override


Mime
View raw message