美文网首页我爱编程
Setup hadoop single node

Setup hadoop single node

作者: 峳堆 | 来源:发表于2016-09-10 11:51 被阅读0次

Setup

http://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/SingleCluster.html

etc/hadoop/hadoop-env.sh

export JAVA_HOME=/opt/jdk1.7.0_79

ssh key

  ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
  cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  chmod 0600 ~/.ssh/authorized_keys

etc/hadoop/core-site.xml

<configuration>
  <property>
    <name>fs.defaultFS</name>
    <value>hdfs://ubuntu:9000</value>
  </property>
</configuration>

etc/hadoop/hdfs-site.xml

<configuration>
  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
</configuration>

Test

bin/hdfs namenode -format
sbin/start-dfs.sh
bin/hdfs dfs -mkdir /user
bin/hdfs dfs -mkdir /user/cj
bin/hdfs dfs -ls -R /
bin/hadoop fs -ls -R /
sbin/stop-dfs.sh

YARN

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>

yarn

sbin/start-yarn.sh
http://localhost:8088/
sbin/stop-yarn.sh

相关文章

网友评论

    本文标题:Setup hadoop single node

    本文链接:https://www.haomeiwen.com/subject/wmuyettx.html