You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by aj...@apache.org on 2015/11/20 02:55:22 UTC
falcon git commit: FALCON-1605 Instance API is not working as
expected in case of Native Scheduler. Contributed by Pavan Kumar Kolamuri.
Repository: falcon
Updated Branches:
refs/heads/master 4576c582f -> ea8c26efa
FALCON-1605 Instance API is not working as expected in case of 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/ea8c26ef
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/ea8c26ef
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/ea8c26ef
Branch: refs/heads/master
Commit: ea8c26efa1b3b7053fe960a35eec391c8af855b7
Parents: 4576c58
Author: Ajay Yadav <aj...@inmobi.com>
Authored: Fri Nov 20 01:41:41 2015 +0530
Committer: Ajay Yadav <aj...@inmobi.com>
Committed: Fri Nov 20 01:41:41 2015 +0530
----------------------------------------------------------------------
CHANGES.txt | 2 ++
.../org/apache/falcon/state/store/InMemoryStateStore.java | 9 +++++----
2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/falcon/blob/ea8c26ef/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a95094d..9177529 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -35,6 +35,8 @@ Trunk (Unreleased)
OPTIMIZATIONS
BUG FIXES
+ FALCON-1605 Instance API is not working as expected in case of Native Scheduler(Pavan Kumar Kolamuri via Ajay Yadava)
+
FALCON-1603 FeedHelperTest::testGetDateFromPath fails in some environments(Balu Vellanki via Ajay Yadava)
FALCON-1372 Retention does not work in corner cases(Balu Vellanki via Ajay Yadava)
http://git-wip-us.apache.org/repos/asf/falcon/blob/ea8c26ef/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 3822860..64c5a59 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
@@ -167,10 +167,11 @@ public final class InMemoryStateStore extends AbstractStateStore {
ID id = new ID(entity, cluster);
for (InstanceState state : getExecutionInstances(id, states)) {
ExecutionInstance instance = state.getInstance();
- // if end time is before start time of instance
- // or start time is after end time of instance ignore.
- if ((instance.getActualStart() != null && !(end.isBefore(instance.getActualStart()))
- || (instance.getActualEnd() != null && start.isAfter(instance.getActualEnd())))) {
+ DateTime instanceTime = instance.getInstanceTime();
+ // Start date inclusive and end date exclusive.
+ // If start date and end date are equal no instances will be added.
+ if ((instanceTime.isEqual(start) || instanceTime.isAfter(start))
+ && instanceTime.isBefore(end)) {
instancesToReturn.add(state);
}
}