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

Richard Ding commented on PIG-1333:
-----------------------------------

A few comments about the comments:

bq. Why is MAX_SCRIPT_SIZE so short? Is it an arbitrary number? We produce 
significantly longer scrips all the time. I assume it's to save on space; 
perhaps you can make it controllable by some property?

This is a compromise. Next release of Hadoop will completely fix this problem 
(no limit on the length of the scripts). Until then, we won't allow users to 
change this setting and inadvertently affect Hadoop performance. 

bq. I am not very familiar with the visitors, but it looks like normally, 
PhyPlanVisitor spawns a walker for the internal plans of Filter, 
CollectedGroup, and so on; this behavior appears to be gone from AliasVisitor. 
Should it be reproduced in AliasVisitor?

I think the top-level aliases are enough to identify the operators. No need to 
use alias in the inner plans.

bq. Just a style thing, but I prefer writing setter methods that return self 
instead of being void - that way you can chain them together.

I agree with you on this. But I also want to be consistent with the style used 
through out Pig. So I didn't change the setters. 



> API interface to Pig
> --------------------
>
>                 Key: PIG-1333
>                 URL: https://issues.apache.org/jira/browse/PIG-1333
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Olga Natkovich
>            Assignee: Richard Ding
>             Fix For: 0.8.0
>
>         Attachments: PIG-1333.patch, PIG-1333_1.patch, PIG-1333_2.patch, 
> PIG-1333_3.patch
>
>
> It would be nice to make Pig more friendly for applications like workflow 
> that would be executing pig scripts on user behalf.
> Currently, they would have to use pig command line to execute the code; 
> however, this has limitation on the kind of output that would be delivered. 
> For instance, it is hard to produce error information that is easy to use 
> programatically or collect statistics.
> The proposal is to create a class that mimics the behavior of the Main but 
> gives users a status object back. The the main code of pig would look 
> somethig like:
> public static void main(String args[])
> {
>     PigStatus ps = PigMain.exec(args);
>     exit (PigStatus.rc);
> }
> We need to define the following:
> - Content of PigStatus. It should at least include
>    * return code
>    * error string
>    * exception 
>    * statistics
> - A way to propagate the status class through pig code

-- 
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