zoukankan      html  css  js  c++  java
  • hadoop conf中xml文件修改

     core-site.xml

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

    <!-- Put site-specific property overrides in this file. -->

    <configuration>
      <property>-------指定NameNode主机名与端口号
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000</value>
      </property>
      <property>
        <name>hadoop.tmp.dir</name>
        <value>/opt/data/tmp</value>
      </property>
    </configuration>

    hdfs-site.xml

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

    <!-- Put site-specific property overrides in this file. -->

    <configuration>
      <property>-------设置HDFS的副本数
        <name>dfs.replication</name>
        <value>1</value>
      </property>
      <property>
        <name>dfs.permissions</name>
        <value>false</value>
      </property>
    </configuration>

    mapred-site.xml

    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

    <!-- Put site-specific property overrides in this file. -->

    <configuration>
      <property>-------指定JobTracker的主机与端口号
        <name>mapred.job.tracker</name>
        <value>localhost:9001</value>
      </property>
    </configuration>

    masters---------指定SecondaryNameNode的位置

    localhost

    slavers----------指定DataNode和TaskTracker的位置

    localhost

    格式化

    [hadoop@localhost bin]$ hadoop namenode -format

  • 相关阅读:
    集群
    监控流量脚本
    三次握手四次挥手的原理
    Nginx虚拟主机配置
    apche基于域名,ip,端口的配置
    LVS+Keepalived搭建MyCAT高可用负载均衡集群
    Codeforces 553E Kyoya and Train
    Codeforces 632E Thief in a Shop
    【BZOJ4259】残缺的字符串
    【BZOJ3160】万径人踪灭
  • 原文地址:https://www.cnblogs.com/longjshz/p/4396522.html
Copyright © 2011-2022 走看看