Sei sulla pagina 1di 3

Some

additional Hadoop setup information



(Note: Some of the steps mentioned below are specifically for the VM I have provided.)

If you are unable to connect to http://localhost:50070
o First execute JPS and check if namenode, secondarynamenode, datanode and jps
processes are up.



o If namenode or datanode isnt up,
Stop the daemons (sbin/stop-dfs.sh)
Reformat namenode (bin/hadoop namenode format)
o If the above steps dont fix the issue
Browse to /tmp folder and clear all the temporary files. See images
below.



If you are unable to connect to http://localhost:8088/cluster
o Start the yarn processes (sbin/start-yarn.sh)
o The ResourceManager and NodeManager should be up in addition to the ones
mentioned above. See image below.



Hadoop Setup on Eclipse using the plugin
o If you have followed the steps given in the project document to configure Eclipse and if
you are unable to execute the WordCount program, you might find some of the below
information useful.
o It is recommended that you download the hadoop-eclipse-plugin-2.4.1.jar file from the
link given in the Project document instead of building it from source.
o After you configure the DFS location in Eclipse, to run the WordCount program, refer to
the steps below
Create a new MapReduce Project


Click Next and specify the Hadoop library location. The Hadoop library location
should be the folder where Hadoop was installed.



Create the WordCount java file in the src directory.
The input and output path should be as below (provided you have created the
directory structure in the HDFS). See image below.

FileInputFormat.addInputPath(job, new Path("hdfs://localhost:9000/user/hadoop/input"));
FileOutputFormat.setOutputPath(job, new Path("hdfs://localhost:9000/user/hadoop/output"));



Finally, to run the WordCount program, select the Run on Hadoop option. (See image
below)



For more info on setting up Eclipse plugin:
- https://developer.yahoo.com/hadoop/tutorial/module3.html#plugin-install
- http://hadoop-study.webnode.kr/news/now-we-will-plugin-hadoop-on-eclipse-hadoop-ver-2-6-0-os-centos7/


I hope you find this information useful.

Potrebbero piacerti anche