hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rong-en Fan" <gra...@gmail.com>
Subject Re: [Streaming] How to pass arguments to a map/reduce script
Date Thu, 21 Aug 2008 15:09:41 GMT
On Thu, Aug 21, 2008 at 3:14 PM, Gopal Gandhi
<gopal.gandhi2008@yahoo.com> wrote:
> I am using Hadoop streaming and I need to pass arguments to my map/reduce script. Because
a map/reduce script is triggered by hadoop, like
> hadoop ....  -file MAPPER -mapper "$MAPPER" -file REDUCER -reducer "$REDUCER" ...
> How can I pass arguments to MAPPER?
> I tried -cmdenv name=val , but it does not work.
> Anybody can help me? Thanks lot.

I use -jobconf, for example

hadoop ... -jobconf my.mapper.arg1="foobar"

and in the map script, I get this by reading the environment variable


Hope this helps,
Rong-En Fan

View raw message