You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Aniket Mokashi (JIRA)" <ji...@apache.org> on 2012/11/01 06:55:12 UTC
[jira] [Commented] (PIG-2204) Allow passing arguments to custom
Partitioners
[ https://issues.apache.org/jira/browse/PIG-2204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488496#comment-13488496 ]
Aniket Mokashi commented on PIG-2204:
-------------------------------------
Wouldn't this need support from hadoop? Current org.apache.hadoop.mapreduce.Job api provides only one api - setPartitionerClass(Class<? extends Partitioner> cls). We will need setPartitionerClass(Class<? extends Partitioner> cls, String[] ctorArgs) or some such api in hadoop. Is that correct? Am I missing something?
If we have to work around this, we need to have a ConfigurablePartitioner and then make pig pass the parameter from CLI to job configuration. Do we want to take that route?
> Allow passing arguments to custom Partitioners
> ----------------------------------------------
>
> Key: PIG-2204
> URL: https://issues.apache.org/jira/browse/PIG-2204
> Project: Pig
> Issue Type: Improvement
> Reporter: Dmitriy V. Ryaboy
>
> Currently, this works:
> {code}
> y = group x by $0 partition by MyPartitioner PARALLEL 2;
> {code}
> However, passing an argument to the partitioner constructor does not work, and dies with a misleading error:
> {code}
> y = group x by $0 partition by MyPartitioner(0) PARALLEL 2;
> 2011-08-03 22:53:23,074 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " "(" "( "" at line 1, column 91.
> Was expecting one of:
> "parallel" ...
> ";" ...
> "." ...
> "$" ...
> {code}
--
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