Take the 2-minute tour ×

I am new in hadoop I have downloaded the hortonworks sanbox image and mounted that with virtualBox. And sanbox ui is coming in the localhost when I am typing in the Chrome. Also I am able to log in to hadoop shell with hue/hadoop username password. Now I want to run a simple program in eclipse. I have added hadoop-0.18.3-eclipse-plugin to the eclipse and then tried the following steps.

1.choosed map/reduce from eclipse.
2.went to hadoop location editer 

localhost name:localhost
under map/reduce master
under DFS master

But I am getting this error

Cannot connect to the Map/Reduce location: localhost Call to localhost/ failed on connection exception: java.net.ConnectException: Connection refused: no further information

Virtual box is running.

share|improve this question
is it or localhost? Those two contradict each other. –  Remus Rusanu Dec 29 '13 at 20:32
@RemusRusanu is the url i am running hortonworks sandbox locally but i saw a tutorial to configure hadoop with eclipse see this youtube.com/watch?v=TavehEdfNDk –  lucifer Dec 30 '13 at 9:29

1 Answer 1

  1. Add required hadoop dependancy jar files to your eclipse class path.

  2. In your main method of your mapreduce program add these lines Configuration conf = new Configuration(); conf.set("fs.default.name", "hdfs://localhost:50000"); conf.set("mapreduce.job.tracker", "localhost:50001");

  3. if you are running in virtual machine change the localhost to required ip address (where hadoop demon runs).you can get the ip address bytyping ifconfig
  4. run the mapreduce program as simple java program .you will get the output in the eclipse console.
share|improve this answer

Your Answer


