Hadoop:HA HDFS core-site.xml和hdfs-site.xml配置

core-site.xml 


  fs.defaultFS
  hdfs://mycluster



  hadoop.tmp.dir
  /mnt/data/full



   ha.zookeeper.quorum
   node1:2181,node2:2181,node3:2181
 

hdfs-site.xml


    dfs.nameservices
    mycluster


  dfs.ha.namenodes.mycluster
  nn1,nn2


  dfs.namenode.rpc-address.mycluster.nn1
  node1:8020


  dfs.namenode.rpc-address.mycluster.nn2
  node2:8020


  dfs.namenode.http-address.mycluster.nn1
  node1:50070


  dfs.namenode.http-address.mycluster.nn2
  node2:50070



  dfs.namenode.shared.edits.dir
 qjournal://node1:8485;node2:8485;node3:8485/mycluster


  dfs.journalnode.edits.dir
  /mnt/data/journal



  dfs.client.failover.proxy.provider.mycluster
  org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider

 
      dfs.ha.fencing.methods
      sshfence
    

    
      dfs.ha.fencing.ssh.private-key-files
      /root/.ssh/id_rsa
    

 
   dfs.ha.automatic-failover.enabled
   true
 

 

你可能感兴趣的:(大数据,Hadoop)