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

Jakub HavlĂ­k commented on FALCON-1565:
--------------------------------------

I would like to point out that this error also happens when you try to list 
instances of a process which is not yet started (same code, different call 
path).

Process definition:
{code:xml}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<process name="mg-dev-tr-286" xmlns="uri:falcon:process:0.1">
    <clusters>
        <cluster name="Athena">
            <validity start="2015-11-26T10:00Z" end="2015-11-30T08:58Z"/>
        </cluster>
    </clusters>
    <parallel>1</parallel>
    <order>FIFO</order>
    <frequency>days(1)</frequency>
    <timezone>UTC</timezone>
    <outputs>
        <output name="output1" feed="mg-dev-da-275-myTest-rkeTest" 
instance="now(0,0)"/>
    </outputs>
    <properties>
        <property name="oozie.libpath" 
value="/user/middlegate_dev/server/lib/oozie,/user/middlegate_dev/server/lib/jdbcDrivers/mssql-4.1"/>
        <property name="jobName" value="mg-dev-tr-286"/>
        <property name="oozie.wf.application.path" value="mg-dev-tr-286"/>
        <property name="username" value="XXX"/>
        <property name="jobTracker" value="XXX"/>
        <property name="nameNode" value="hdfs://huronnn"/>
        <property name="restApiUri" value="https://localhost:9999/"/>
        <property name="oozie.use.system.libpath" value="true"/>
        <property name="queueName" value="middlegate"/>
        <property name="launcherQueueName" value="mglauncher"/>
        <property name="mg_job_properties" 
value="-Doozie.wf.validate.ForkJoin=false "/>
    </properties>
    <workflow version="0.0.1" engine="oozie" 
path="/user/middlegate_dev/server/transformation/oozie/mg-dev-tr-286" 
lib="/user/middlegate_dev/server/lib/oozie"/>
    <ACL owner="XXX" group="unknown"/>
</process>
{code}

Calling process status command before validity start results in the same error:

{code}
falcon instance -type process -name mg-dev-tr-286 -status
ERROR: Bad Request;org.apache.falcon.FalconException: Specified End date 
2015-11-26T09:56Z is before the entity was scheduled 2015-11-26T10:00Z
        at 
org.apache.falcon.resource.AbstractInstanceManager.getStartAndEndDate(AbstractInstanceManager.java:509)
        at 
org.apache.falcon.resource.AbstractInstanceManager.getStatus(AbstractInstanceManager.java:149)
        at 
org.apache.falcon.resource.InstanceManager.getStatus(InstanceManager.java:99)
        at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
org.apache.falcon.resource.channel.IPCChannel.invoke(IPCChannel.java:49)
        at 
org.apache.falcon.resource.proxy.InstanceManagerProxy$3.doExecute(InstanceManagerProxy.java:150)
        at 
org.apache.falcon.resource.proxy.InstanceManagerProxy$3.doExecute(InstanceManagerProxy.java:1)
        at 
org.apache.falcon.resource.proxy.InstanceManagerProxy$InstanceProxy.execute(InstanceManagerProxy.java:357)
        at 
org.apache.falcon.resource.proxy.InstanceManagerProxy.getStatus_aroundBody4(InstanceManagerProxy.java:154)
        at 
org.apache.falcon.resource.proxy.InstanceManagerProxy$AjcClosure5.run(InstanceManagerProxy.java:1)
        at 
org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
        at 
org.apache.falcon.aspect.AbstractFalconAspect.logAroundMonitored(AbstractFalconAspect.java:51)
        at 
org.apache.falcon.resource.proxy.InstanceManagerProxy.getStatus(InstanceManagerProxy.java:135)
        at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
{code}

This is not expected behavior. Expected behavior is receiving info message 
saying that there is no instance because we current time is not after start and 
before end of validity of this process.

> Listing API non-intuitive response if time > endTime
> ----------------------------------------------------
>
>                 Key: FALCON-1565
>                 URL: https://issues.apache.org/jira/browse/FALCON-1565
>             Project: Falcon
>          Issue Type: Bug
>    Affects Versions: 0.8
>         Environment: QA
>            Reporter: Pragya Mittal
>            Assignee: Praveen Adlakha
>              Labels: newbie
>             Fix For: trunk
>
>
> While listing for an entity with time > endTime, response shows stack trace. 
> Instead error mesage should be shown as response.
> Feed definition is :
> {noformat}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <feed name="sla-feed" description="clicks log" xmlns="uri:falcon:feed:0.1">
>     <partitions>
>         <partition name="country"/>
>         <partition name="colo"/>
>     </partitions>
>     <frequency>minutes(2)</frequency>
>     <sla slaLow="minutes(1)" slaHigh="minutes(3)"/>
>     <timezone>UTC</timezone>
>     <late-arrival cut-off="hours(6)"/>
>     <clusters>
>         <cluster name="A9e7e0672-e02bcc65">
>             <validity start="2015-10-28T11:58Z" end="2015-10-30T11:17Z"/>
>             <retention limit="days(1000000)" action="delete"/>
>         </cluster>
>     </clusters>
>     <locations>
>         <location type="data" 
> path="/tmp/falcon-regression/FeedSlaMonitoring/input/${YEAR}/${MONTH}/${DAY}/${HOUR}/${MINUTE}"/>
>         <location type="stats" path="/projects/falcon/clicksStats"/>
>         <location type="meta" path="/projects/falcon/clicksMetaData"/>
>     </locations>
>     <ACL owner="pragya" group="dataqa" permission="*"/>
>     <schema location="/schema/clicks" provider="protobuf"/>
>     <properties>
>         <property name="field1" value="value1"/>
>     </properties>
> </feed>
> {noformat}
> Listing API response
> {noformat}
> dataqa@lda01:/mnt/users/pragya/defn/sla$ falcon instance -type feed -name 
> sla-feed -start 2015-10-30T11:20Z -listing
> ERROR: Bad Request;<?xml version="1.0" encoding="UTF-8" 
> standalone="yes"?><feedInstanceResult><status>FAILED</status><message>ua1/org.apache.falcon.FalconException::javax.ws.rs.WebApplicationException:
>  javax.xml.bind.UnmarshalException: unexpected element (uri:&quot;&quot;, 
> local:&quot;instancesResult&quot;). Expected elements are 
> &lt;{}feedInstanceResult&gt;,&lt;{}instance&gt;,&lt;{}result&gt;
> {noformat}
> Stack trace is :
> {noformat}
> 2015-10-28 12:15:54,414 ERROR - [1963200284@qtp-2030538903-5 - 
> 0f02eeb7-1f02-4bea-bbb7-85d5e61b568f:dataqa:GET//instance/listing/feed/sla-feed]
>  ~ Failed to get instances listing (AbstractInstanceManager:528)
> org.apache.falcon.FalconException: Specified End date 2015-10-28T12:15Z is 
> before the entity was scheduled 2015-10-30T11:20Z
>       at 
> org.apache.falcon.resource.AbstractInstanceManager.getStartAndEndDate(AbstractInstanceManager.java:853)
>       at 
> org.apache.falcon.resource.AbstractInstanceManager.getStartAndEndDate(AbstractInstanceManager.java:842)
>       at 
> org.apache.falcon.resource.AbstractInstanceManager.getListing(AbstractInstanceManager.java:524)
>       at 
> org.apache.falcon.resource.InstanceManager.getListing(InstanceManager.java:141)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:497)
>       at 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
>       at 
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
>       at 
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to