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-1361 Default end date should be now. Contributed by Pragya Mittal.
Date Fri, 07 Aug 2015 12:08:26 GMT
Repository: falcon
Updated Branches:
  refs/heads/master cd0a95a48 -> fccfc1c63


FALCON-1361 Default end date should be now. Contributed by Pragya Mittal.


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

Branch: refs/heads/master
Commit: fccfc1c63663a9f0580a76a836ee34404e1796af
Parents: cd0a95a
Author: Ajay Yadava <ajaynsit@gmail.com>
Authored: Fri Aug 7 17:09:08 2015 +0530
Committer: Ajay Yadava <ajaynsit@gmail.com>
Committed: Fri Aug 7 17:09:08 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                           |  2 ++
 .../falcon/resource/AbstractInstanceManager.java      | 14 +++-----------
 2 files changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/fccfc1c6/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 45a3fbb..be06b6f 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,8 @@ Trunk (Unreleased)
     FALCON-796 Enable users to triage data processing issues through falcon (Ajay Yadava)
     
   IMPROVEMENTS
+    FALCON-1361 Default end date should be now(Pragya Mittal via Ajay Yadava)
+
     FALCON-1362 Colo option shouldn't be mandatory(Sandeep Samudrala via Ajay Yadava)
 
     FALCON-1360 Size of feed should be humanized in feed instance listing(Sndeep Samudrala
via Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/fccfc1c6/prism/src/main/java/org/apache/falcon/resource/AbstractInstanceManager.java
----------------------------------------------------------------------
diff --git a/prism/src/main/java/org/apache/falcon/resource/AbstractInstanceManager.java b/prism/src/main/java/org/apache/falcon/resource/AbstractInstanceManager.java
index 248ee7b..af0b0f6 100644
--- a/prism/src/main/java/org/apache/falcon/resource/AbstractInstanceManager.java
+++ b/prism/src/main/java/org/apache/falcon/resource/AbstractInstanceManager.java
@@ -846,7 +846,7 @@ public abstract class AbstractInstanceManager extends AbstractEntityManager
{
         throws FalconException {
         Pair<Date, Date> clusterStartEndDates = EntityUtil.getEntityStartEndDates(entityObject);
         Frequency frequency = EntityUtil.getFrequency(entityObject);
-        Date endDate = getEndDate(startStr, endStr, clusterStartEndDates.second, frequency,
numResults);
+        Date endDate = getEndDate(endStr, clusterStartEndDates.second);
         Date startDate = getStartDate(startStr, endDate, clusterStartEndDates.first, frequency,
numResults);
 
         if (startDate.after(endDate)) {
@@ -856,18 +856,10 @@ public abstract class AbstractInstanceManager extends AbstractEntityManager
{
         return new Pair<Date, Date>(startDate, endDate);
     }
 
-    private Date getEndDate(String startStr, String endStr, Date clusterEndDate,
-                            Frequency frequency, final int numResults) throws FalconException
{
+    private Date getEndDate(String endStr, Date clusterEndDate) throws FalconException {
         Date endDate;
         if (StringUtils.isEmpty(endStr)) {
-            if (!StringUtils.isEmpty(startStr)) {
-                // set endDate to startDate + numResults times frequency
-                endDate = EntityUtil.getNextInstanceTime(EntityUtil.parseDateUTC(startStr),
-                        frequency, null, numResults);
-            } else {
-                // set endDate to currentTime
-                endDate = new Date();
-            }
+            endDate = new Date();
         } else {
             endDate = EntityUtil.parseDateUTC(endStr);
         }


Mime
View raw message