References
Prerequisites
- Homebrew
Installing Hadoop
|
|
Hadoop will be installed in the following directory /usr/local/Cellar/hadoop
Configuring Hadoop
Edit hadoop-env.sh
The file can be located at /usr/local/Cellar/hadoop/2.8.0/libexec/etc/hadoop/hadoop-env.sh where 2.8.0 is the hadoop version.
Find the line with
|
|
and change it to
|
|
Edit Core-site.xml
The file can be located at /usr/local/Cellar/hadoop/2.8.0/libexec/etc/hadoop/core-site.xml
|
|
Edit mapred-site.xml
The file can be located at /usr/local/Cellar/hadoop/2.8.0/libexec/etc/hadoop/mapred-site.xml and by default will be blank.
|
|
Edit hdfs-site.xml
The file can be located at /usr/local/Cellar/hadoop/2.8.0/libexec/etc/hadoop/hdfs-site.xml .
|
|
To simplify life edit your ~/.profile using vim or your favorite editor and add the following two commands. By default ~/.profile might not exist. If it doesn’t work after restarting terminal, try to edit ~/.bash_profile.
|
|
|
|
in the terminal to update.
Before we can run Hadoop we first need to format the HDFS using
|
|
SSH Localhost
Nothing needs to be done here if you have already generated ssh keys. To verify just check for the existance of ~/.ssh/id_rsa and the ~/.ssh/id_rsa.pub files. If not the keys can be generated using
|
|
Enable Remote Login
“System Preferences” -> “Sharing”. Check “Remote Login”
Authorize SSH Keys
To allow your system to accept login, we have to make it aware of the keys that will be used
|
|
Let’s try to login.
|
|
Running Hadoop
Now we can run Hadoop just by typing
|
|
and stopping using
|
|
Using Basic Hadoop Commands
|
|