美文网首页
hadoop 3.x配置文件编辑

hadoop 3.x配置文件编辑

作者: JokerJin | 来源:发表于2019-05-28 20:58 被阅读0次

    core-site.xml

        <!-- 指定HDFS中NameNode的地址 -->
        <property>
            <name>fs.defaultFS</name>
            <value>hdfs://hadoop101:8020</value>
        </property>
    
        <!-- 指定hadoop运行时产生文件的存储目录 -->
        <property>
            <name>hadoop.tmp.dir</name>
            <value>/opt/module/hadoop-3.2.0/data/tmp</value>
        </property>
    
    

    hdfs-site.xml

        <!-- 指定HDFS副本的数量 -->
        <property>
            <name>dfs.replication</name>
            <value>1</value>
        </property>
        <!-- 配置NameNode的web界面 -->
        <property>
            <name>dfs.namenode.http-address</name>
            <value>hadoop101:50070</value>
        </property>
        <!-- 配置secondaryNameNode -->
        <property>
            <name>dfs.namenode.secondary.http-address</name>
            <value>hadoop104:50090</value>
        </property>
    

    yarn-site.xml

        <!-- reducer获取数据的方式 -->
        <property>
            <name>yarn.nodemanager.aux-services</name>
            <value>mapreduce_shuffle</value>
        </property>
    
        <!-- 指定YARN的ResourceManager的地址 -->
        <property>
            <name>yarn.resourcemanager.hostname</name>
            <value>hadoop101</value>
        </property>
        <property>
            <name>yarn.application.classpath</name>
            <value>/opt/module/hadoop-3.2.0/etc/hadoop:/opt/module/hadoop-3.2.0/share/hadoop/common/lib/*:/opt/module/hadoop-3.2.0/share/hadoop/common/*:/opt/module/hadoop-3.2.0/share/hadoop/hdfs:/opt/module/hadoop-3.2.0/share/hadoop/hdfs/lib/*:/opt/module/hadoop-3.2.0/share/hadoop/hdfs/*:/opt/module/hadoop-3.2.0/share/hadoop/mapreduce/lib/*:/opt/module/hadoop-3.2.0/share/hadoop/mapreduce/*:/opt/module/hadoop-3.2.0/share/hadoop/yarn:/opt/module/hadoop-3.2.0/share/hadoop/yarn/lib/*:/opt/module/hadoop-3.2.0/share/hadoop/yarn/*
    </value>
        </property>
    

    hadoop-env.sh、yarn-env.sh、mapred-env.sh
    配置JAVA_HOME路径:

    export JAVA_HOME=/opt/module/jdk1.8.0_201
    

    相关文章

      网友评论

          本文标题:hadoop 3.x配置文件编辑

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