华为云服务器centos7.2下hadoop完全分布式配置文件

本文所需环境如下:
操作系统:CentOS 7.2 64位
JDK版本:jdk1.8.0_131
Hadoop版本:2.8.1


hadoop完全分布式配置文件
一,
core-site.xml





    
    
        fs.defaultFS
        hdfs://ns
    
    
    
        hadoop.tmp.dir
        /usr/local/src/app/hadoop-2.8.1/tmp
    
    
    
        ha.zookeeper.quorum
        node001:2181,node002:2181,node003:2181
    




二
mapred-site.xml





    
        
        mapreduce.framework.name
        yarn
    



三
hdfs-site.xml





  
  
    dfs.nameservices
    ns
  
  
  
    dfs.ha.namenodes.ns
    nn1,nn2
  
  
  
    dfs.namenode.rpc-address.ns.nn1
    node007:9000
  
  
  
    dfs.namenode.http-address.ns.nn1
    node007:50070
  
  
  
    dfs.namenode.rpc-address.ns.nn2
    node008:9000
  
  
  
    dfs.namenode.http-address.ns.nn2
    node008:50070
  
  
  
    dfs.namenode.shared.edits.dir
    qjournal://node004:8485;node005:8485;node006:8485/ns
  
  
  
    dfs.journalnode.edits.dir
    /usr/local/src/app/hadoop-2.8.1/journal
  
  
  
    dfs.ha.automatic-failover.enabled
    true
  
  
  
    dfs.client.failover.proxy.provider.ns
    org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider
  
  
  
    dfs.ha.fencing.methods
    sshfence
      shell(/bin/true)
    
  
  
  
    dfs.ha.fencing.ssh.private-key-files
    /root/.ssh/id_rsa
  
  
  
    dfs.replication
    3
  
  
  
    dfs.permissions
    false
  





四
yarn-site.xml



  
  
    yarn.resourcemanager.ha.enabled
    true
  
  
  
    yarn.resourcemanager.ha.rm-ids
    rm1,rm2
  
  
  
    yarn.resourcemanager.hostname.rm1
    node009
  
  
    yarn.resourcemanager.hostname.rm2
    node0010
  
  
  
    yarn.resourcemanager.recovery.enabled
    true
  
  
  
    yarn.resourcemanager.store.class
    org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore
  
  
  
    yarn.resourcemanager.zk-address
    node001:2181,node002:2181,node003:2181
  
  
  
    yarn.resourcemanager.cluster-id
    yarn-ha
  
  
    
    yarn.resourcemanager.hostname
    node009
  
  
    
    yarn.nodemanager.aux-services
    mapreduce_shuffle
  


hadoop-env.sh
export JAVA_HOME=/usr/local/src/app/jdk1.8.0_131
export HADOOP_CONF_DIR=/usr/local/src/app/hadoop-2.8.1/etc/hadoop


五
slaves
node0011
node0012

你可能感兴趣的:(华为云服务器centos7.2下hadoop完全分布式配置文件)