Install Hadoop in Mac







#1. Download the latest hadoop distribution from
http://mirrors.ibiblio.org/apache/hadoop/common/


#2. Extract the compressed file anywhere

#3. Then change the following files

hadoop_distro/etc/hadoop/hdfs-site.xml
1
2
3
4
5
6
<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>
hadoop_distro/etc/hadoop/core-site.xml
1
2
3
4
5
6
<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>
hadoop_distro/etc/hadoop/yarn-site.xml
1
2
3
4
5
6
<configuration>
    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>
</configuration>
hadoop_distro/etc/hadoop/mapred-site.xml
1
2
3
4
5
6
<configuration>
    <property>
        <name>mapreduce.framework.name</name>
        <value>yarn</value>
    </property>
</configuration>

#4. JAVA_HOME, HADOOP_HOME settings
In my case I've installed hadoop in /var/www/html/hadoop

export HADOOP_HOME=/var/www/html/hadoop/hadoop-2.7.3
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$PATH:$HADOOP_HOME/bin


#5. Format HDFS
$bin/hdfs namenode -format

#6. Start HDFS
$sbin/start-dfs.sh

#7. Start YARN
$sbin/start-yarn.sh

#8. Goto browser and navigate
http://localhost:50070/


Popular posts from this blog

[Solved] Hive installation error: java.net.URISyntaxException: Relative path in absolute URI

Install Android SDK in centOs

Installing arules package (Association Rules) in R