Hadoop配置


HADOOP配置文件

在这里插入图片描述
core-site.xml

<configuration>
        <property>
                <name>fs.defaultFS</name>
                <value>hdfs://test:9000</value>
        </property>
        <property>
                <name>hadoop.tmp.dir</name>
                <value>file:/usr/local/hadoop/tmp</value>
                <description>Abase for other temporary directories.</description>
        </property>
        <property>
            <name>hadoop.proxyuser.root.hosts</name>
            <value>*</value>
        </property>
        <property>
            <name>hadoop.proxyuser.root.groups</name>
            <value>*</value>
        </property>
</configuration>

hdfs-site.xml

<configuration>
        <property>
                <name>dfs.namenode.secondary.http-address</name>
                <value>test:50090</value>
        </property>
        <property>
                <name>dfs.replication</name> <!--datanode数量(slave个数) -->
                <value>1</value>               
        </property>
        <property>
                <name>dfs.namenode.name.dir</name>
                <value>file:/usr/local/hadoop/tmp/dfs/name</value>
        </property>
        <property>
                <name>dfs.datanode.data.dir</name>
                <value>file:/usr/local/hadoop/tmp/dfs/data</value>
        </property>
</configuration>

mapred-site.xml

<configuration>
        <property>
                <name>mapreduce.framework.name</name>
                <value>yarn</value>
        </property>
        <property>
                <name>mapreduce.jobhistory.address</name>
                <value>test:10020</value>
        </property>
        <property>
                <name>mapreduce.jobhistory.webapp.address</name>
                <value>test:19888</value>
        </property>
</configuration>

yarn-site.xml

<configuration>
        <property>
                <name>yarn.resourcemanager.hostname</name>
                <value>test</value>
        </property>
        <property>
                <name>yarn.nodemanager.aux-services</name>
                <value>mapreduce_shuffle</value>
        </property>
</configuration>

在hadoop-env.sh中追加

export JAVA_HOME=/usr/local/java

文章作者: Xin
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Xin !
 上一篇
Hadoop配置Hive Hadoop配置Hive
安装先安装mysql开启root远程登录权限开启hadoop服务下载地址 http://archive.apache.org/dist/hive/ 解压软件,配置hive环境变量 HIVE_HOME=/usr/local/hive PATH
2020-04-03
下一篇 
Hadoop配置Zookeeper Hadoop配置Zookeeper
下载Zookeeper: wget http://mirrors.aliyun.com/apache/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz tar -zxvf zookeepe
2020-04-03
  目录