Congratulation!! We have successfully installed Hadoop 1.0 on Windows.
- Open Cygwin and type the command “explorer .” to open Home folder.
Create a folder with name “hadoop-dir”. And inside “hadoop-dir” folder create 2 folder with names “datadir” and “namedir”.
- In Cygwin execute chmod command to change folder permissions so that it will be accesses by Hadoop.
$ chmod 755 hadoop-dir
$ chmod 755 datadir
$ chmod 755 namedir
You need to change the current folder using cd command before executing these commands.
Open Cygwin terminal (Run as Administration) and execute following command
$ cd hadoop-x.y.z
$ cd conf
$ explorer .
It will open conf folder in Windows explorer window.
Open hadoop-env.sh file to set Java home as you did it before for environmental variable setup
Uncomment the line which contains “export JAVA_HOME” and provide your Java path.
export JAVA_HOME= "C:\Java\"
- Open core-site.xml file and add below code.
- Open mapred -site.xml file and add below code
- Open hdfs -site.xml file and add below code
Change the USER_FOLDER_NAME in the below code as per your your user name.
- For every file we changed, run dos2unix command.
In the next chapter we will see how to format NameNode folder, start the Hadoop daemons and run MapReduce programs.