falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajay Yadava (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FALCON-1565) Listing API non-intuitive response if time > endTime
Date Tue, 29 Dec 2015 05:40:49 GMT

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

Ajay Yadava commented on FALCON-1565:
-------------------------------------

I think the approach requires a little bit of description. I had an offline discussion with
[~Praveen] so I will try to add some details here.

The main problem is that the current error handling mechanism is not very robust. In case
of exceptions / errors we need a uniform way to pass error messages to the client. Exceptions
and errors which are thrown vary from methods, several methods try to stick to same format
of message in case of success and failure but it is not uniform. The client handling of error
messages is also not uniform, today it can interpret only APIResult and InstanceResult messages,
in other cases it just reads the entire message as a String (which will include the stack
trace also). The situation is further complicated by one more level of serialisation and deserialisation
in distributed mode(at Prism). Wrapping of exceptions causes the .getMessage() approach to
also bring in unwanted details like class Names etc.  

The simplistic approach taken in this JIRA is to wrap APIResult as an entity with the message
containing the details of failure and deserializing to respective class in case of success
and  APIResult in case of error. For now to keep the changes to a minimum, changes have been
made to only the two scenarios reported in this JIRA, so that the changes can be rolled out
for 0.9. Praveen will create another JIRA to make the error handling uniform across all the
API calls. We can discuss various pros and cons and other approaches for error propagation
in that JIRA.

> 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: 0.9
>
>         Attachments: FALCON-1565.patch
>
>
> 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)

Mime
View raw message