[ 
https://issues.apache.org/jira/browse/FALCON-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14107454#comment-14107454
 ] 

Balu Vellanki commented on FALCON-166:
--------------------------------------

1. We plan to implement the following for endDate.
If endDate is not set, get frequency of entity this instance belong to.  
    endDateMilliSecs = startDateMilliSecs + (10 * frequency * 
frequencyTimeUnitInMilliSecs). 
This will fetch 10 instances (if they exist).

2. If startDate is set before entity was created, startDate will be updated to 
entity's creation time. Based on startDate and endDate, a valid time window is 
identified and results are shown for this time window.

3. An exception will be thrown only when endDate is set to time older than 
startDate. No exceptions will be thrown in other cases. 

4. We recommend "StartTime" should be required param. In Falcon Jira-470, users 
now have option to get Instances sorted by "starttime" and limit the number of 
results they get per request. 




> Instance status start and end dates are rigid and inconvenient
> --------------------------------------------------------------
>
>                 Key: FALCON-166
>                 URL: https://issues.apache.org/jira/browse/FALCON-166
>             Project: Falcon
>          Issue Type: Sub-task
>          Components: webapp
>    Affects Versions: 0.3
>            Reporter: Venkatesh Seetharam
>            Assignee: Balu Vellanki
>
> There are 2 annoying issues that was brought up by [~srimanth.gunturi] while 
> working on FALCON-164. The use case is to get the status for a given entity 
> for the past 1 or 2 or 3 or 7 days.
> 1. Instance status with out an end date fetches for a very small window
> Instance status take end date as optional but assumes one second from the 
> start date which is too small a window.
> {code}
>     private Date getEndDate(Date start, String endStr) throws FalconException 
> {
>         Date end;
>         if (StringUtils.isEmpty(endStr)) {
>             end = new Date(start.getTime() + 1000); // next sec
>         } else {
>             end = EntityUtil.parseDateUTC(endStr);
>         }
>         return end;
>     }
> {code}
> May be assuming the current time might be appropriate instead.
> 2. The start date has to be on or after the start of the entity.
> If the user has created the entity 2 days back but specified the start date 
> for looking at the instances in the past 7 days, it should fetch what is 
> valid rather than complain that the start date is before the entity's start.
> This is quite unwieldy to work with in a dashboard use case. I'm not sure 
> what the performance impact is for this API to be changed.
> Thoughts? 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to