fs.defaultFS hdfs://rongxinhadoop

創(chuàng)新互聯(lián)公司堅持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:
成都做網(wǎng)站、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時代的
永勝網(wǎng)站設(shè)計、移動媒體設(shè)計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
這里的 mycluster為HA集群的邏輯名,與hdfs-site.xml中的dfs.nameservices配置一致 hadoop.tmp.dir /data/hadoop1/HAtmp3
這里的路徑默認(rèn)是NameNode、DataNode、JournalNode等存放數(shù)據(jù)的公共目錄。用戶也可單獨(dú)指定每類數(shù)據(jù)的存儲目錄。這里目錄結(jié)構(gòu)需要自己先創(chuàng)建好
ha.zookeeper.quorum master:2181,slave1:2181,slave2:2181
這里是zk集群配置中各節(jié)點(diǎn)的地址和端口。
注意:數(shù)量一定是奇數(shù)而且和zoo.cfg中配置的一致
--------------------------------------------------------------------------------------------------
dfs.replication 2 配置副本數(shù)量
dfs.namenode.name.dir file:/data/hadoop1/HAname3 namenode元數(shù)據(jù)存儲目錄 dfs.datanode.data.dir file:/data/hadoop1/HAdata3 datanode數(shù)據(jù)存儲目錄 dfs.nameservices rongxinhadoop 指定HA命名服務(wù),可隨意起名, core-site.xml中fs.defaultFS配置需要引用它
dfs.ha.namenodes.rongxinhadoop nn1,nn2 指定集群下NameNode邏輯名
dfs.namenode.rpc-address.rongxinhadoop.nn1 master:9000
dfs.namenode.rpc-address.rongxinhadoop.nn2 slave1:9000
dfs.namenode.http-address.rongxinhadoop.nn1 master:50070
dfs.namenode.http-address.rongxinhadoop.nn2 slave1:50070
dfs.namenode.servicerpc-address.rongxinhadoop.nn1 master:53310 dfs.namenode.servicerpc-address.rongxinhadoop.nn2 slave1:53310
dfs.ha.automatic-failover.enabled.rongxinhadoop true 故障失敗是否自動切換 dfs.namenode.shared.edits.dir qjournal://master:8485;slave1:8485;slave2:8485/rongxinhadoop 配置JournalNode,包含三部分:
1.qjournal 前綴表名協(xié)議;
2.然后就是三臺部署JournalNode的主機(jī)host/ip:端口,三臺機(jī)器之間用分號分隔;
3.最后的hadoop-journal是journalnode的命名空間,可以隨意取名。 dfs.journalnode.edits.dir /data/hadoop1/HAjournal3/ journalnode的本地數(shù)據(jù)存放目錄 dfs.client.failover.proxy.provider.rongxinhadoop
org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider 指定mycluster出故障時執(zhí)行故障切換的類
dfs.ha.fencing.methods sshfence ssh的操作方式執(zhí)行故障切換
dfs.ha.fencing.ssh.private-key-files /home/hadoop1/.ssh/id_rsa 如果使用ssh進(jìn)行故障切換,使用ssh通信時用的密鑰存儲的位置
dfs.ha.fencing.ssh.connect-timeout 1000 dfs.namenode.handler.count 10
--------------------------------------------------------------------------------------------------
mapreduce.framework.name yarn mapreduce.jobhistory.address master:10020 mapreduce.jobhistory.webapp.address master:19888 mapreduce.jobhistory.intermediate-done-dir /data/hadoop1/mr_history/HAtmp3 Directory where history files are written by MapReduce jobs. mapreduce.jobhistory.done-dir /data/hadoop1/mr_history/HAdone3 Directory where history files are managed by the MR JobHistory Server.
--------------------------------------------------------------------------------------------------
-
-
yarn.resourcemanager.ha.enabled
true
-
yarn.resourcemanager.cluster-id
clusterrm
-
yarn.resourcemanager.ha.rm-ids
rm1,rm2
-
yarn.resourcemanager.hostname.rm1
master
-
yarn.resourcemanager.hostname.rm2
slave1
-
yarn.resourcemanager.recovery.enabled
true
-
yarn.resourcemanager.store.class
org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore
-
yarn.resourcemanager.zk-address
master:2181,slave1:2181,slave2:2181
-
yarn.nodemanager.aux-services
mapreduce_shuffle
-
yarn.nodemanager.aux-services.mapreduce.shuffle.class
org.apache.hadoop.mapred.ShuffleHandler
-
yarn.log-aggregation-enable
true
-
The hostname of the Timeline service web application.
yarn.timeline-service.hostname
master
-
Address for the Timeline server to start the RPC server.
yarn.timeline-service.address
master:10200
-
The http address of the Timeline service web application.
yarn.timeline-service.webapp.address
master:8188
-
The https address of the Timeline service web application.
yarn.timeline-service.webapp.https.address
master:8190
-
Handler thread count to serve the client RPC requests.
yarn.timeline-service.handler-thread-count
10
-
Enables cross-origin support (CORS) for web services where cross-origin web response headers are needed. For example, javascript making a web services request to the timeline server.
yarn.timeline-service.http-cross-origin.enabled
false
-
Comma separated list of origins that are allowed for web services needing cross-origin (CORS) support. Wildcards (*) and patterns allowed
yarn.timeline-service.http-cross-origin.allowed-origins
*
-
Comma separated list of methods that are allowed for web services needing cross-origin (CORS) support.
yarn.timeline-service.http-cross-origin.allowed-methods
GET,POST,HEAD
-
Comma separated list of headers that are allowed for web services needing cross-origin (CORS) support.
yarn.timeline-service.http-cross-origin.allowed-headers
X-Requested-With,Content-Type,Accept,Origin
-
The number of seconds a pre-flighted request can be cached for web services needing cross-origin (CORS) support.
yarn.timeline-service.http-cross-origin.max-age
1800
-
Indicate to clients whether Timeline service is enabled or not. If enabled, the TimelineClient library used by end-users will post entities and events to the Timeline server.
yarn.timeline-service.enabled
true
-
Store class name for timeline store.
yarn.timeline-service.store-class
org.apache.hadoop.yarn.server.timeline.LeveldbTimelineStore
-
Enable age off of timeline store data.
yarn.timeline-service.ttl-enable
true
-
Time to live for timeline store data in milliseconds.
yarn.timeline-service.ttl-ms
604800000
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
網(wǎng)站題目:hadoopHA配置文件-創(chuàng)新互聯(lián)
轉(zhuǎn)載注明:
http://www.weahome.cn/article/csjsss.html