zoukankan      html  css  js  c++  java
  • hadoop2 5个环境配置文件

    安装hadoop
    1.1 vi hadoop-env.sh(config file)
    export JAVA_HOME=/root/apps/jdk1.7.0_65

    1.2 vi core-site.xml(config file)
    <!-- 指定HADOOP所使用的文件系统schema(URI),HDFS的老大(NameNode)的地址 -->
    <configuration>
    <property>
    <name>fs.defaultFS</name>
    <value>hdfs://hdp-server01:9000</value>
    </property>
    <!-- 指定hadoop运行时产生文件的存储目录 -->
    <property>
    <name>hadoop.tmp.dir</name>
    <value>/home/hadoop/hadoop-2.4.1/tmp</value>
    </property>
    </configuration>
    1.3 hdfs-site.xml(config file)
    <!-- 指定HDFS副本的数量 -->
    <configuration>
    <property>
    <name>dfs.replication</name>
    <value>2</value>
    </property>
    <!-- 可选 namenode可以放置多个目录备份-->
    <property>
    <name>dfs.name.dir</name>
    <value>/home/hadoop/name1,/home/hadoop/name2</value>
    </property>

    </configuration>
    重命名:mv mapred-site.xml.template mapred-site.xml
    1.4 mapred-site.xml (mv mapred-site.xml.template mapred-site.xml)(config file)
    mv mapred-site.xml.template mapred-site.xml
    vi mapred-site.xml
    <!-- 指定mr运行在yarn上 -->
    <configuration>
    <property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
    </property>
    </configuration>
    1.5 yarn-site.xml(config file)
    <!-- 指定YARN的老大(ResourceManager)的地址 -->
    <configuration>
    <property>
    <name>yarn.resourcemanager.hostname</name>
    <value>hdp-server01</value>
    </property>
    <!-- reducer获取数据的方式 -->
    <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
    </property>
    </configuration>
    1.6 slaves
    /etc/hadoop/slaves
    hdp-server01
    hdp-server02
    hdp-server03

  • 相关阅读:
    Java中的import
    C语言中变量的理解
    C语言中变量的储存类别
    android通话流程浅析RIL层
    IOS(数据持久化1)
    IOS(CGContent画曲线)
    IOS XML的类型数据的解析
    truncate narrow string converted from unicode string
    复习:C语言中的转义字符
    Note of using static_cast
  • 原文地址:https://www.cnblogs.com/geek-sharing/p/9469843.html
Copyright © 2011-2022 走看看