ZK install, configure ZK, ZK cluster deployment

 

 

 

 

# Interval is used to represent multiple tickTime, e.g. = initLimit 10 is equal to ten times tickTime 2W milliseconds 
tickTime = 2000 

# Number of ticks that of The CAN BETWEEN Pass, and sending Getting A Request Acknowledgment AN 
# heartbeat maximum delay time, If the leader within a predetermined period of time can not be acquired heartbeat response follow, then that node has left 
syncLimit =. 5 

# the Directory WHERE the Snapshot iS Stored. do not use / tmp for Storage, / tmp here Wallpaper iS Just. Example sakes. 
file # memory used to store the database snapshot folder, for both clusters there myid file in this folder 
dataDir = G: \\ \\ Program-My-ZooKeeper 3.4.9 \\ the Data 

# at the Port AT Which at the Clients will connect, ZK port 
the clientPort = 2181 

# The maximum Number of Client Connections. Increase the this IF you need to handle More Clients 
# allowed number of client connections, 0- not limited, distinguished by a different client IP 
maxClientCnxns = 60 

# The machine management is written to the transaction log "dataLogDir" specified directory, not "dataDir" specified directory. Avoid competition between the logs and snapshots 
#dataLogDir = / root / Hadoop-0.20.2 / zookeeper-3.3.1 / log / data_log 

# of snapshots to The retain at The Number The in dataDir 
# is used to configure zookeeper need to keep in automatic cleanup time the snapshot data file and the corresponding number of transaction log files, the minimum Third, if smaller than 3, will be automatically adjusted to 3 
# autopurge.snapRetainCount = 3 

# purge Task interval the in hours. the Set to "0" to disable Auto purge the Feature 
# supporting snapRetainCount use to configure zk historical files automatically clean up the frequency, if the parameter is set to 0 or less than zero, it means do not open the regular cleaning function, the default is not open 
# autopurge.purgeInterval = 1 


## cluster configuration
# The number of ticks that the initial , synchronization phase can take 
the process of # follow server startup will establish a link with the leader and complete the synchronization server, leader of server data allows follow initLimit completed in time, the default amount of 10 clusters is increased 
# synchronization time becomes long, it is necessary to transfer large the appropriate parameters, set when the time exceeds tickTime multiples, the connection fails 
initLimit = 10 

# server.A = B: C: D: wherein a number that is the first there must be a number of several server dataDir myid file directory, which stores only the values of a, ZK reads this file start, and the following list which comparison determination server. 
# B is the server ip; C represents the server exchange information Leader ports; D represents the communication port during elections. 
Server. . 1 = 127.0.0.1: 2888: 3888 
Server. 2 = 127.0.0.1: 2889: 3889 
Server. . 3 = 127.0.0.1: 2890: 3890 

# configured observer pattern 
peerType = observer 
# observer noted the role of the end, it is necessary splicing Observer 
Server. . 4 = 10.2.143.38: 2886: 3886: Observer

 

Guess you like

Origin www.cnblogs.com/niunafei/p/11294240.html