码迷,mamicode.com
首页 > 其他好文 > 详细

Hadoop Standalone and Pseudo Mode

时间:2016-08-19 20:45:02      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:

. Required Software
yum install openssh-server rsync java-1.8.0-openjdk-devel


. Setup Hostname
/etc/hosts
x.x.x.x yourhostname

. Prepare to Start the Hadoop Cluster
etc/hadoop/hadoop-env.sh:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk

?

. Standalone Operation
mkdir input
cp etc/hadoop/*.xml input
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar grep input output ‘dfs[a-z.]+‘
cat output/*


. Pseudo-Distributed Operation
etc/hadoop/core-site.xml:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>

etc/hadoop/hdfs-site.xml:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

. Setup passphraseless ssh

. Execution
bin/hdfs namenode -format
sbin/start-dfs.sh

. Make the HDFS directories
bin/hdfs dfs -mkdir /user
bin/hdfs dfs -mkdir /user/root

. Copy the input files into the distributed filesystem:
bin/hdfs dfs -put etc/hadoop input

. Run some of the examples
bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.2.jar grep input output ‘dfs[a-z.]+‘

. Copy the output files from the distributed filesystem to the local filesystem
bin/hdfs dfs -get output output

. Stop
sbin/stop-dfs.sh

. YARN on a Single Node
etc/hadoop/mapred-site.xml:
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

etc/hadoop/yarn-site.xml:
<configuration>
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>

. Start ResourceManager daemon and NodeManager daemon
sbin/start-yarn.sh

ResourceManager - http://localhost:8088/
NameNode - http://localhost:50070/

Hadoop Standalone and Pseudo Mode

标签:

原文地址:http://www.cnblogs.com/wuzhenzhou/p/5788809.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!