Return-Path: X-Original-To: apmail-falcon-dev-archive@minotaur.apache.org Delivered-To: apmail-falcon-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65398119A6 for ; Wed, 27 Aug 2014 19:14:22 +0000 (UTC) Received: (qmail 84454 invoked by uid 500); 27 Aug 2014 19:14:22 -0000 Delivered-To: apmail-falcon-dev-archive@falcon.apache.org Received: (qmail 84411 invoked by uid 500); 27 Aug 2014 19:14:22 -0000 Mailing-List: contact dev-help@falcon.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.incubator.apache.org Delivered-To: mailing list dev@falcon.incubator.apache.org Received: (qmail 84399 invoked by uid 99); 27 Aug 2014 19:14:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2014 19:14:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 27 Aug 2014 19:14:00 +0000 Received: (qmail 82397 invoked by uid 99); 27 Aug 2014 19:13:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Aug 2014 19:13:58 +0000 Date: Wed, 27 Aug 2014 19:13:58 +0000 (UTC) From: "Ajay Yadav (JIRA)" To: dev@falcon.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FALCON-166) Instance status start and end dates are rigid and inconvenient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FALCON-166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14112666#comment-14112666 ] Ajay Yadav commented on FALCON-166: ----------------------------------- Hi [~bvellanki] >From the details given in above comment, I think assuming default start time as end - 10 * entityFrequency might be inconvenient in some use cases. Case 1: If I specify number of results as 20 and don't specify start time, from above details it seems that the number of results returned will still be 10 (as start time will be default) Case 2: If I don't specify number of results, and it defaults to 10, showing second page results will be tricky. Hence my original suggestion, that start time should be defaulted to the first start time of the entity(first instance). Hence - start time should be optional and default to start time of the entity(first instance) > 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 > Fix For: 0.6 > > Attachments: Falcon-Jira-166-v1.patch, Falcon-Jira-166-v2.patch, Falcon-Jira-166-v3.patch, Falcon-Jira-166-v4.patch, Falcon-Jira-166.patch > > > 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)