2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
download link:Apache ZooKeeper
Versio downloaded: zookeeper-3.4.12
Post demptionem, unzip
1. Create a "data" folder et "log" folder in D: zookeeper-3.4.12 folder
2. Exemplar zoo_sample.cfg et secunda nomine: zoo.cfg
Mutare file zoo.cfg
- # The number of milliseconds of each tick
- tickTime=2000
- # The number of ticks that the initial
- # synchronization phase can take
- initLimit=10
- # The number of ticks that can pass between
- # sending a request and getting an acknowledgement
- syncLimit=5
- # the directory where the snapshot is stored.
- # do not use /tmp for storage, /tmp here is just
- # example sakes.
- #dataDir=/tmp/zookeeper
- dataDir=D:zookeeper-3.4.12data
- dataLogDir=D:zookeeper-3.4.12log
- # the port at which the clients will connect
- clientPort=2181
Intrant indicem: D: zookeeper-3.4.12bin
1. Judicium zkServer.cmd
2. judicium zkCli.cmd
- #连接本地zk
- zkCli.cmd
-
- #链接远程zk
- zkCli.cmd -server ip:port
Agunt in zkCli.cmd
1. crea lymphaticorum
create /test "my_data"
Node:/test
Valorem: my_data
Nota: Cum nodi in zk creant, incipere debet ab "/", alioquin error affertur;Imperium defecit: java.lang.IllegalArgumentException: Semita incipere debet / character
2. Get lymphaticorum
get /test
3. Modify nodis
set /test "abc"
4. puer crea lymphaticorum
create /test/child "child"
5. View pueri lymphaticorum
ls /test
6. Delere nodi
delete /test/child