You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Premal Shah <pr...@gmail.com> on 2011/08/10 22:07:51 UTC
Command line args to streaming scripts
Is it possible to pass command line arguments to streaming scripts?
eg: python mapper.py --match=2
can i pass match=2 using a streaming command to mapper.py?
--
Regards,
Premal Shah.
Re: Command line args to streaming scripts
Posted by Premal Shah <pr...@gmail.com>.
i tried dumbo. my input is a log file. dumbo was splitting each log line by
spaces while passing me the input. that was totally weird. i would have
expected it to just split the file by line breaks.
will try -cmdenv
thanx
On Wed, Aug 10, 2011 at 1:26 PM, Harsh J <ha...@cloudera.com> wrote:
> Perhaps you can use -cmdenv (environment variables) instead?
>
>
> http://hadoop.apache.org/common/docs/r0.20.2/streaming.html#Specifying+Additional+Configuration+Variables+for+Jobs
>
> Btw, if you are using Python, I suggest taking a look at Dumbo. Things
> are a lot more easier with it. Dumbo is at http://last.fm/dumbo
>
> On Thu, Aug 11, 2011 at 1:37 AM, Premal Shah <pr...@gmail.com>
> wrote:
> > Is it possible to pass command line arguments to streaming scripts?
> > eg: python mapper.py --match=2
> >
> > can i pass match=2 using a streaming command to mapper.py?
> >
> > --
> > Regards,
> > Premal Shah.
> >
>
>
>
> --
> Harsh J
>
--
Regards,
Premal Shah.
Re: Command line args to streaming scripts
Posted by Harsh J <ha...@cloudera.com>.
Perhaps you can use -cmdenv (environment variables) instead?
http://hadoop.apache.org/common/docs/r0.20.2/streaming.html#Specifying+Additional+Configuration+Variables+for+Jobs
Btw, if you are using Python, I suggest taking a look at Dumbo. Things
are a lot more easier with it. Dumbo is at http://last.fm/dumbo
On Thu, Aug 11, 2011 at 1:37 AM, Premal Shah <pr...@gmail.com> wrote:
> Is it possible to pass command line arguments to streaming scripts?
> eg: python mapper.py --match=2
>
> can i pass match=2 using a streaming command to mapper.py?
>
> --
> Regards,
> Premal Shah.
>
--
Harsh J