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 2012/10/05 21:24:03 UTC

[jira] [Commented] (PIG-2689) JsonStorage fails to find schema when LimitAdjuster runs

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

Alan Gates commented on PIG-2689:
---------------------------------

This patch no longer applies because PhysicalOperator no longer has a setAlias method.  It's not clear to me why that was removed.  It also wasn't clear to me whether it was required for this patch (it looked like the setSignature was the one that mattered, but I wanted to confirm that before proceeding).

As for the e2e tests for this, ideally I agree we should have one.  But we don't generate any json data in the tests yet, so it seems too much to ask to add a new data set and tests for it.

I'm going to set this JIRA to open since the patch as is doesn't apply.  But if you feel setAlias isn't required I'm fine to apply the patch.
                
> JsonStorage fails to find schema when LimitAdjuster runs
> --------------------------------------------------------
>
>                 Key: PIG-2689
>                 URL: https://issues.apache.org/jira/browse/PIG-2689
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Doug Daniels
>         Attachments: PIG-2689.patch
>
>
> Scripts that both save out data with JsonStorage and trigger the LimitAdjuster (e.g. doing an order by followed by a limit) yield the following Exception:
> java.io.IOException: Could not find schema in UDF context
>         at org.apache.pig.builtin.JsonStorage.prepareToWrite(JsonStorage.java:125)
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.<init>(PigOutputFormat.java:125)
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat.getRecordWriter(PigOutputFormat.java:86)
>         at org.apache.hadoop.mapred.ReduceTask$NewTrackingRecordWriter.<init>(ReduceTask.java:569)
>         at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:638)
>         at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:417)
>         at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:260)
> This happens b/c the LimitAdjuster does not copy the signature into it's newly created POStore, and hence JsonStorage looks for the schema for a null signature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira