千家信息网

hadoop2.6配置文件的示例分析

发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,这篇文章将为大家详细讲解有关hadoop2.6配置文件的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。hdfs-site.xmldfs.nameservic
千家信息网最后更新 2025年12月02日hadoop2.6配置文件的示例分析

这篇文章将为大家详细讲解有关hadoop2.6配置文件的示例分析,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

hdfs-site.xml

dfs.nameservices

mycluster

dfs.ha.namenodes.mycluster

nn1,nn2

dfs.namenode.rpc-address.mycluster.nn1

machine1.example.com:8020

dfs.namenode.rpc-address.mycluster.nn2

machine2.example.com:8020

dfs.namenode.http-address.mycluster.nn1

machine1.example.com:50070

dfs.namenode.http-address.mycluster.nn2

machine2.example.com:50070

dfs.namenode.shared.edits.dir

qjournal://node1.example.com:8485;node2.example.com:8485;node3.example.com:8485/mycluster

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

/home/exampleuser/.ssh/id_rsa

dfs.journalnode.edits.dir

/path/to/journal/node/local/data

自动切换

dfs.ha.automatic-failover.enabled

true

core-site.xml

fs.defaultFS

hdfs://mycluster

//在core-site中加入zookeeper集群

ha.zookeeper.quorum

zk1.example.com:2181,zk2.example.com:2181,zk3.example.com:2181

配置 hadoop.tmp.dir

yarn-site.xml

yarn.resourcemanager.hostname

master

yarn.nodemanager.aux-services.mapreduce_shuffle.class

org.apache.hadoop.mapred.ShuffleHandler

yarn.nodemanager.aux-services

mapreduce_shuffle

zookeeper配置

tickTime=2000

dataDir=/var/lib/zookeeper

clientPort=2181

initLimit=5

syncLimit=2

server.1=zoo1:2888:3888

server.2=zoo2:2888:3888

server.3=zoo3:2888:3888

关于"hadoop2.6配置文件的示例分析"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

0