tickTime=2000
创新互联公司"三网合一"的企业建站思路。企业可建设拥有电脑版、微信版、手机版的企业网站。实现跨屏营销,产品发布一步更新,电脑网络+移动网络一网打尽,满足企业的营销需求!创新互联公司具备承接各种类型的网站制作、成都网站制作项目的能力。经过10多年的努力的开拓,为不同行业的企事业单位提供了优质的服务,并获得了客户的一致好评。
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集群创建/hadoop-ha/mycluster目录
文章题目:namenodehabyzookeeper
文章路径:https://www.cdcxhl.com/article38/pghosp.html
成都网站建设公司_创新互联,为您提供定制网站、企业建站、移动网站建设、标签优化、网站维护、网页设计公司
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联