You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Jeff Yuan <qu...@gmail.com> on 2013/03/02 01:04:07 UTC

Error while parsing commandline properties

Hi guys,

I'm running pig from the command line in local mode, and trying to
pass in some properties, for example:
pig -x local ... -p mapred.map.tasks=2 -p mapred.reduce.tasks=1 ...

I'm getting errors;
INFO parameters.ParameterSubstitutionPreprocessor: Encountered "
<OTHER> ".map.tasks=2 "" at line 1, column 7.
Was expecting:
    "=" ...

My question is, what am I doing wrong? What's the correct way to pass
in the properties via command line arguments?

Thanks,
Jeff

Re: Error while parsing commandline properties

Posted by Jeff Yuan <qu...@gmail.com>.
I guess maybe I was confused between the concept of parameter (as in
parameter substitution) and properties. I think I cleared it up now.
Thanks!

On Fri, Mar 1, 2013 at 5:21 PM, Johnny Zhang <xi...@cloudera.com> wrote:
> Hi, Jeff:
> If I understand correctly. I think you need that if you need to pass value
> to parameter in pig script in runtime. However, the value should be passed
> in by "pig -param <param>=<value>" instead of "pig -p", Can you try that?
>
> Johnny
>
>
>
>
> On Fri, Mar 1, 2013 at 4:58 PM, Jeff Yuan <qu...@gmail.com> wrote:
>
>> Hi Johnny,
>> Actually it was a mistake on my part. I was writing some custom code
>> that launches Grunt and I had a call that passed my input through
>> ParameterSubstitutionPreprocessor when it may not need to be. I
>> haven't had a chance to thoroughly read that class. Do you know off
>> the top of your head what kind of functionality does this class
>> provide? Would I be correct in assuming it's normally not needed?
>>
>> Jeff
>>
>>
>> On Fri, Mar 1, 2013 at 4:11 PM, Johnny Zhang <xi...@cloudera.com> wrote:
>> > Hi, Jeff:
>> > It works for me though. Can you paste the whole command?
>> >
>> > Johnny
>> >
>> >
>> > On Fri, Mar 1, 2013 at 4:04 PM, Jeff Yuan <qu...@gmail.com>
>> wrote:
>> >
>> >> Hi guys,
>> >>
>> >> I'm running pig from the command line in local mode, and trying to
>> >> pass in some properties, for example:
>> >> pig -x local ... -p mapred.map.tasks=2 -p mapred.reduce.tasks=1 ...
>> >>
>> >> I'm getting errors;
>> >> INFO parameters.ParameterSubstitutionPreprocessor: Encountered "
>> >> <OTHER> ".map.tasks=2 "" at line 1, column 7.
>> >> Was expecting:
>> >>     "=" ...
>> >>
>> >> My question is, what am I doing wrong? What's the correct way to pass
>> >> in the properties via command line arguments?
>> >>
>> >> Thanks,
>> >> Jeff
>> >>
>>

Re: Error while parsing commandline properties

Posted by Johnny Zhang <xi...@cloudera.com>.
Hi, Jeff:
If I understand correctly. I think you need that if you need to pass value
to parameter in pig script in runtime. However, the value should be passed
in by "pig -param <param>=<value>" instead of "pig -p", Can you try that?

Johnny




On Fri, Mar 1, 2013 at 4:58 PM, Jeff Yuan <qu...@gmail.com> wrote:

> Hi Johnny,
> Actually it was a mistake on my part. I was writing some custom code
> that launches Grunt and I had a call that passed my input through
> ParameterSubstitutionPreprocessor when it may not need to be. I
> haven't had a chance to thoroughly read that class. Do you know off
> the top of your head what kind of functionality does this class
> provide? Would I be correct in assuming it's normally not needed?
>
> Jeff
>
>
> On Fri, Mar 1, 2013 at 4:11 PM, Johnny Zhang <xi...@cloudera.com> wrote:
> > Hi, Jeff:
> > It works for me though. Can you paste the whole command?
> >
> > Johnny
> >
> >
> > On Fri, Mar 1, 2013 at 4:04 PM, Jeff Yuan <qu...@gmail.com>
> wrote:
> >
> >> Hi guys,
> >>
> >> I'm running pig from the command line in local mode, and trying to
> >> pass in some properties, for example:
> >> pig -x local ... -p mapred.map.tasks=2 -p mapred.reduce.tasks=1 ...
> >>
> >> I'm getting errors;
> >> INFO parameters.ParameterSubstitutionPreprocessor: Encountered "
> >> <OTHER> ".map.tasks=2 "" at line 1, column 7.
> >> Was expecting:
> >>     "=" ...
> >>
> >> My question is, what am I doing wrong? What's the correct way to pass
> >> in the properties via command line arguments?
> >>
> >> Thanks,
> >> Jeff
> >>
>

Re: Error while parsing commandline properties

Posted by Jeff Yuan <qu...@gmail.com>.
Hi Johnny,
Actually it was a mistake on my part. I was writing some custom code
that launches Grunt and I had a call that passed my input through
ParameterSubstitutionPreprocessor when it may not need to be. I
haven't had a chance to thoroughly read that class. Do you know off
the top of your head what kind of functionality does this class
provide? Would I be correct in assuming it's normally not needed?

Jeff


On Fri, Mar 1, 2013 at 4:11 PM, Johnny Zhang <xi...@cloudera.com> wrote:
> Hi, Jeff:
> It works for me though. Can you paste the whole command?
>
> Johnny
>
>
> On Fri, Mar 1, 2013 at 4:04 PM, Jeff Yuan <qu...@gmail.com> wrote:
>
>> Hi guys,
>>
>> I'm running pig from the command line in local mode, and trying to
>> pass in some properties, for example:
>> pig -x local ... -p mapred.map.tasks=2 -p mapred.reduce.tasks=1 ...
>>
>> I'm getting errors;
>> INFO parameters.ParameterSubstitutionPreprocessor: Encountered "
>> <OTHER> ".map.tasks=2 "" at line 1, column 7.
>> Was expecting:
>>     "=" ...
>>
>> My question is, what am I doing wrong? What's the correct way to pass
>> in the properties via command line arguments?
>>
>> Thanks,
>> Jeff
>>

Re: Error while parsing commandline properties

Posted by Johnny Zhang <xi...@cloudera.com>.
Hi, Jeff:
It works for me though. Can you paste the whole command?

Johnny


On Fri, Mar 1, 2013 at 4:04 PM, Jeff Yuan <qu...@gmail.com> wrote:

> Hi guys,
>
> I'm running pig from the command line in local mode, and trying to
> pass in some properties, for example:
> pig -x local ... -p mapred.map.tasks=2 -p mapred.reduce.tasks=1 ...
>
> I'm getting errors;
> INFO parameters.ParameterSubstitutionPreprocessor: Encountered "
> <OTHER> ".map.tasks=2 "" at line 1, column 7.
> Was expecting:
>     "=" ...
>
> My question is, what am I doing wrong? What's the correct way to pass
> in the properties via command line arguments?
>
> Thanks,
> Jeff
>