Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zookeeper operation and maintenance

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Installation considerations:

Zoo.cfg:

DataDir=/data/service/zookeeper # zookeeper Snapshot Log and transaction Log Storage address in version-2

ClientPort=2181 # provides services to client

Server.1=hadoop01:2888:3888 # 2888 port: use port 3888 for intra-cluster communication: elect lender to use

Server.2=hadoop02:2888:3888

Server.3=hadoop03:2888:3888

In the directory, there is a myid file with the same number as the server.1 number

Command u

View the current zookeeper status in the zkServer.sh status zookeeper cluster

ZkCleanup cleans up Zookeeper historical data, including using log files and snapshot data files

A simple client of zkCli Zookeeper

ZkEnv sets the environment variable of Zookeeper

Start, stop, and restart scripts for the zkServer Zookeeper server

Check the status of the cluster through four-character letters

How to use it:

Check the status of the zookeeper cluster:

Echo ruok | nc localhost 2181

Four-letter combination:

Server status:

If the ruok server is running and no error is reported, output imok

Conf outputs the configuration information of the server (according to zoo.cfg)

Envi outputs the environment information of the server, including zookeeper version, java version, and other system properties

Srvr outputs server statistics, including latency statistics, number of znode, and server operating mode (standalone,leader,follower)

Stat output server statistics and connected clients

Statistics for srst reset server

Isro shows whether the server is read-only and unread-write

Client connection:

Dump lists all sessions and transient znode in the collection, and must be connected to the leader to use the command

Cons lists connection statistics for all server clients

Crst reset connection Statistics

Observe:

Wchs lists summary information for all observations on the server

Wchc lists all observations on the server by connection.

Wchp lists all observations on the server by zonde path

Monitor and control

Mntr lists server statistics in Java attribute format, which is suitable for Ganglia and nagios monitoring

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report