falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatesh Seetharam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FALCON-303) Ability to limit the result set on the "instances status" call
Date Sat, 15 Feb 2014 06:24:19 GMT

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

Venkatesh Seetharam commented on FALCON-303:
--------------------------------------------

Hi [~dsen], thanks for your contributions. I'm sorry that I committed FALCON-11 and this patch
does not apply cleanly. You'd need to rebase and provide another one.

{code}
git apply --check FALCON-303+unittests.patch
error: src/main/java/org/apache/falcon/resource/InstancesResult.java: No such file or directory
error: src/site/twiki/restapi/InstanceStatus.twiki: No such file or directory
error: src/main/java/org/apache/falcon/resource/AbstractInstanceManager.java: No such file
or directory
error: src/main/java/org/apache/falcon/resource/proxy/InstanceManagerProxy.java: No such file
or directory
error: src/main/java/org/apache/falcon/resource/InstanceManager.java: No such file or directory
error: src/test/java/org/apache/falcon/resource/ProcessInstanceManagerIT.java: No such file
or directory
{code}

Minor nits in code:
AbstractInstanceManager: the newly introduced block of code can be simplified.
{code}
            int length = instancesResult.getInstances().length;
            if (limit > 0 && instancesResult.getInstances() != null &&
limit < length) {
                instancesResult = new InstancesResult(instancesResult.getMessage(),
                    Arrays.copyOfRange(instancesResult.getInstances(), length - limit, length));
            }
{code}
You could also create a method to encapsulate this.

I'd suggest you please run this before generating the patch:
{code}
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" && mvn clean verify -Phadoop-2,test-patch
{code}
Thanks!

> Ability to limit the result set on the "instances status" call
> --------------------------------------------------------------
>
>                 Key: FALCON-303
>                 URL: https://issues.apache.org/jira/browse/FALCON-303
>             Project: Falcon
>          Issue Type: Task
>            Reporter: Dmytro Sen
>         Attachments: FALCON-303+unittests.patch
>
>
> Response for the call below sometimes can return tons of information. 
> {noformat}
> curl -H 'Remote-User:username' 'http://host1:15000/api/instance/status/feed/test-replication?start=2013-10-24T00:00Z&end=2014-12-31T00:00Z'

> {noformat}
> Falcon has the capability to filter by a time range, but for any time range given, the
number of results is unbounded. Add "limit" flag.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message