{"id":81272,"date":"2026-07-25T00:58:38","date_gmt":"2026-07-24T16:58:38","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/81272.html"},"modified":"2026-07-25T00:58:38","modified_gmt":"2026-07-24T16:58:38","slug":"zookeeper-%e9%9b%86%e7%be%a4%e6%94%af%e6%8c%81%e5%8a%a8%e6%80%81%e6%b7%bb%e5%8a%a0%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%90%97%ef%bc%9f%e6%b7%b1%e5%85%a5%e8%a7%a3%e6%9e%90%e5%8a%a8%e6%80%81%e9%87%8d%e6%96%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/81272.html","title":{"rendered":"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236"},"content":{"rendered":"<\/p>\n<h4>ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417&#xff1f;\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u4e00\u3001\u5feb\u901f\u56de\u7b54&#xff1a;3.5.0 \u7248\u672c\u540e\u652f\u6301\u52a8\u6001\u6dfb\u52a0<\/li>\n<li>\n<ul>\n<li>1.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u52a8\u6001\u6dfb\u52a0&#xff1f;<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u539f\u7406<\/li>\n<li>\n<ul>\n<li>2.1 \u4e3a\u4ec0\u4e48\u65e9\u671f\u7248\u672c\u4e0d\u652f\u6301&#xff1f;<\/li>\n<li>2.2 \u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u6838\u5fc3\u673a\u5236<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001\u52a8\u6001\u6dfb\u52a0\u8282\u70b9\u7684\u5b8c\u6574\u6b65\u9aa4<\/li>\n<li>\n<ul>\n<li>3.1 \u51c6\u5907\u5de5\u4f5c<\/li>\n<li>3.2 \u65b0\u8282\u70b9\u73af\u5883\u914d\u7f6e<\/li>\n<li>3.3 \u914d\u7f6e\u52a8\u6001\u914d\u7f6e\u6587\u4ef6<\/li>\n<li>3.4 \u542f\u52a8\u65b0\u8282\u70b9&#xff08;\u5148\u4f5c\u4e3a Observer&#xff09;<\/li>\n<li>3.5 \u6267\u884c\u52a8\u6001\u6dfb\u52a0<\/li>\n<li>3.6 \u9a8c\u8bc1\u96c6\u7fa4\u72b6\u6001<\/li>\n<\/ul>\n<\/li>\n<li>\u56db\u3001\u52a8\u6001\u79fb\u9664\u8282\u70b9<\/li>\n<li>\u4e94\u3001\u4f7f\u7528 Observer \u8282\u70b9\u6269\u5c55\u8bfb\u80fd\u529b<\/li>\n<li>\u516d\u3001\u52a8\u6001\u914d\u7f6e\u7684\u7248\u672c\u7ba1\u7406<\/li>\n<li>\u4e03\u3001\u6ce8\u610f\u4e8b\u9879\u4e0e\u6700\u4f73\u5b9e\u8df5<\/li>\n<li>\n<ul>\n<li>7.1 \u7248\u672c\u517c\u5bb9\u6027\u8981\u6c42<\/li>\n<li>7.2 \u7f51\u7edc\u4e0e\u9632\u706b\u5899<\/li>\n<li>7.3 \u6269\u5bb9\u7b56\u7565\u5efa\u8bae<\/li>\n<li>7.4 \u6269\u5bb9\u671f\u95f4\u7684\u76d1\u63a7\u6307\u6807<\/li>\n<\/ul>\n<\/li>\n<li>\u516b\u3001\u6545\u969c\u6392\u67e5\u4e0e\u5e38\u89c1\u95ee\u9898<\/li>\n<li>\n<ul>\n<li>8.1 \u5e38\u89c1\u9519\u8bef\u53ca\u89e3\u51b3\u65b9\u6848<\/li>\n<li>8.2 \u6269\u5bb9\u5931\u8d25\u7684\u56de\u6eda\u65b9\u6848<\/li>\n<\/ul>\n<\/li>\n<li>\u4e5d\u3001\u603b\u7ed3<\/li>\n<li>\n<ul>\n<li>9.1 \u6838\u5fc3\u8981\u70b9\u56de\u987e<\/li>\n<li>9.2 \u52a8\u6001\u6dfb\u52a0\u6d41\u7a0b\u56de\u987e<\/li>\n<li>9.3 \u4e00\u53e5\u8bdd\u603b\u7ed3<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<p>     <font face=\"STCAIYUN\" color=\"red\" size=\"4\">&#x1f33a;The Begin&#x1f33a;\u70b9\u70b9\u5173\u6ce8&#xff0c;\u6536\u85cf\u4e0d\u8ff7\u8def&#x1f33a;<\/font>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6458\u8981&#xff1a;\u5728\u4f20\u7edf\u7684 ZooKeeper \u96c6\u7fa4\u4e2d&#xff0c;\u670d\u52a1\u5668\u6210\u5458\u662f\u9759\u6001\u5b9a\u4e49\u7684&#xff0c;\u4efb\u4f55\u914d\u7f6e\u53d8\u66f4\u90fd\u9700\u8981\u91cd\u542f\u96c6\u7fa4&#xff0c;\u8fd9\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u5f80\u5f80\u96be\u4ee5\u63a5\u53d7\u3002\u968f\u7740\u5206\u5e03\u5f0f\u7cfb\u7edf\u89c4\u6a21\u7684\u52a8\u6001\u53d8\u5316&#xff0c;\u80fd\u5426\u5728\u4e0d\u4e2d\u65ad\u670d\u52a1\u7684\u60c5\u51b5\u4e0b\u6dfb\u52a0\u6216\u79fb\u9664\u8282\u70b9&#xff0c;\u6210\u4e3a ZooKeeper \u96c6\u7fa4\u8fd0\u7ef4\u7684\u6838\u5fc3\u8bc9\u6c42\u3002\u672c\u6587\u5c06\u6df1\u5165\u5256\u6790 ZooKeeper \u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u7684\u53ef\u884c\u6027\u3001\u5b9e\u73b0\u539f\u7406\u4ee5\u53ca\u5177\u4f53\u7684\u64cd\u4f5c\u6b65\u9aa4&#xff0c;\u5e2e\u52a9\u8bfb\u8005\u638c\u63e1\u96c6\u7fa4\u5f39\u6027\u6269\u5c55\u7684\u80fd\u529b\u3002<\/p>\n<h3>\u4e00\u3001\u5feb\u901f\u56de\u7b54&#xff1a;3.5.0 \u7248\u672c\u540e\u652f\u6301\u52a8\u6001\u6dfb\u52a0<\/h3>\n<p>\u6838\u5fc3\u7ed3\u8bba&#xff1a;ZooKeeper \u4ece 3.5.0 \u7248\u672c\u5f00\u59cb\u652f\u6301\u52a8\u6001\u91cd\u65b0\u914d\u7f6e&#xff08;Dynamic Reconfiguration&#xff09;&#xff0c;\u5141\u8bb8\u5728\u4e0d\u91cd\u542f\u6574\u4e2a\u96c6\u7fa4\u7684\u60c5\u51b5\u4e0b\u6dfb\u52a0\u6216\u79fb\u9664\u670d\u52a1\u5668\u3002<\/p>\n<p>  #mermaid-svg-fM1xJR0RpD85jQEX{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-fM1xJR0RpD85jQEX .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-fM1xJR0RpD85jQEX .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-fM1xJR0RpD85jQEX .error-icon{fill:#552222;}#mermaid-svg-fM1xJR0RpD85jQEX .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-fM1xJR0RpD85jQEX .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-fM1xJR0RpD85jQEX .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-fM1xJR0RpD85jQEX .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-fM1xJR0RpD85jQEX .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-fM1xJR0RpD85jQEX .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-fM1xJR0RpD85jQEX .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-fM1xJR0RpD85jQEX .marker{fill:#333333;stroke:#333333;}#mermaid-svg-fM1xJR0RpD85jQEX .marker.cross{stroke:#333333;}#mermaid-svg-fM1xJR0RpD85jQEX svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-fM1xJR0RpD85jQEX p{margin:0;}#mermaid-svg-fM1xJR0RpD85jQEX .edge{stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .section&#8211;1 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section&#8211;1 path,#mermaid-svg-fM1xJR0RpD85jQEX .section&#8211;1 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section&#8211;1 path{fill:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section&#8211;1 text{fill:#ffffff;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon&#8211;1{font-size:40px;color:#ffffff;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge&#8211;1{stroke:hsl(240, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth&#8211;1{stroke-width:17;}#mermaid-svg-fM1xJR0RpD85jQEX .section&#8211;1 line{stroke:hsl(60, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:#ffffff;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-0 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-0 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-0 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-0 path{fill:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-0 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-0{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-0{stroke:hsl(60, 100%, 73.5294117647%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-0{stroke-width:14;}#mermaid-svg-fM1xJR0RpD85jQEX .section-0 line{stroke:hsl(240, 100%, 83.5294117647%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-1 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-1 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-1 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-1 path{fill:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-1 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-1{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-1{stroke:hsl(80, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-1{stroke-width:11;}#mermaid-svg-fM1xJR0RpD85jQEX .section-1 line{stroke:hsl(260, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-2 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-2 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-2 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-2 path{fill:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-2 text{fill:#ffffff;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-2{font-size:40px;color:#ffffff;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-2{stroke:hsl(270, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-2{stroke-width:8;}#mermaid-svg-fM1xJR0RpD85jQEX .section-2 line{stroke:hsl(90, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:#ffffff;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-3 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-3 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-3 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-3 path{fill:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-3 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-3{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-3{stroke:hsl(300, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-3{stroke-width:5;}#mermaid-svg-fM1xJR0RpD85jQEX .section-3 line{stroke:hsl(120, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-4 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-4 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-4 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-4 path{fill:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-4 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-4{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-4{stroke:hsl(330, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-4{stroke-width:2;}#mermaid-svg-fM1xJR0RpD85jQEX .section-4 line{stroke:hsl(150, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-5 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-5 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-5 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-5 path{fill:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-5 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-5{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-5{stroke:hsl(0, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-5{stroke-width:-1;}#mermaid-svg-fM1xJR0RpD85jQEX .section-5 line{stroke:hsl(180, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-6 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-6 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-6 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-6 path{fill:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-6 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-6{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-6{stroke:hsl(30, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-6{stroke-width:-4;}#mermaid-svg-fM1xJR0RpD85jQEX .section-6 line{stroke:hsl(210, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-7 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-7 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-7 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-7 path{fill:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-7 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-7{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-7{stroke:hsl(90, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-7{stroke-width:-7;}#mermaid-svg-fM1xJR0RpD85jQEX .section-7 line{stroke:hsl(270, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-8 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-8 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-8 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-8 path{fill:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-8 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-8{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-8{stroke:hsl(150, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-8{stroke-width:-10;}#mermaid-svg-fM1xJR0RpD85jQEX .section-8 line{stroke:hsl(330, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-9 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-9 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-9 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-9 path{fill:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-9 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-9{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-9{stroke:hsl(180, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-9{stroke-width:-13;}#mermaid-svg-fM1xJR0RpD85jQEX .section-9 line{stroke:hsl(0, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-10 rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-10 path,#mermaid-svg-fM1xJR0RpD85jQEX .section-10 circle,#mermaid-svg-fM1xJR0RpD85jQEX .section-10 path{fill:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-10 text{fill:black;}#mermaid-svg-fM1xJR0RpD85jQEX .node-icon-10{font-size:40px;color:black;}#mermaid-svg-fM1xJR0RpD85jQEX .section-edge-10{stroke:hsl(210, 100%, 76.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .edge-depth-10{stroke-width:-16;}#mermaid-svg-fM1xJR0RpD85jQEX .section-10 line{stroke:hsl(30, 100%, 86.2745098039%);stroke-width:3;}#mermaid-svg-fM1xJR0RpD85jQEX .lineWrapper line{stroke:black;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled,#mermaid-svg-fM1xJR0RpD85jQEX .disabled circle,#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:lightgray;}#mermaid-svg-fM1xJR0RpD85jQEX .disabled text{fill:#efefef;}#mermaid-svg-fM1xJR0RpD85jQEX .section-root rect,#mermaid-svg-fM1xJR0RpD85jQEX .section-root path,#mermaid-svg-fM1xJR0RpD85jQEX .section-root circle{fill:hsl(240, 100%, 46.2745098039%);}#mermaid-svg-fM1xJR0RpD85jQEX .section-root text{fill:#ffffff;}#mermaid-svg-fM1xJR0RpD85jQEX .icon-container{height:100%;display:flex;justify-content:center;align-items:center;}#mermaid-svg-fM1xJR0RpD85jQEX .edge{fill:none;}#mermaid-svg-fM1xJR0RpD85jQEX .eventWrapper{filter:brightness(120%);}#mermaid-svg-fM1xJR0RpD85jQEX :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>       3.5.0 \u4e4b\u524d<\/p>\n<p>       \u9759\u6001\u914d\u7f6e<\/p>\n<p>       \u4fee\u6539\u914d\u7f6e\u9700\u91cd\u542f\u96c6\u7fa4<\/p>\n<p>       \u8fd0\u7ef4\u590d\u6742<\/p>\n<p>       \u670d\u52a1\u4e2d\u65ad\u7a97\u53e3<\/p>\n<p>       3.5.0 \u53ca\u4e4b\u540e<\/p>\n<p>       \u52a8\u6001\u91cd\u65b0\u914d\u7f6e<\/p>\n<p>       \u652f\u6301\u5728\u7ebf\u6dfb\u52a0\/\u79fb\u9664\u8282\u70b9<\/p>\n<p>       reconfig \u547d\u4ee4<\/p>\n<p>       \u65e0\u9700\u91cd\u542f\u96c6\u7fa4<\/p>\n<p>       \u914d\u7f6e\u7248\u672c\u7ba1\u7406<\/p>\n<p>       \u81ea\u52a8\u7248\u672c\u63a7\u5236<\/p>\n<p>   ZooKeeper \u96c6\u7fa4\u6269\u5c55\u80fd\u529b\u6f14\u8fdb<\/p>\n<h4>1.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u52a8\u6001\u6dfb\u52a0&#xff1f;<\/h4>\n<table>\n<tr>\u573a\u666f\u4f20\u7edf\u65b9\u5f0f\u7684\u95ee\u9898\u52a8\u6001\u6dfb\u52a0\u7684\u4f18\u52bf<\/tr>\n<tbody>\n<tr>\n<td>\u4e1a\u52a1\u589e\u957f<\/td>\n<td>\u9700\u8981\u505c\u673a\u6269\u5bb9&#xff0c;\u5f71\u54cd\u5728\u7ebf\u4e1a\u52a1<\/td>\n<td>\u5728\u7ebf\u6269\u5bb9&#xff0c;\u670d\u52a1\u65e0\u611f\u77e5<\/td>\n<\/tr>\n<tr>\n<td>\u8282\u70b9\u6545\u969c<\/td>\n<td>\u65e0\u6cd5\u52a8\u6001\u66ff\u6362\u6545\u969c\u8282\u70b9<\/td>\n<td>\u5feb\u901f\u66ff\u6362&#xff0c;\u63d0\u9ad8\u53ef\u7528\u6027<\/td>\n<\/tr>\n<tr>\n<td>\u8bfb\u6027\u80fd\u6269\u5c55<\/td>\n<td>\u589e\u52a0 Observer \u9700\u8981\u91cd\u542f<\/td>\n<td>\u52a8\u6001\u6dfb\u52a0 Observer \u6269\u5c55\u8bfb\u80fd\u529b<\/td>\n<\/tr>\n<tr>\n<td>\u96c6\u7fa4\u7f29\u5bb9<\/td>\n<td>\u4e0b\u7ebf\u8282\u70b9\u9700\u8981\u4fee\u6539\u6240\u6709\u914d\u7f6e<\/td>\n<td>\u52a8\u6001\u79fb\u9664&#xff0c;\u51cf\u5c11\u8d44\u6e90\u6d6a\u8d39<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e8c\u3001\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u539f\u7406<\/h3>\n<h4>2.1 \u4e3a\u4ec0\u4e48\u65e9\u671f\u7248\u672c\u4e0d\u652f\u6301&#xff1f;<\/h4>\n<p>\u5728 ZooKeeper 3.5.0 \u4e4b\u524d&#xff0c;\u96c6\u7fa4\u914d\u7f6e\u662f\u9759\u6001\u5b9a\u4e49\u5728 zoo.cfg \u6587\u4ef6\u4e2d\u7684&#xff0c;\u6240\u6709\u8282\u70b9\u5728\u542f\u52a8\u65f6\u8bfb\u53d6\u8be5\u6587\u4ef6\u786e\u5b9a\u96c6\u7fa4\u6210\u5458\u3002\u8fd9\u79cd\u8bbe\u8ba1\u7684\u6838\u5fc3\u6311\u6218\u5728\u4e8e&#xff1a;\u52a8\u6001\u53d8\u66f4\u914d\u7f6e\u53ef\u80fd\u5bfc\u81f4\u6570\u636e\u4e0d\u4e00\u81f4\u548c\u8111\u88c2\u98ce\u9669\u3002<\/p>\n<p>  #mermaid-svg-NsSqN0jlKL8Mqf3j{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-NsSqN0jlKL8Mqf3j .error-icon{fill:#552222;}#mermaid-svg-NsSqN0jlKL8Mqf3j .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-NsSqN0jlKL8Mqf3j .marker{fill:#333333;stroke:#333333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .marker.cross{stroke:#333333;}#mermaid-svg-NsSqN0jlKL8Mqf3j svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-NsSqN0jlKL8Mqf3j p{margin:0;}#mermaid-svg-NsSqN0jlKL8Mqf3j .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .cluster-label text{fill:#333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .cluster-label span{color:#333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .cluster-label span p{background-color:transparent;}#mermaid-svg-NsSqN0jlKL8Mqf3j .label text,#mermaid-svg-NsSqN0jlKL8Mqf3j span{fill:#333;color:#333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .node rect,#mermaid-svg-NsSqN0jlKL8Mqf3j .node circle,#mermaid-svg-NsSqN0jlKL8Mqf3j .node ellipse,#mermaid-svg-NsSqN0jlKL8Mqf3j .node polygon,#mermaid-svg-NsSqN0jlKL8Mqf3j .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-NsSqN0jlKL8Mqf3j .rough-node .label text,#mermaid-svg-NsSqN0jlKL8Mqf3j .node .label text,#mermaid-svg-NsSqN0jlKL8Mqf3j .image-shape .label,#mermaid-svg-NsSqN0jlKL8Mqf3j .icon-shape .label{text-anchor:middle;}#mermaid-svg-NsSqN0jlKL8Mqf3j .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-NsSqN0jlKL8Mqf3j .rough-node .label,#mermaid-svg-NsSqN0jlKL8Mqf3j .node .label,#mermaid-svg-NsSqN0jlKL8Mqf3j .image-shape .label,#mermaid-svg-NsSqN0jlKL8Mqf3j .icon-shape .label{text-align:center;}#mermaid-svg-NsSqN0jlKL8Mqf3j .node.clickable{cursor:pointer;}#mermaid-svg-NsSqN0jlKL8Mqf3j .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .arrowheadPath{fill:#333333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-NsSqN0jlKL8Mqf3j .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-NsSqN0jlKL8Mqf3j .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-NsSqN0jlKL8Mqf3j .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-NsSqN0jlKL8Mqf3j .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-NsSqN0jlKL8Mqf3j .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-NsSqN0jlKL8Mqf3j .cluster text{fill:#333;}#mermaid-svg-NsSqN0jlKL8Mqf3j .cluster span{color:#333;}#mermaid-svg-NsSqN0jlKL8Mqf3j div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-NsSqN0jlKL8Mqf3j .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-NsSqN0jlKL8Mqf3j rect.text{fill:none;stroke-width:0;}#mermaid-svg-NsSqN0jlKL8Mqf3j .icon-shape,#mermaid-svg-NsSqN0jlKL8Mqf3j .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-NsSqN0jlKL8Mqf3j .icon-shape p,#mermaid-svg-NsSqN0jlKL8Mqf3j .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-NsSqN0jlKL8Mqf3j .icon-shape rect,#mermaid-svg-NsSqN0jlKL8Mqf3j .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-NsSqN0jlKL8Mqf3j .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-NsSqN0jlKL8Mqf3j .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-NsSqN0jlKL8Mqf3j :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u52a8\u6001\u914d\u7f6e\u7684\u6311\u6218<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"edgeLabel\"><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>Quorum\u673a\u5236<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u8fc7\u534a\u8282\u70b9\u5fc5\u987b\u540c\u610f\u65b0\u914d\u7f6e<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>Leader\u9009\u4e3e<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u65b0\u8282\u70b9\u52a0\u5165\u53ef\u80fd\u89e6\u53d1\u91cd\u9009<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6570\u636e\u540c\u6b65<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u65b0\u8282\u70b9\u9700\u4e0eLeader\u540c\u6b65\u6700\u65b0\u6570\u636e<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u914d\u7f6e\u4e00\u81f4\u6027<\/p>\n<p><\/span><\/p>\n<p>           <span class=\"nodeLabel\"><\/p>\n<p>\u6240\u6709\u8282\u70b9\u5fc5\u987b\u4f7f\u7528\u76f8\u540c\u914d\u7f6e<\/p>\n<p><\/span><\/p>\n<h4>2.2 \u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u6838\u5fc3\u673a\u5236<\/h4>\n<p>ZooKeeper 3.5.0&#043; \u901a\u8fc7\u4ee5\u4e0b\u673a\u5236\u89e3\u51b3\u4e86\u52a8\u6001\u914d\u7f6e\u7684\u96be\u9898&#xff1a;<\/p>\n<li>\u914d\u7f6e\u4f5c\u4e3a\u4e8b\u52a1\u6570\u636e&#xff1a;\u5c06\u96c6\u7fa4\u914d\u7f6e\u89c6\u4e3a\u4e00\u79cd\u7279\u6b8a\u7684\u4e8b\u52a1\u6570\u636e&#xff0c;\u901a\u8fc7 ZAB \u534f\u8bae\u5728\u8282\u70b9\u95f4\u540c\u6b65<\/li>\n<li>\u7248\u672c\u5316\u914d\u7f6e&#xff1a;\u6bcf\u4e2a\u914d\u7f6e\u90fd\u6709\u7248\u672c\u53f7&#xff0c;\u786e\u4fdd\u6240\u6709\u8282\u70b9\u4f7f\u7528\u76f8\u540c\u7684\u914d\u7f6e<\/li>\n<li>\u4e24\u9636\u6bb5\u63d0\u4ea4&#xff1a;\u914d\u7f6e\u53d8\u66f4\u9700\u8981\u7ecf\u8fc7\u65e7\u914d\u7f6e\u548c\u65b0\u914d\u7f6e\u7684\u53cc\u91cd\u786e\u8ba4<\/li>\n<li>\u5728\u7ebf\u72b6\u6001\u8f6c\u79fb&#xff1a;\u65b0\u8282\u70b9\u5148\u4ee5 Observer \u89d2\u8272\u540c\u6b65\u6570\u636e&#xff0c;\u518d\u8f6c\u4e3a\u6b63\u5f0f\u6210\u5458<\/li>\n<p>     \u65b0\u8282\u70b9<\/p>\n<p>     \u65e7\u96c6\u7fa4\u8282\u70b9<\/p>\n<p>     Leader\u8282\u70b9<\/p>\n<p>     \u7ba1\u7406\u5458<\/p>\n<p>      \u65b0\u8282\u70b9<\/p>\n<p>      \u65e7\u96c6\u7fa4\u8282\u70b9<\/p>\n<p>      Leader\u8282\u70b9<\/p>\n<p>      \u7ba1\u7406\u5458<\/p>\n<p>  #mermaid-svg-Wfr0vM6veLcMJzi9{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Wfr0vM6veLcMJzi9 .error-icon{fill:#552222;}#mermaid-svg-Wfr0vM6veLcMJzi9 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Wfr0vM6veLcMJzi9 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Wfr0vM6veLcMJzi9 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Wfr0vM6veLcMJzi9 .marker.cross{stroke:#333333;}#mermaid-svg-Wfr0vM6veLcMJzi9 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Wfr0vM6veLcMJzi9 p{margin:0;}#mermaid-svg-Wfr0vM6veLcMJzi9 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-Wfr0vM6veLcMJzi9 text.actor&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Wfr0vM6veLcMJzi9 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-Wfr0vM6veLcMJzi9 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-Wfr0vM6veLcMJzi9 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-Wfr0vM6veLcMJzi9 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-Wfr0vM6veLcMJzi9 #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-Wfr0vM6veLcMJzi9 .sequenceNumber{fill:white;}#mermaid-svg-Wfr0vM6veLcMJzi9 #sequencenumber{fill:#333;}#mermaid-svg-Wfr0vM6veLcMJzi9 #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-Wfr0vM6veLcMJzi9 .messageText{fill:#333;stroke:none;}#mermaid-svg-Wfr0vM6veLcMJzi9 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-Wfr0vM6veLcMJzi9 .labelText,#mermaid-svg-Wfr0vM6veLcMJzi9 .labelText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Wfr0vM6veLcMJzi9 .loopText,#mermaid-svg-Wfr0vM6veLcMJzi9 .loopText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Wfr0vM6veLcMJzi9 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-Wfr0vM6veLcMJzi9 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-Wfr0vM6veLcMJzi9 .noteText,#mermaid-svg-Wfr0vM6veLcMJzi9 .noteText&gt;tspan{fill:black;stroke:none;}#mermaid-svg-Wfr0vM6veLcMJzi9 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-Wfr0vM6veLcMJzi9 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-Wfr0vM6veLcMJzi9 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-Wfr0vM6veLcMJzi9 .actorPopupMenu{position:absolute;}#mermaid-svg-Wfr0vM6veLcMJzi9 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 \/ 0.4));}#mermaid-svg-Wfr0vM6veLcMJzi9 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-Wfr0vM6veLcMJzi9 .actor-man circle,#mermaid-svg-Wfr0vM6veLcMJzi9 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-Wfr0vM6veLcMJzi9 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>     \u9636\u6bb51&#xff1a;\u65b0\u8282\u70b9\u51c6\u5907<\/p>\n<p>     \u9636\u6bb52&#xff1a;\u63d0\u4ea4\u914d\u7f6e\u53d8\u66f4<\/p>\n<p>     7. \u6536\u5230\u8fc7\u534aACK<\/p>\n<p>     10. \u8f6c\u4e3aFollower<\/p>\n<p>   1. \u914d\u7f6e\u57fa\u7840\u73af\u5883<\/p>\n<p>   2. \u542f\u52a8\u65b0\u8282\u70b9&#xff08;Observer\u6a21\u5f0f&#xff09;<\/p>\n<p>   3. reconfig -add \u65b0\u8282\u70b9<\/p>\n<p>   4. \u5e7f\u64ad\u65b0\u914d\u7f6e<\/p>\n<p>   5. \u9a8c\u8bc1\u65b0\u914d\u7f6e<\/p>\n<p>   6. ACK<\/p>\n<p>   8. COMMIT\u65b0\u914d\u7f6e<\/p>\n<p>   9. \u901a\u77e5\u6b63\u5f0f\u52a0\u5165<\/p>\n<h3>\u4e09\u3001\u52a8\u6001\u6dfb\u52a0\u8282\u70b9\u7684\u5b8c\u6574\u6b65\u9aa4<\/h3>\n<h4>3.1 \u51c6\u5907\u5de5\u4f5c<\/h4>\n<p>\u5728\u5f00\u59cb\u52a8\u6001\u6dfb\u52a0\u8282\u70b9\u524d&#xff0c;\u9700\u8981\u786e\u4fdd\u4ee5\u4e0b\u6761\u4ef6&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u68c0\u67e5 ZooKeeper \u7248\u672c&#xff08;\u9700 \u22653.5.0&#xff09;<\/span><br \/>\n.\/bin\/zkServer.sh version<\/p>\n<p><span class=\"token comment\"># 2. \u786e\u4fdd\u73b0\u6709\u96c6\u7fa4\u542f\u7528\u4e86\u52a8\u6001\u914d\u7f6e<\/span><br \/>\n<span class=\"token comment\"># \u5728 zoo.cfg \u4e2d\u6dfb\u52a0&#xff1a;<\/span><br \/>\n<span class=\"token assign-left variable\">reconfigEnabled<\/span><span class=\"token operator\">&#061;<\/span>true<br \/>\n<span class=\"token assign-left variable\">dynamicConfigFile<\/span><span class=\"token operator\">&#061;<\/span>zoo.cfg.dynamic<\/p>\n<p><span class=\"token comment\"># 3. \u5907\u4efd\u73b0\u6709\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">cp<\/span> conf\/zoo.cfg conf\/zoo.cfg.backup-<span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">date<\/span> &#043;%Y%m%d<span class=\"token variable\">)<\/span><\/span><\/p>\n<h4>3.2 \u65b0\u8282\u70b9\u73af\u5883\u914d\u7f6e<\/h4>\n<p><span class=\"token comment\"># 1. \u5728\u65b0\u670d\u52a1\u5668\u4e0a\u5b89\u88c5 ZooKeeper&#xff08;\u7248\u672c\u4e0e\u73b0\u6709\u96c6\u7fa4\u4e00\u81f4&#xff09;<\/span><br \/>\n<span class=\"token builtin class-name\">cd<\/span> \/opt<br \/>\n<span class=\"token function\">wget<\/span> https:\/\/downloads.apache.org\/zookeeper\/zookeeper-3.8.0\/apache-zookeeper-3.8.0-bin.tar.gz<br \/>\n<span class=\"token function\">tar<\/span> <span class=\"token parameter variable\">-xzf<\/span> apache-zookeeper-3.8.0-bin.tar.gz<br \/>\n<span class=\"token function\">mv<\/span> apache-zookeeper-3.8.0-bin \/opt\/zookeeper<\/p>\n<p><span class=\"token comment\"># 2. \u521b\u5efa\u6570\u636e\u76ee\u5f55<\/span><br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> \/var\/lib\/zookeeper<br \/>\n<span class=\"token function\">mkdir<\/span> <span class=\"token parameter variable\">-p<\/span> \/var\/log\/zookeeper<\/p>\n<p><span class=\"token comment\"># 3. \u590d\u5236\u914d\u7f6e\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">cp<\/span> \/opt\/zookeeper\/conf\/zoo_sample.cfg \/opt\/zookeeper\/conf\/zoo.cfg<\/p>\n<h4>3.3 \u914d\u7f6e\u52a8\u6001\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>\u5728\u73b0\u6709\u96c6\u7fa4\u7684 zoo.cfg \u4e2d\u5df2\u7ecf\u914d\u7f6e\u4e86 dynamicConfigFile&#xff0c;\u63a5\u4e0b\u6765\u9700\u8981\u7f16\u8f91\u52a8\u6001\u914d\u7f6e\u6587\u4ef6 zoo.cfg.dynamic&#xff1a;<\/p>\n<p># \/opt\/zookeeper\/conf\/zoo.cfg.dynamic<br \/>\nserver.1&#061;192.168.1.10:2888:3888:participant;2181<br \/>\nserver.2&#061;192.168.1.11:2888:3888:participant;2181<br \/>\nserver.3&#061;192.168.1.12:2888:3888:participant;2181<br \/>\n# \u51c6\u5907\u6dfb\u52a0\u65b0\u8282\u70b9<br \/>\n# server.4&#061;192.168.1.13:2888:3888:participant;2181<\/p>\n<h4>3.4 \u542f\u52a8\u65b0\u8282\u70b9&#xff08;\u5148\u4f5c\u4e3a Observer&#xff09;<\/h4>\n<p>\u4e3a\u4e86\u5b89\u5168\u8d77\u89c1&#xff0c;\u5efa\u8bae\u65b0\u8282\u70b9\u5148\u4ee5 Observer \u89d2\u8272\u542f\u52a8&#xff0c;\u5b8c\u6210\u6570\u636e\u540c\u6b65\u540e\u518d\u8f6c\u4e3a Follower&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u5728\u65b0\u8282\u70b9\u7684 zoo.cfg \u4e2d\u914d\u7f6e<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;server.4&#061;192.168.1.13:2888:3888:observer&#034;<\/span> <span class=\"token operator\">&gt;&gt;<\/span> \/opt\/zookeeper\/conf\/zoo.cfg.dynamic<\/p>\n<p><span class=\"token comment\"># 2. \u521b\u5efa myid \u6587\u4ef6<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;4&#034;<\/span> <span class=\"token operator\">&gt;<\/span> \/var\/lib\/zookeeper\/myid<\/p>\n<p><span class=\"token comment\"># 3. \u542f\u52a8\u65b0\u8282\u70b9<\/span><br \/>\n\/opt\/zookeeper\/bin\/zkServer.sh start<\/p>\n<p><span class=\"token comment\"># 4. \u9a8c\u8bc1\u65b0\u8282\u70b9\u72b6\u6001&#xff08;\u5e94\u4e3a observer&#xff09;<\/span><br \/>\n\/opt\/zookeeper\/bin\/zkServer.sh status<\/p>\n<h4>3.5 \u6267\u884c\u52a8\u6001\u6dfb\u52a0<\/h4>\n<p>\u5728\u4efb\u610f\u73b0\u6709\u8282\u70b9\u4e0a\u6267\u884c reconfig \u547d\u4ee4&#xff0c;\u5c06\u65b0\u8282\u70b9\u6dfb\u52a0\u4e3a\u6b63\u5f0f\u6210\u5458&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528 zkCli.sh \u6267\u884c reconfig<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> leader:2181 reconfig <span class=\"token parameter variable\">-add<\/span> <span class=\"token string\">&#034;server.4&#061;192.168.1.13:2888:3888:participant;2181&#034;<\/span><\/p>\n<p>\u5982\u679c\u6dfb\u52a0\u6210\u529f&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u96c6\u7fa4\u914d\u7f6e<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> localhost:2181 config<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u8282\u70b9\u89d2\u8272<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token function\">stat<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">nc<\/span> localhost <span class=\"token number\">2181<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> Mode<\/p>\n<h4>3.6 \u9a8c\u8bc1\u96c6\u7fa4\u72b6\u6001<\/h4>\n<p><span class=\"token comment\"># 1. \u68c0\u67e5\u6240\u6709\u8282\u70b9\u89d2\u8272<\/span><br \/>\n<span class=\"token keyword\">for<\/span> <span class=\"token for-or-select variable\">i<\/span> <span class=\"token keyword\">in<\/span> <span class=\"token number\">1<\/span> <span class=\"token number\">2<\/span> <span class=\"token number\">3<\/span> <span class=\"token number\">4<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token keyword\">do<\/span><br \/>\n    <span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#034;Node <span class=\"token variable\">$i<\/span>: <span class=\"token variable\"><span class=\"token variable\">$(<\/span><span class=\"token function\">ssh<\/span> node$i <span class=\"token string\">&#039;echo stat | nc localhost 2181 | grep Mode&#039;<\/span><span class=\"token variable\">)<\/span><\/span>&#034;<\/span><br \/>\n<span class=\"token keyword\">done<\/span><\/p>\n<p><span class=\"token comment\"># 2. \u68c0\u67e5\u96c6\u7fa4\u76d1\u63a7\u6307\u6807<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> mntr <span class=\"token operator\">|<\/span> <span class=\"token function\">nc<\/span> localhost <span class=\"token number\">2181<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;zk_server_state|zk_follower|zk_leader&#034;<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u6d4b\u8bd5\u6570\u636e\u540c\u6b65<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> localhost:2181 create \/test-dynamic <span class=\"token string\">&#034;success&#034;<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> new-node:2181 get \/test-dynamic<\/p>\n<h3>\u56db\u3001\u52a8\u6001\u79fb\u9664\u8282\u70b9<\/h3>\n<p>\u52a8\u6001\u79fb\u9664\u8282\u70b9\u7684\u539f\u7406\u4e0e\u6dfb\u52a0\u7c7b\u4f3c&#xff0c;\u4f7f\u7528 reconfig -remove \u547d\u4ee4&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u79fb\u9664\u8282\u70b9&#xff08;\u901a\u8fc7 server ID&#xff09;<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> leader:2181 reconfig <span class=\"token parameter variable\">-remove<\/span> <span class=\"token number\">4<\/span><\/p>\n<p><span class=\"token comment\"># \u6216\u901a\u8fc7\u79fb\u9664\u6210\u5458\u5b57\u7b26\u4e32<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> leader:2181 reconfig <span class=\"token parameter variable\">-remove<\/span> <span class=\"token string\">&#034;server.4&#061;192.168.1.13:2888:3888:participant;2181&#034;<\/span><\/p>\n<p>\u79fb\u9664\u8282\u70b9\u540e&#xff0c;\u88ab\u79fb\u9664\u7684\u8282\u70b9\u4f1a\u81ea\u52a8\u8f6c\u6362\u4e3a Observer \u6a21\u5f0f&#xff0c;\u4e0d\u518d\u53c2\u4e0e\u6295\u7968\u3002<\/p>\n<h3>\u4e94\u3001\u4f7f\u7528 Observer \u8282\u70b9\u6269\u5c55\u8bfb\u80fd\u529b<\/h3>\n<p>\u5982\u679c\u53ea\u9700\u8981\u6269\u5c55\u8bfb\u80fd\u529b\u800c\u4e0d\u5f71\u54cd\u5199\u6027\u80fd&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u5c06\u65b0\u8282\u70b9\u6dfb\u52a0\u4e3a Observer&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u6dfb\u52a0 Observer \u8282\u70b9<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> leader:2181 reconfig <span class=\"token parameter variable\">-add<\/span> <span class=\"token string\">&#034;server.5&#061;192.168.1.14:2888:3888:observer;2181&#034;<\/span><\/p>\n<p>Observer \u7684\u7279\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u4e0d\u53c2\u4e0e\u6295\u7968&#xff1a;\u4e0d\u5f71\u54cd Leader \u9009\u4e3e\u548c\u5199\u64cd\u4f5c\u7684\u8fc7\u534a\u786e\u8ba4<\/li>\n<li>\u5f02\u6b65\u540c\u6b65&#xff1a;\u4ece Leader \u5f02\u6b65\u540c\u6b65\u6570\u636e&#xff0c;\u4e0d\u5f71\u54cd\u5199\u6027\u80fd<\/li>\n<li>\u652f\u6301\u8bfb\u8bf7\u6c42&#xff1a;\u53ef\u4ee5\u5904\u7406\u5ba2\u6237\u7aef\u8bfb\u8bf7\u6c42&#xff0c;\u5206\u62c5\u8bfb\u538b\u529b<\/li>\n<li>\u9002\u5408\u8de8\u673a\u623f\u90e8\u7f72&#xff1a;\u53ef\u5728\u5f02\u5730\u673a\u623f\u90e8\u7f72&#xff0c;\u5b9e\u73b0\u8bfb\u672c\u5730\u5316<\/li>\n<\/ul>\n<h3>\u516d\u3001\u52a8\u6001\u914d\u7f6e\u7684\u7248\u672c\u7ba1\u7406<\/h3>\n<p>ZooKeeper \u81ea\u52a8\u7ef4\u62a4\u52a8\u6001\u914d\u7f6e\u7684\u7248\u672c&#xff0c;\u6bcf\u6b21\u53d8\u66f4\u90fd\u4f1a\u751f\u6210\u65b0\u7684\u914d\u7f6e\u6587\u4ef6&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u914d\u7f6e\u6587\u4ef6\u7248\u672c\u793a\u4f8b<\/span><br \/>\n\/opt\/zookeeper\/conf\/<br \/>\n\u251c\u2500\u2500 zoo.cfg                    <span class=\"token comment\"># \u9759\u6001\u914d\u7f6e&#xff08;\u57fa\u672c\u53c2\u6570&#xff09;<\/span><br \/>\n\u251c\u2500\u2500 zoo.cfg.dynamic.200000000  <span class=\"token comment\"># \u521d\u59cb\u52a8\u6001\u914d\u7f6e<\/span><br \/>\n\u251c\u2500\u2500 zoo.cfg.dynamic.200000001  <span class=\"token comment\"># \u7b2c\u4e00\u6b21\u53d8\u66f4<\/span><br \/>\n\u251c\u2500\u2500 zoo.cfg.dynamic.200000002  <span class=\"token comment\"># \u7b2c\u4e8c\u6b21\u53d8\u66f4<\/span><br \/>\n\u2514\u2500\u2500 zoo.cfg.dynamic            <span class=\"token comment\"># \u5f53\u524d\u7248\u672c\u8f6f\u94fe\u63a5<\/span><\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5ba2\u6237\u7aef\u67e5\u770b\u914d\u7f6e\u7248\u672c&#xff1a;<\/p>\n<p><span class=\"token punctuation\">[<\/span>zk: localhost:2181<span class=\"token punctuation\">(<\/span>CONNECTED<span class=\"token punctuation\">)<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span> config<br \/>\n<span class=\"token assign-left variable\">server.1<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">192.168<\/span>.1.10:2888:3888:participant<span class=\"token punctuation\">;<\/span><span class=\"token number\">0.0<\/span>.0.0:2181<br \/>\n<span class=\"token assign-left variable\">server.2<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">192.168<\/span>.1.11:2888:3888:participant<span class=\"token punctuation\">;<\/span><span class=\"token number\">0.0<\/span>.0.0:2181<br \/>\n<span class=\"token assign-left variable\">server.3<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">192.168<\/span>.1.12:2888:3888:participant<span class=\"token punctuation\">;<\/span><span class=\"token number\">0.0<\/span>.0.0:2181<br \/>\n<span class=\"token assign-left variable\">version<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token number\">200000002<\/span><\/p>\n<h3>\u4e03\u3001\u6ce8\u610f\u4e8b\u9879\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h3>\n<h4>7.1 \u7248\u672c\u517c\u5bb9\u6027\u8981\u6c42<\/h4>\n<table>\n<tr>\u8981\u6c42\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>ZooKeeper \u7248\u672c<\/td>\n<td>\u6240\u6709\u8282\u70b9\u5fc5\u987b\u4f7f\u7528 3.5.0 \u53ca\u4ee5\u4e0a\u7248\u672c<\/td>\n<\/tr>\n<tr>\n<td>\u5ba2\u6237\u7aef\u7248\u672c<\/td>\n<td>\u6267\u884c reconfig \u7684\u5ba2\u6237\u7aef\u9700\u4e0e\u96c6\u7fa4\u7248\u672c\u5339\u914d<\/td>\n<\/tr>\n<tr>\n<td>\u914d\u7f6e\u4e00\u81f4\u6027<\/td>\n<td>\u786e\u4fdd\u6240\u6709\u8282\u70b9\u4f7f\u7528\u76f8\u540c\u7684\u914d\u7f6e\u53c2\u6570<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>7.2 \u7f51\u7edc\u4e0e\u9632\u706b\u5899<\/h4>\n<p>\u786e\u4fdd\u65b0\u8282\u70b9\u4e0e\u73b0\u6709\u96c6\u7fa4\u8282\u70b9\u7684\u7f51\u7edc\u4e92\u901a&#xff0c;\u5e76\u5f00\u653e\u5fc5\u8981\u7aef\u53e3&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u9632\u706b\u5899\u914d\u7f6e&#xff08;\u6240\u6709\u8282\u70b9&#xff09;<\/span><br \/>\nfirewall-cmd <span class=\"token parameter variable\">&#8211;permanent<\/span> &#8211;add-port<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2181<\/span>\/tcp   <span class=\"token comment\"># \u5ba2\u6237\u7aef\u8fde\u63a5<\/span><br \/>\nfirewall-cmd <span class=\"token parameter variable\">&#8211;permanent<\/span> &#8211;add-port<span class=\"token operator\">&#061;<\/span><span class=\"token number\">2888<\/span>\/tcp   <span class=\"token comment\"># \u6570\u636e\u540c\u6b65<\/span><br \/>\nfirewall-cmd <span class=\"token parameter variable\">&#8211;permanent<\/span> &#8211;add-port<span class=\"token operator\">&#061;<\/span><span class=\"token number\">3888<\/span>\/tcp   <span class=\"token comment\"># \u9009\u4e3e\u901a\u4fe1<\/span><br \/>\nfirewall-cmd <span class=\"token parameter variable\">&#8211;reload<\/span><\/p>\n<h4>7.3 \u6269\u5bb9\u7b56\u7565\u5efa\u8bae<\/h4>\n<p>  #mermaid-svg-Fu3w9p8NwCIXsAd9{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .error-icon{fill:#552222;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .marker.cross{stroke:#333333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 p{margin:0;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .cluster-label text{fill:#333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .cluster-label span{color:#333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .cluster-label span p{background-color:transparent;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .label text,#mermaid-svg-Fu3w9p8NwCIXsAd9 span{fill:#333;color:#333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .node rect,#mermaid-svg-Fu3w9p8NwCIXsAd9 .node circle,#mermaid-svg-Fu3w9p8NwCIXsAd9 .node ellipse,#mermaid-svg-Fu3w9p8NwCIXsAd9 .node polygon,#mermaid-svg-Fu3w9p8NwCIXsAd9 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .rough-node .label text,#mermaid-svg-Fu3w9p8NwCIXsAd9 .node .label text,#mermaid-svg-Fu3w9p8NwCIXsAd9 .image-shape .label,#mermaid-svg-Fu3w9p8NwCIXsAd9 .icon-shape .label{text-anchor:middle;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .rough-node .label,#mermaid-svg-Fu3w9p8NwCIXsAd9 .node .label,#mermaid-svg-Fu3w9p8NwCIXsAd9 .image-shape .label,#mermaid-svg-Fu3w9p8NwCIXsAd9 .icon-shape .label{text-align:center;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .node.clickable{cursor:pointer;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .arrowheadPath{fill:#333333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-Fu3w9p8NwCIXsAd9 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Fu3w9p8NwCIXsAd9 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-Fu3w9p8NwCIXsAd9 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .cluster text{fill:#333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .cluster span{color:#333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-Fu3w9p8NwCIXsAd9 rect.text{fill:none;stroke-width:0;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .icon-shape,#mermaid-svg-Fu3w9p8NwCIXsAd9 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .icon-shape p,#mermaid-svg-Fu3w9p8NwCIXsAd9 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .icon-shape rect,#mermaid-svg-Fu3w9p8NwCIXsAd9 .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Fu3w9p8NwCIXsAd9 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-Fu3w9p8NwCIXsAd9 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-Fu3w9p8NwCIXsAd9 :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u8bfb\u538b\u529b\u5927<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/p>\n<p>\u9700\u8981\u63d0\u5347\u6295\u7968\u5bb9\u9519<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5f00\u59cb\u6269\u5bb9<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u51c6\u5907\u65b0\u8282\u70b9<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u96c6\u7fa4\u89c4\u6a21<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6dfb\u52a0\u4e3a Observer<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6dfb\u52a0\u4e3a Follower<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u5b8c\u6210<\/p>\n<p><\/span><\/p>\n<table>\n<tr>\u7b56\u7565\u9002\u7528\u573a\u666f\u4f18\u52bf\u6ce8\u610f\u4e8b\u9879<\/tr>\n<tbody>\n<tr>\n<td>\u9010\u4e2a\u6dfb\u52a0<\/td>\n<td>\u751f\u4ea7\u73af\u5883<\/td>\n<td>\u98ce\u9669\u53ef\u63a7&#xff0c;\u4fbf\u4e8e\u56de\u6eda<\/td>\n<td>\u8017\u65f6\u8f83\u957f<\/td>\n<\/tr>\n<tr>\n<td>\u6279\u91cf\u6dfb\u52a0<\/td>\n<td>\u6d4b\u8bd5\u73af\u5883<\/td>\n<td>\u5feb\u901f\u5b8c\u6210<\/td>\n<td>\u53ef\u80fd\u5f15\u53d1\u9009\u4e3e\u98ce\u66b4<\/td>\n<\/tr>\n<tr>\n<td>\u5148 Observer \u540e\u8f6c\u6b63<\/td>\n<td>\u5173\u952e\u4e1a\u52a1<\/td>\n<td>\u6570\u636e\u540c\u6b65\u5b8c\u6210\u540e\u518d\u53c2\u4e0e\u6295\u7968<\/td>\n<td>\u9700\u8981\u4e24\u6b21\u64cd\u4f5c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>7.4 \u6269\u5bb9\u671f\u95f4\u7684\u76d1\u63a7\u6307\u6807<\/h4>\n<p><span class=\"token comment\"># \u5173\u952e\u76d1\u63a7\u6307\u6807<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> mntr <span class=\"token operator\">|<\/span> <span class=\"token function\">nc<\/span> localhost <span class=\"token number\">2181<\/span> <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token punctuation\">\\\\<\/span><br \/>\n<span class=\"token string\">&#034;zk_server_state|zk_znode_count|zk_follower|zk_sync_followers&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u65e5\u5fd7\u76d1\u63a7<\/span><br \/>\n<span class=\"token function\">tail<\/span> <span class=\"token parameter variable\">-f<\/span> \/var\/log\/zookeeper\/zookeeper.out <span class=\"token operator\">|<\/span> <span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-E<\/span> <span class=\"token string\">&#034;reconfig|leader|follower&#034;<\/span><\/p>\n<h3>\u516b\u3001\u6545\u969c\u6392\u67e5\u4e0e\u5e38\u89c1\u95ee\u9898<\/h3>\n<h4>8.1 \u5e38\u89c1\u9519\u8bef\u53ca\u89e3\u51b3\u65b9\u6848<\/h4>\n<table>\n<tr>\u9519\u8bef\u73b0\u8c61\u53ef\u80fd\u539f\u56e0\u89e3\u51b3\u65b9\u6848<\/tr>\n<tbody>\n<tr>\n<td>Reconfig is not enabled<\/td>\n<td>\u672a\u542f\u7528\u52a8\u6001\u914d\u7f6e<\/td>\n<td>\u5728 zoo.cfg \u4e2d\u6dfb\u52a0 reconfigEnabled&#061;true<\/td>\n<\/tr>\n<tr>\n<td>Node does not exist<\/td>\n<td>\u8282\u70b9\u672a\u542f\u52a8<\/td>\n<td>\u5148\u542f\u52a8\u65b0\u8282\u70b9\u4f5c\u4e3a Observer<\/td>\n<\/tr>\n<tr>\n<td>Quorum not connected<\/td>\n<td>\u7f51\u7edc\u95ee\u9898<\/td>\n<td>\u68c0\u67e5\u9632\u706b\u5899\u548c\u7aef\u53e3\u8fde\u901a\u6027<\/td>\n<\/tr>\n<tr>\n<td>Bad version<\/td>\n<td>\u914d\u7f6e\u7248\u672c\u51b2\u7a81<\/td>\n<td>\u91cd\u65b0\u83b7\u53d6\u6700\u65b0\u914d\u7f6e\u540e\u91cd\u8bd5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>8.2 \u6269\u5bb9\u5931\u8d25\u7684\u56de\u6eda\u65b9\u6848<\/h4>\n<p>\u5982\u679c\u6269\u5bb9\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u95ee\u9898&#xff0c;\u53ef\u4ee5\u6267\u884c\u56de\u6eda&#xff1a;<\/p>\n<p><span class=\"token comment\"># 1. \u505c\u6b62\u65b0\u8282\u70b9<\/span><br \/>\n\/opt\/zookeeper\/bin\/zkServer.sh stop<\/p>\n<p><span class=\"token comment\"># 2. \u4ece\u52a8\u6001\u914d\u7f6e\u4e2d\u79fb\u9664\u65b0\u8282\u70b9<\/span><br \/>\n.\/bin\/zkCli.sh <span class=\"token parameter variable\">-server<\/span> leader:2181 reconfig <span class=\"token parameter variable\">-remove<\/span> <span class=\"token number\">4<\/span><\/p>\n<p><span class=\"token comment\"># 3. \u6062\u590d\u65e7\u914d\u7f6e<\/span><br \/>\n<span class=\"token function\">cp<\/span> conf\/zoo.cfg.backup conf\/zoo.cfg<\/p>\n<p><span class=\"token comment\"># 4. \u5982\u679c\u5fc5\u8981&#xff0c;\u91cd\u542f\u53d7\u5f71\u54cd\u8282\u70b9<\/span><\/p>\n<h3>\u4e5d\u3001\u603b\u7ed3<\/h3>\n<h4>9.1 \u6838\u5fc3\u8981\u70b9\u56de\u987e<\/h4>\n<table>\n<tr>\u7248\u672c\u52a8\u6001\u6dfb\u52a0\u652f\u6301\u64cd\u4f5c\u65b9\u6cd5\u670d\u52a1\u5f71\u54cd<\/tr>\n<tbody>\n<tr>\n<td>3.5.0 \u4ee5\u4e0b<\/td>\n<td>\u274c \u4e0d\u652f\u6301<\/td>\n<td>\u505c\u673a\u66f4\u65b0\u914d\u7f6e &#043; \u91cd\u542f\u96c6\u7fa4<\/td>\n<td>\u670d\u52a1\u4e2d\u65ad<\/td>\n<\/tr>\n<tr>\n<td>3.5.0 \u53ca\u4ee5\u4e0a<\/td>\n<td>\u2705 \u652f\u6301<\/td>\n<td>reconfig \u547d\u4ee4\u5728\u7ebf\u6dfb\u52a0<\/td>\n<td>\u65e0\u611f\u77e5<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>9.2 \u52a8\u6001\u6dfb\u52a0\u6d41\u7a0b\u56de\u987e<\/h4>\n<p>  #mermaid-svg-WwmdRBu5z0uKCUtO{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-WwmdRBu5z0uKCUtO .error-icon{fill:#552222;}#mermaid-svg-WwmdRBu5z0uKCUtO .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-WwmdRBu5z0uKCUtO .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-WwmdRBu5z0uKCUtO .marker{fill:#333333;stroke:#333333;}#mermaid-svg-WwmdRBu5z0uKCUtO .marker.cross{stroke:#333333;}#mermaid-svg-WwmdRBu5z0uKCUtO svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-WwmdRBu5z0uKCUtO p{margin:0;}#mermaid-svg-WwmdRBu5z0uKCUtO .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-WwmdRBu5z0uKCUtO .cluster-label text{fill:#333;}#mermaid-svg-WwmdRBu5z0uKCUtO .cluster-label span{color:#333;}#mermaid-svg-WwmdRBu5z0uKCUtO .cluster-label span p{background-color:transparent;}#mermaid-svg-WwmdRBu5z0uKCUtO .label text,#mermaid-svg-WwmdRBu5z0uKCUtO span{fill:#333;color:#333;}#mermaid-svg-WwmdRBu5z0uKCUtO .node rect,#mermaid-svg-WwmdRBu5z0uKCUtO .node circle,#mermaid-svg-WwmdRBu5z0uKCUtO .node ellipse,#mermaid-svg-WwmdRBu5z0uKCUtO .node polygon,#mermaid-svg-WwmdRBu5z0uKCUtO .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-WwmdRBu5z0uKCUtO .rough-node .label text,#mermaid-svg-WwmdRBu5z0uKCUtO .node .label text,#mermaid-svg-WwmdRBu5z0uKCUtO .image-shape .label,#mermaid-svg-WwmdRBu5z0uKCUtO .icon-shape .label{text-anchor:middle;}#mermaid-svg-WwmdRBu5z0uKCUtO .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-WwmdRBu5z0uKCUtO .rough-node .label,#mermaid-svg-WwmdRBu5z0uKCUtO .node .label,#mermaid-svg-WwmdRBu5z0uKCUtO .image-shape .label,#mermaid-svg-WwmdRBu5z0uKCUtO .icon-shape .label{text-align:center;}#mermaid-svg-WwmdRBu5z0uKCUtO .node.clickable{cursor:pointer;}#mermaid-svg-WwmdRBu5z0uKCUtO .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-WwmdRBu5z0uKCUtO .arrowheadPath{fill:#333333;}#mermaid-svg-WwmdRBu5z0uKCUtO .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-WwmdRBu5z0uKCUtO .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-WwmdRBu5z0uKCUtO .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-WwmdRBu5z0uKCUtO .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-WwmdRBu5z0uKCUtO .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-WwmdRBu5z0uKCUtO .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-WwmdRBu5z0uKCUtO .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-WwmdRBu5z0uKCUtO .cluster text{fill:#333;}#mermaid-svg-WwmdRBu5z0uKCUtO .cluster span{color:#333;}#mermaid-svg-WwmdRBu5z0uKCUtO div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-WwmdRBu5z0uKCUtO .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-WwmdRBu5z0uKCUtO rect.text{fill:none;stroke-width:0;}#mermaid-svg-WwmdRBu5z0uKCUtO .icon-shape,#mermaid-svg-WwmdRBu5z0uKCUtO .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-WwmdRBu5z0uKCUtO .icon-shape p,#mermaid-svg-WwmdRBu5z0uKCUtO .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-WwmdRBu5z0uKCUtO .icon-shape rect,#mermaid-svg-WwmdRBu5z0uKCUtO .image-shape rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-WwmdRBu5z0uKCUtO .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-WwmdRBu5z0uKCUtO .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-WwmdRBu5z0uKCUtO :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"edgeLabel\"><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u51c6\u5907\u65b0\u8282\u70b9<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u542f\u52a8\u65b0\u8282\u70b9\u4f5c\u4e3a Observer<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6267\u884c reconfig \u6dfb\u52a0\u547d\u4ee4<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>Leader \u5e7f\u64ad\u65b0\u914d\u7f6e<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u65e7\u8282\u70b9\u786e\u8ba4\u914d\u7f6e<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u65b0\u8282\u70b9\u8f6c\u4e3a\u6b63\u5f0f\u6210\u5458<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u6570\u636e\u540c\u6b65\u5b8c\u6210<\/p>\n<p><\/span><\/p>\n<p>         <span class=\"nodeLabel\"><\/p>\n<p>\u96c6\u7fa4\u6062\u590d\u6b63\u5e38<\/p>\n<p><\/span><\/p>\n<h4>9.3 \u4e00\u53e5\u8bdd\u603b\u7ed3<\/h4>\n<p>ZooKeeper \u4ece 3.5.0 \u7248\u672c\u5f00\u59cb\u901a\u8fc7\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236\u652f\u6301\u5728\u7ebf\u6dfb\u52a0\u670d\u52a1\u5668&#xff0c;\u89e3\u51b3\u4e86\u4f20\u7edf\u9759\u6001\u914d\u7f6e\u9700\u8981\u91cd\u542f\u96c6\u7fa4\u7684\u75db\u70b9&#xff0c;\u4f7f\u5f97\u96c6\u7fa4\u53ef\u4ee5\u968f\u7740\u4e1a\u52a1\u53d1\u5c55\u5f39\u6027\u6269\u5c55&#xff0c;\u800c\u65e0\u9700\u4e2d\u65ad\u670d\u52a1\u3002\u8fd9\u4e00\u6539\u8fdb\u5927\u5927\u63d0\u5347\u4e86 ZooKeeper \u96c6\u7fa4\u7684\u8fd0\u7ef4\u7075\u6d3b\u6027\u548c\u53ef\u7528\u6027\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724165837-6a6399bdbff56.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<p>     <font face=\"STCAIYUN\" color=\"red\" size=\"4\">&#x1f33a;The End&#x1f33a;\u70b9\u70b9\u5173\u6ce8&#xff0c;\u6536\u85cf\u4e0d\u8ff7\u8def&#x1f33a;<\/font>\n     <\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417&#xff1f;\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236\u4e00\u3001\u5feb\u901f\u56de\u7b54&#xff1a;3.5.0 \u7248\u672c\u540e\u652f\u6301\u52a8\u6001\u6dfb\u52a01.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u52a8\u6001\u6dfb\u52a0&#xff1f;\u4e8c\u3001\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u539f\u74062.1 \u4e3a\u4ec0\u4e48\u65e9\u671f\u7248\u672c\u4e0d\u652f\u6301&#xff1f;2.2 \u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u6838\u5fc3\u673a\u5236\u4e09\u3001\u52a8\u6001\u6dfb\u52a0\u8282\u70b9\u7684\u5b8c\u6574\u6b65\u9aa43.1 \u51c6\u5907\u5de5\u4f5c3.2 \u65b0\u8282\u70b9\u73af\u5883\u914d\u7f6e3.3 \u914d\u7f6e\u52a8\u6001\u914d\u7f6e\u6587\u4ef63.4 \u542f\u52a8\u65b0\u8282\u70b9&#xff08;\u5148\u4f5c\u4e3a Observer&#xff09;3.5 \u6267\u884c\u52a8\u6001\u6dfb\u52a03.6 \u9a8c\u8bc1\u96c6\u7fa4\u72b6<\/p>\n","protected":false},"author":2,"featured_media":81271,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[402,1898,43],"topic":[],"class_list":["post-81272","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-debian","tag-zookeeper","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/81272.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417&#xff1f;\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236\u4e00\u3001\u5feb\u901f\u56de\u7b54&#xff1a;3.5.0 \u7248\u672c\u540e\u652f\u6301\u52a8\u6001\u6dfb\u52a01.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u52a8\u6001\u6dfb\u52a0&#xff1f;\u4e8c\u3001\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u539f\u74062.1 \u4e3a\u4ec0\u4e48\u65e9\u671f\u7248\u672c\u4e0d\u652f\u6301&#xff1f;2.2 \u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u6838\u5fc3\u673a\u5236\u4e09\u3001\u52a8\u6001\u6dfb\u52a0\u8282\u70b9\u7684\u5b8c\u6574\u6b65\u9aa43.1 \u51c6\u5907\u5de5\u4f5c3.2 \u65b0\u8282\u70b9\u73af\u5883\u914d\u7f6e3.3 \u914d\u7f6e\u52a8\u6001\u914d\u7f6e\u6587\u4ef63.4 \u542f\u52a8\u65b0\u8282\u70b9&#xff08;\u5148\u4f5c\u4e3a Observer&#xff09;3.5 \u6267\u884c\u52a8\u6001\u6dfb\u52a03.6 \u9a8c\u8bc1\u96c6\u7fa4\u72b6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/81272.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-24T16:58:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724165837-6a6399bdbff56.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81272.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/81272.html\",\"name\":\"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-24T16:58:38+00:00\",\"dateModified\":\"2026-07-24T16:58:38+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/81272.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/81272.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/81272.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/81272.html","og_locale":"zh_CN","og_type":"article","og_title":"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417&#xff1f;\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236\u4e00\u3001\u5feb\u901f\u56de\u7b54&#xff1a;3.5.0 \u7248\u672c\u540e\u652f\u6301\u52a8\u6001\u6dfb\u52a01.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u52a8\u6001\u6dfb\u52a0&#xff1f;\u4e8c\u3001\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u539f\u74062.1 \u4e3a\u4ec0\u4e48\u65e9\u671f\u7248\u672c\u4e0d\u652f\u6301&#xff1f;2.2 \u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u7684\u6838\u5fc3\u673a\u5236\u4e09\u3001\u52a8\u6001\u6dfb\u52a0\u8282\u70b9\u7684\u5b8c\u6574\u6b65\u9aa43.1 \u51c6\u5907\u5de5\u4f5c3.2 \u65b0\u8282\u70b9\u73af\u5883\u914d\u7f6e3.3 \u914d\u7f6e\u52a8\u6001\u914d\u7f6e\u6587\u4ef63.4 \u542f\u52a8\u65b0\u8282\u70b9&#xff08;\u5148\u4f5c\u4e3a Observer&#xff09;3.5 \u6267\u884c\u52a8\u6001\u6dfb\u52a03.6 \u9a8c\u8bc1\u96c6\u7fa4\u72b6","og_url":"https:\/\/www.wsisp.com\/helps\/81272.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-24T16:58:38+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260724165837-6a6399bdbff56.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"19 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/81272.html","url":"https:\/\/www.wsisp.com\/helps\/81272.html","name":"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-24T16:58:38+00:00","dateModified":"2026-07-24T16:58:38+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/81272.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/81272.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/81272.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"ZooKeeper \u96c6\u7fa4\u652f\u6301\u52a8\u6001\u6dfb\u52a0\u670d\u52a1\u5668\u5417\uff1f\u6df1\u5165\u89e3\u6790\u52a8\u6001\u91cd\u65b0\u914d\u7f6e\u673a\u5236"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/81272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=81272"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/81272\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/81271"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=81272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=81272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=81272"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=81272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}