tickTime=2000
創(chuàng)新互聯(lián)公司"三網(wǎng)合一"的企業(yè)建站思路。企業(yè)可建設擁有電腦版、微信版、手機版的企業(yè)網(wǎng)站。實現(xiàn)跨屏營銷,產(chǎn)品發(fā)布一步更新,電腦網(wǎng)絡+移動網(wǎng)絡一網(wǎng)打盡,滿足企業(yè)的營銷需求!創(chuàng)新互聯(lián)公司具備承接各種類型的網(wǎng)站制作、成都網(wǎng)站制作項目的能力。經(jīng)過10多年的努力的開拓,為不同行業(yè)的企事業(yè)單位提供了優(yōu)質(zhì)的服務,并獲得了客戶的一致好評。
initLimit=10
syncLimit=5
clientPort=2181
dataDir=/home/tim/zkdata
server.1=tim-dn1:2888:3888
server.2=tim-dn2:2888:3888
server.3=tim-dn3:2888:3888
core-site.xml
<configuration>
<!--
<property>
<name>fs.defaultFS</name>
<value>hdfs://tim-nn:9000</value>
</property>
-->
<property>
<name>fs.defaultFS</name>
<value>hdfs://mycluster</value>
</property>
</configuration>
hdfs-site.xml
tim@tim-dn2:~/hadoop/etc/hadoop$ cat hdfs-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
-->
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.nameservices</name>
<value>mycluster</value>
</property>
<property>
<name>dfs.ha.namenodes.mycluster</name>
<value>nn1,nn2</value>
</property>
<property>
<name>dfs.namenode.rpc-address.mycluster.nn1</name>
<value>tim-nn:8020</value>
</property>
<property>
<name>dfs.namenode.rpc-address.mycluster.nn2</name>
<value>tim-2nn:8020</value>
</property>
<property>
<name>dfs.namenode.http-address.mycluster.nn1</name>
<value>tim-nn:50070</value>
</property>
<property>
<name>dfs.namenode.http-address.mycluster.nn2</name>
<value>tim-2nn:50070</value>
</property>
<property>
<name>dfs.namenode.shared.edits.dir</name>
<value>qjournal://tim-nn:8485;tim-2nn:8485/mycluster</value>
</property>
<property>
<name>dfs.client.failover.proxy.provider.mycluster</name>
<value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
</property>
<property>
<property>
<name>dfs.journalnode.edits.dir</name>
<value>/home/tim/hadoop/journal</value>
</property>
</configuration>
停掉hdfs集群后
啟用自動容災 hdfs-site <property> <name>dfs.ha.automatic-failover.enabled</name> <value>true</value> </property>
his specifies that the cluster should be set up for automatic failover. In your core-site.xml file, add:
<property> <name>ha.zookeeper.quorum</name> <value>zk1.example.com:2181,zk2.example.com:2181,zk3.example.com:2181</value> </property>
tim@tim-dn2:~/hadoop/etc/hadoop$ nano core-site.xml
GNU nano 2.5.3 File: core-site.xml Modified
-->
<!-- Put site-specific property overrides in this file. -->
<configuration>
<!--
<property>
<name>fs.defaultFS</name>
<value>hdfs://tim-nn:9000</value>
</property>
-->
<property>
<name>fs.defaultFS</name>
<value>hdfs://mycluster</value>
</property>
<property>
<name>ha.zookeeper.quorum</name>
<value>tim-dn1:2181,tim-dn2:2181,tim-dn3:2181</value>
</property>
</configuration>
啟動zk集群后
tim@tim-nn:~$ hdfs zkfc -formatZK
用于在zk集群創(chuàng)建/hadoop-ha/mycluster目錄
文章題目:namenodehabyzookeeper
文章路徑:http://chinadenli.net/article38/pghosp.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站、企業(yè)建站、移動網(wǎng)站建設、標簽優(yōu)化、網(wǎng)站維護、網(wǎng)頁設計公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)