[ 
https://issues.apache.org/jira/browse/PIG-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Gates reassigned PIG-125:
------------------------------

    Assignee: Johannes Zillmann

> improve exception handling and expressivness around tuple field access
> ----------------------------------------------------------------------
>
>                 Key: PIG-125
>                 URL: https://issues.apache.org/jira/browse/PIG-125
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>            Reporter: Johannes Zillmann
>            Assignee: Johannes Zillmann
>             Fix For: 0.1.0
>
>         Attachments: PIG-125.patch
>
>
> Stumbled over the case that i'm accessing fields in a tuple which type are 
> not as i expected. The stack trace in one case looked as follow:
> {noformat}
> Exception in thread "main" java.lang.RuntimeException: execution failed
>       at com.my.Executor.run(Executor.java:284)
> Caused by: java.io.IOException: Unable to store alias C
>       at 
> org.apache.pig.impl.util.WrappedIOException.wrap(WrappedIOException.java:16)
>       at org.apache.pig.PigServer.store(PigServer.java:335)
>       at org.apache.pig.PigServer.store(PigServer.java:317)
>       at com.my.Executor.run(Executor.java:280)
>       ... 2 more
> Caused by: org.apache.pig.backend.executionengine.ExecException
>       at 
> org.apache.pig.backend.local.executionengine.LocalExecutionEngine.execute(LocalExecutionEngine.java:137)
>       at 
> org.apache.pig.backend.local.executionengine.LocalExecutionEngine.execute(LocalExecutionEngine.java:32)
>       at org.apache.pig.PigServer.store(PigServer.java:332)
>       ... 4 more
> Caused by: java.io.IOException: Incompatible type for request getAtomField().
>       at org.apache.pig.data.Tuple.getAtomField(Tuple.java:177)
>       at com.my.DatabaseStoreFunc.putNext(DatabaseStoreFunc.java:83)
>       at org.apache.pig.impl.io.PigFile.store(PigFile.java:64)
>       at 
> org.apache.pig.backend.local.executionengine.POStore.getNext(POStore.java:105)
>       at 
> org.apache.pig.backend.local.executionengine.LocalExecutionEngine.execute(LocalExecutionEngine.java:130)
>       ... 6 more
> {noformat}
> The exception message and the stacktrace gave me a clue what kind of problem 
> i was facing. But to know what exactly happened i needed to debug (or 
> temporarily add some system-outs).  
> Looking at the code (of Tuple class) i think the exception-information can be 
> improved easily (add index and actual field type information) .
> Also it seems that there is some space for simplifying the exception handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to