Support Questions
Find answers, ask questions, and share your expertise

Write and execute mapreduce in Hortonworks Sandbox

Highlighted

Write and execute mapreduce in Hortonworks Sandbox

I have been practicing MapReduce on Ubuntu. Can somebody explain me, on Hortonworks Sandbox

1) How to write a MapReduce Program? Where is Eclipse? What Jars to be included in Build Path?

2) How to execute the MapReduce program?

6 REPLIES 6
Highlighted

Re: Write and execute mapreduce in Hortonworks Sandbox

Super Guru
Highlighted

Re: Write and execute mapreduce in Hortonworks Sandbox

Mentor

You can follow this tutorial to setup an IDE with Sandbox https://github.com/hortonworks-gallery/ambari-vnc-service

Re: Write and execute mapreduce in Hortonworks Sandbox

@Kuldeep Kulkarni

Thanks for your response. I have gone through the pdf.

1. In the pdf, there is one java program with driver, mapper and reduce programs. Did not mention how this program was written, using which IDE. Suppose, if I connect through VNC client and use Eclipse to write these driver, mapper and reducer programs, I will write them as 3 classes - 3 different files. Do I have to merge them to one file to run the job?

What is the general practice? people write using Eclipse or is there anyway to write using vi editor?

2. While writing these classes in Eclipse, what are the jar files I need to add to build path?

Highlighted

Re: Write and execute mapreduce in Hortonworks Sandbox

Mentor

You need to compile with hadoop-client and you can package all classes together

Highlighted

Re: Write and execute mapreduce in Hortonworks Sandbox

Super Guru
Highlighted

Re: Write and execute mapreduce in Hortonworks Sandbox

New Contributor

For people from 2018, you need to use `hadoop classpath` for specifying path to Hadoop classes (see https://community.hortonworks.com/questions/83006/java-compile-problem-for-hadoopdfsfilereadwritejav... instead of /usr/share/hadoop/hadoop -core -*.jar from tutorial document.