You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2009/11/12 05:51:39 UTC

[jira] Assigned: (PIG-109) improve exception handling for function instantiation

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

Alan Gates reassigned PIG-109:
------------------------------

    Assignee: Johannes Zillmann

> improve exception handling for function instantiation
> -----------------------------------------------------
>
>                 Key: PIG-109
>                 URL: https://issues.apache.org/jira/browse/PIG-109
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>            Reporter: Johannes Zillmann
>            Assignee: Johannes Zillmann
>             Fix For: 0.1.0
>
>         Attachments: PIG-109_620665.patch, pigExceptionPatch-627601.diff
>
>
> Running pig on a cluster i got an instantiation exception for my custom StoreFunc:
> {noformat}
> 08/02/13 22:58:42 ERROR mapreduceExec.MapReduceLauncher: Error message from task (map) tip_200802110401_0072_m_000000 java.lang.RuntimeException: java.io.IOException: null
>         at org.apache.pig.impl.PigContext.instantiateFunc(PigContext.java:427)
>         at org.apache.pig.impl.PigContext.instantiateFuncFromSpec(PigContext.java:435)
>         at org.apache.pig.backend.hadoop.executionengine.mapreduceExec.PigOutputFormat.getRecordWriter(PigOutputFormat.java:58)
>         at org.apache.pig.backend.hadoop.executionengine.mapreduceExec.PigOutputFormat.getRecordWriter(PigOutputFormat.java:47)
>         at org.apache.pig.backend.hadoop.executionengine.mapreduceExec.PigMapReduce.setupMapPipe(PigMapReduce.java:205)
>         at org.apache.pig.backend.hadoop.executionengine.mapreduceExec.PigMapReduce.run(PigMapReduce.java:103)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:192)
>         at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:1760)
> {noformat} 
> Easy to figure out that there is a problem with my StoreFunc, but hard to figure out what exactly.
> Looking into the pig code up from PigContext#instantiateFunc() there is a kind of exception handling which seems unecessary complicated.
> Any exception which can happen while instantiating the store func (like InstantiationException or InvocationTargetException) is catched and wrapped with a IOException. 
> Later on the cause of the IOException is inspected (LOLoad, around line 60) or wrapped into a RuntimeException without handing the causes over (PigSplit, around line 101).
> Since every exception which can raise on PigContext#instantiateFunc() is rather an user error since a temporary environment problem, i think this method can just throw an unchecked exception and don't have to declare IOeception anymore. This should save a lot of trouble in calling methods.

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