You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Gopal Gandhi <go...@yahoo.com> on 2008/08/05 22:58:34 UTC

How to write JAVA code for Hadoop streaming.

I am using Hadoop streaming and I want to write the map/reduce scripts in JAVA, rather than perl, etc. Would anybody give me a sample? Thanks



      

Re: How to write JAVA code for Hadoop streaming.

Posted by "Edward J. Yoon" <ed...@apache.org>.
Streaming gives an simple interface like Pipe operator in Linux shell,
so that it can be used for other application.

And, Gopal.

See the usage at http://wiki.apache.org/hadoop/HadoopStreaming

  -mapper   <cmd|JavaClassName>      The streaming command to run
  -reducer  <cmd|JavaClassName>      The streaming command to run

I guess you just need to make your map/reduce class.

-Edward J. Yoon

On Wed, Aug 6, 2008 at 11:35 AM, Taeho Kang <tk...@gmail.com> wrote:
> It sounds strange to me that you want to use MapReduce scripts in Java just
> to run it on Hadoop Streaming.
>
> Why don't you write MapReduce in Java (e.g. WordCount example) and run it it
> on the default MapReduce framework?
> That way you don't even have to rely on Hadoop streaming.
> On Wed, Aug 6, 2008 at 5:58 AM, Gopal Gandhi <go...@yahoo.com>wrote:
>
>> I am using Hadoop streaming and I want to write the map/reduce scripts in
>> JAVA, rather than perl, etc. Would anybody give me a sample? Thanks
>>
>>
>>
>>
>



-- 
Best regards, Edward J. Yoon
edwardyoon@apache.org
http://blog.udanax.org

Re: How to write JAVA code for Hadoop streaming.

Posted by Taeho Kang <tk...@gmail.com>.
It sounds strange to me that you want to use MapReduce scripts in Java just
to run it on Hadoop Streaming.

Why don't you write MapReduce in Java (e.g. WordCount example) and run it it
on the default MapReduce framework?
That way you don't even have to rely on Hadoop streaming.
On Wed, Aug 6, 2008 at 5:58 AM, Gopal Gandhi <go...@yahoo.com>wrote:

> I am using Hadoop streaming and I want to write the map/reduce scripts in
> JAVA, rather than perl, etc. Would anybody give me a sample? Thanks
>
>
>
>