[[email protected] scripts]$ cat zookeeper_mode.sh
#!/bin/bash
mode=`echo srvr|nc 127.0.0.1 2181| awk’/Mode/{print $2}’`
if [[ “$mode” == “follower” ]]; then
echo 1
el
[[email protected] scripts]$ cat zookeeper_mode.sh
#!/bin/bash
mode=`echo srvr|nc 127.0.0.1 2181| awk’/Mode/{print $2}’`
if [[ “$mode” == “follower” ]]; then
echo 1
el
One. Synchronization scenario
The old cluster is mixed with multiple services, and data needs to be synchronized to the new cluster, and some services are cut to the new cluster. At the same
Course catalog:
< span style="color:#ffa500">Chapter 1 Introduction to Distributed System Concept and ZooKeeper
Introduction to the distributed system and ZooKeeper, so that everyone has a general
1. Download
https://zookeeper.apache.org/
2. Local mode installation
1. Preparation before installation
(1) Install Jdk
(2) Copy Zookeeper installation package to Linu
Read topic metadata saved by zookeeper Table of Contents 1. There are the following problems 2. Solutions 3. Code 3.1. KafkaHelper class< /li> 3.2. The complete code of main.cc 1 There are
I have been monitoring, these middleware Zookeeper, Kafka…, usually only know a little bit of fur, they have been built and deployed, and have not been used. , Generally it is used by big data st
1. wget https://mirrors.cnnic.cn/apache/zookeeper/stable/zookeeper-3.4.12.tar.gz
tar -zxvf zookeeper-3.4.12. tar.gz Unzip
2. cd zookeeper-3.4.12
cp -rf conf/zoo_sample.cfg conf /z
Preparation work Upload zookeeper-3.4.6.tar.gz, scala-2.11.4.tgz, kafka_2.9.2-0.8.1.1.tgz, slf4j-1.7.6.zip to the /usr/local directory
Unzip the zookeeper installation package
# tar -zx
Background ConnectionLoss link is lost SessionExpired session expired Bypass zookeeper broker for status notification leader election Disconnect from zkNode Do idempotent Static expansion, dynamic
zookeeper registration center zookeeper
zookeeper is a sub-project of Apacahe Hadoop. It is a tree-type directory service that supports change push (< span style="color: #ff0000">When the inf