Hadoop InstallSteps
Hadoop InstallSteps
1: Run Ubuntu
Install Secure Shell (ssh) for client and server or server only.
8:vsmcoesys058$ sudo apt-get install openssh.server
Note : Press y or yes when prompt messages required
OR (
16B: Open our Softwares Folder in Home directory .
16.1: Right Click on hadoop-2.7.1.tar.gz zipped file.
16.2: Click on “Open with Archive Manager”
16.3: Right Click on hadoop-2.7.1
16.4. Click on Extract
16.5: Click /Home directory in left side Explorer
16.6: Click Extract button available at right side Down Corner.
16.7: After Extraction,Click Close button of Extraction Result dialog box
Rename hadoop-2.7.1 into hadoop using mv command :
16.8: hdvsm@/home/admins$ sudo mv hadoop-2.7.1 hadoop
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop_tmp/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop_tmp/hdfs/datanode</value>
</property>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
Now Create Folder for HDFS for maintaining NameNode and DataNode
35:hdvsm$ start-yarn.sh
Note: some times , system asks as follows for 2 times:
Enter passphrase for key '/home/hduser/.ssh/id_rsa': Press enter Key
hduser@localhost's password: Type password of hadoop user.
Close all Daemons at the end the processing of HDFS & MapReduce
33:hdvsm$ stop-all.sh
-------------------------------------------------------------------------------------------
Common Errors:
1 If Name node is not shown by jps command , then apply step 33 to
format Name Node and start all Daemons.
Opening Eclipse
-------------------------------------------------------------------------------------
6. Open Eclipse
Note: Create workspace for our project in any folder/directory. Remember
workspacename and its directory.Ex: WorkSpaceWordCount. Click Next
7. Once Eclipse is opened, Maximize Eclipse window to display Menu bar.
Otherwise, Menu Bar will not displayed. OR Click New Icon.
8. To open New Project:
8.1. File -> New -> Project -> Java project
8.2. Type projectName Ex: prjWordCount
8.3. Click Next -> Finish
9. Add New Class to the project
9.1. Right Click on Projectname in left side project explorer
9.2. New --> Class ->
9,3.Remove Package name ,if exists. Then class will be stored in default
package.and
9.4.Type Class name , which is equals to main () method's class name in
your source code
9.5. Click Finish Button
Note: Click OK Button for Perspective message box
Note: if package name is specified when creating class, then
package packagename; should be the first statement of source code of your
class. And Use your class as packagename.classname whereever required.
11. Paste the code into Eclipse code area and Save project Ctrl+S
---------------------------------------------------------------------------------------
13. Maximize Terminal
14. To run MapReduce Program :
syntax : $ cd workspacename
14.1 $ cd WorkSpaceWordCount
where,
jar file : WordCount.jar
class name: WordCount
inputfolder: /inputs (which is already created)
input filename: Words.txt (which is already created)
outputfolder: /wordcountoutput ( It will be created automatically by the
HDFS) to store output files , which are produced by The Hadoop. Separate
output folder will be created for each Program
OR
Thank you.