You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Cheolsoo Park (JIRA)" <ji...@apache.org> on 2013/06/12 19:29:20 UTC
[jira] [Commented] (PIG-3204) Reduce the number of getSchema calls
during script parsing
[ https://issues.apache.org/jira/browse/PIG-3204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13681416#comment-13681416 ]
Cheolsoo Park commented on PIG-3204:
------------------------------------
[~rohini], I find this logic a bit confusing:
{code}
if( batchMode ) {
...
}
if(validateEachStatement){
validateQuery();
}
if (batchMode && !skipParseForBatch) {
parseQuery();
}
if( !batchMode ) {
parseQuery();
...
}
{code}
Instead, how about returning early if batchMode && skipParseForBatch? That is,
{code}
if( batchMode ) {
...
if (skipParseForBatch) {
return;
}
}
if(validateEachStatement){
validateQuery();
}
parseQuery();
{code}
I am assuming that there is no need for validateQuery() when skipping parseQuery().
Does this make sense?
> Reduce the number of getSchema calls during script parsing
> ----------------------------------------------------------
>
> Key: PIG-3204
> URL: https://issues.apache.org/jira/browse/PIG-3204
> Project: Pig
> Issue Type: Improvement
> Affects Versions: 0.10.1
> Reporter: Rohini Palaniswamy
> Assignee: Rohini Palaniswamy
> Fix For: 0.12
>
> Attachments: PIG-3204-1.patch
>
>
> Currently there are a lot of NN calls made to determine if there is a schema file for a path in a LOAD statement. When there is a slow NN(caused by whole bunch of other issues), it takes a lot of time for this and we found the scripts spending anywhere from 5 mins to 40 mins depending upon the script. It seems to be a good place for optimization.
--
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