{"id":829,"date":"2018-07-20T08:37:10","date_gmt":"2018-07-20T00:37:10","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=829"},"modified":"2018-07-20T08:37:10","modified_gmt":"2018-07-20T00:37:10","slug":"%e3%80%90%e5%88%86%e5%b8%83%e5%bc%8f%e3%80%91zookeeper%e5%9c%a8%e5%a4%a7%e5%9e%8b%e5%88%86%e5%b8%83%e5%bc%8f%e7%b3%bb%e7%bb%9f%e4%b8%ad%e7%9a%84%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=829","title":{"rendered":"\u3010\u5206\u5e03\u5f0f\u3011Zookeeper\u5728\u5927\u578b\u5206\u5e03\u5f0f\u7cfb\u7edf\u4e2d\u7684\u5e94\u7528"},"content":{"rendered":"<p><strong>\u4e00\u3001\u524d\u8a00<\/strong><\/p>\n<p>\u4e0a\u4e00\u7bc7\u535a\u6587\u8bb2\u89e3\u4e86Zookeeper\u7684\u5178\u578b\u5e94\u7528\u573a\u666f\uff0c\u5728\u5927\u6570\u636e\u65f6\u4ee3\uff0c\u5404\u79cd\u5206\u5e03\u5f0f\u7cfb\u7edf\u5c42\u51fa\u4e0d\u7a77\uff0c\u5176\u4e2d\uff0c\u6709\u5f88\u591a\u7cfb\u7edf\u90fd\u76f4\u63a5\u6216\u95f4\u63a5\u4f7f\u7528\u4e86Zookeeper\uff0c\u7528\u6765\u89e3\u51b3\u8bf8\u5982\u914d\u7f6e\u7ba1\u7406\u3001\u5206\u5e03\u5f0f\u901a\u77e5\/\u534f\u8c03\u3001\u96c6\u7fa4\u7ba1\u7406\u548cMaster\u9009\u4e3e\u7b49\u4e00\u7cfb\u5217\u5206\u5e03\u5f0f\u95ee\u9898\u3002<\/p>\n<p><strong>\u4e8c\u3001 Hadoop<\/strong><\/p>\n<p>Hadoop\u7684\u6838\u5fc3\u662fHDFS\uff08Hadoop Distributed File System\uff09\u548cMapReduce\uff0c\u5206\u522b\u63d0\u4f9b\u4e86\u5bf9\u6d77\u91cf\u6570\u636e\u7684\u5b58\u50a8\u548c\u8ba1\u7b97\u80fd\u529b\uff0c\u540e\u6765\uff0cHadoop\u53c8\u5f15\u5165\u4e86\u5168\u65b0MapReduce\u6846\u67b6YARN\uff08Yet Another Resource Negotiator\uff09\u3002\u5728Hadoop\u4e2d\uff0c<strong>Zookeeper\u4e3b\u8981\u7528\u4e8e\u5b9e\u73b0HA<\/strong>\uff08High Availability\uff09\uff0c\u8fd9\u90e8\u5206\u903b\u8f91\u4e3b\u8981\u96c6\u4e2d\u5728Hadoop Common\u7684HA\u6a21\u5757\u4e2d\uff0cHDFS\u7684NameNode\u4e0eYARN\u7684ResourceManager\u90fd\u662f\u57fa\u4e8e\u6b64HA\u6a21\u5757\u6765\u5b9e\u73b0\u81ea\u5df1\u7684HA\u529f\u80fd\uff0cYARN\u53c8\u4f7f\u7528\u4e86Zookeeper\u6765\u5b58\u50a8\u5e94\u7528\u7684\u8fd0\u884c\u72b6\u6001\u3002<\/p>\n<p><strong>YARN<\/strong><\/p>\n<p>YARN\u662f\u4e00\u79cd\u65b0\u7684 Hadoop \u8d44\u6e90\u7ba1\u7406\u5668\uff0c\u5b83\u662f\u4e00\u4e2a\u901a\u7528\u8d44\u6e90\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u4e3a\u4e0a\u5c42\u5e94\u7528\u63d0\u4f9b\u7edf\u4e00\u7684\u8d44\u6e90\u7ba1\u7406\u548c\u8c03\u5ea6\uff0c\u5b83\u7684\u5f15\u5165\u4e3a\u96c6\u7fa4\u5728\u5229\u7528\u7387\u3001\u8d44\u6e90\u7edf\u4e00\u7ba1\u7406\u548c\u6570\u636e\u5171\u4eab\u7b49\u65b9\u9762\u5e26\u6765\u4e86\u5de8\u5927\u597d\u5904\u3002\u5176\u53ef\u4ee5\u652f\u6301MapReduce\u6a21\u578b\uff0c\u540c\u65f6\u4e5f\u652f\u6301Tez\u3001Spark\u3001Storm\u3001Impala\u3001Open MPI\u7b49\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/616953\/201611\/616953-20161114195859670-1771074062.png\" alt=\"\" \/><\/p>\n<p>YARN\u4e3b\u8981\u7531<strong>ResourceManager\uff08RM\uff09\u3001NodeManager\uff08NM\uff09\u3001ApplicationManager\uff08AM\uff09\u3001Container<\/strong>\u56db\u90e8\u5206\u6784\u6210\u3002\u5176\u4e2d\uff0cResourceManager\u4e3a\u5168\u5c40\u8d44\u6e90\u7ba1\u7406\u5668\uff0c\u8d1f\u8d23\u6574\u4e2a\u7cfb\u7edf\u7684\u8d44\u6e90\u7ba1\u7406\u548c\u5206\u914d\u3002\u7531YARN\u4f53\u7cfb\u67b6\u6784\u53ef\u4ee5\u770b\u5230ResourceManager\u7684\u5355\u70b9\u95ee\u9898\uff0cResourceManager\u7684\u5de5\u4f5c\u72b6\u51b5\u76f4\u63a5\u51b3\u5b9a\u4e86\u6574\u4e2aYARN\u67b6\u6784\u662f\u5426\u53ef\u4ee5\u6b63\u5e38\u8fd0\u8f6c\u3002<\/p>\n<p><strong>ResourceManager HA<\/strong><\/p>\n<p>\u4e3a\u4e86\u89e3\u51b3ResourceManager\u7684\u5355\u70b9\u95ee\u9898\uff0cYARN\u8bbe\u8ba1\u4e86\u4e00\u5957Active\/Standby\u6a21\u5f0f\u7684ResourceManager HA\u67b6\u6784\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/616953\/201611\/616953-20161114205238654-1080472673.png\" alt=\"\" \/><\/p>\n<p>\u7531\u4e0a\u56fe\u53ef\u77e5\uff0c\u5728\u8fd0\u884c\u671f\u95f4\uff0c<strong>\u4f1a\u6709\u591a\u4e2aResourceManager\u5e76\u5b58\uff0c\u5e76\u4e14\u5176\u4e2d\u53ea\u6709\u4e00\u4e2aResourceManager\u5904\u4e8eActive\u72b6\u6001\uff0c\u53e6\u5916\u4e00\u4e9b\uff08\u5141\u8bb8\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\uff09\u5219\u5904\u4e8eStandby\u72b6\u6001\uff0c\u5f53Active\u8282\u70b9\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u65f6\uff0c\u5176\u4f59\u5904\u4e8eStandby\u72b6\u6001\u7684\u8282\u70b9\u5219\u4f1a\u901a\u8fc7\u7ade\u4e89\u9009\u4e3e\u4ea7\u751f\u65b0\u7684Active\u8282\u70b9\u3002<\/strong><\/p>\n<p><strong>\u4e3b\u5907\u5207\u6362<\/strong><\/p>\n<p>ResourceManager\u4f7f\u7528\u57fa\u4e8eZookeeper\u5b9e\u73b0\u7684ActiveStandbyElector\u7ec4\u4ef6\u6765\u786e\u5b9aResourceManager\u7684\u72b6\u6001\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b<\/p>\n<p>1.\u00a0<strong>\u521b\u5efa\u9501\u8282\u70b9\u3002<\/strong>\u5728Zookeeper\u4e0a\u4f1a\u6709\u4e00\u4e2a\u7c7b\u4f3c\u4e8e\/yarn-leader-election\/pseudo-yarn-rm-cluster\u7684\u9501\u8282\u70b9\uff0c\u6240\u6709\u7684ResourceManager\u5728\u542f\u52a8\u65f6\uff0c\u90fd\u4f1a\u53bb\u7ade\u4e89\u5199\u4e00\u4e2aLock\u5b50\u8282\u70b9\uff08\/yarn-leader-election\/pseudo-yarn-rm-cluster\/ActiveStandbyElectorLock\uff09\uff0c\u5b50\u8282\u70b9\u7c7b\u578b\u4e3a\u4e34\u65f6\u8282\u70b9\uff0c\u5229\u7528Zookeeper\u7684\u7279\u6027\uff0c\u521b\u5efa\u6210\u529f\u7684\u90a3\u4e2aResourceManager\u5207\u6362\u4e3aActive\u72b6\u6001\uff0c\u5176\u4f59\u7684\u4e3aStandby\u72b6\u6001\u3002<\/p>\n<p>2.\u00a0<strong>\u6ce8\u518cWatcher\u76d1\u542c\u3002<\/strong>\u6240\u6709Standby\u72b6\u6001\u7684ResourceManager\u90fd\u4f1a\u5411\/yarn-leader-election\/pseudo-yarn-rm-cluster\/ActiveStandbyElectorLock\u8282\u70b9\u6ce8\u518c\u4e00\u4e2a\u8282\u70b9\u53d8\u66f4\u76d1\u542c\uff0c\u5229\u7528\u4e34\u65f6\u8282\u70b9\u7684\u7279\u6027\uff0c\u80fd\u591f\u5feb\u901f\u611f\u77e5\u5230Active\u72b6\u6001\u7684ResourceManager\u7684\u8fd0\u884c\u60c5\u51b5\u3002<\/p>\n<p>3.\u00a0<strong>\u4e3b\u5907\u5207\u6362\u3002<\/strong>\u5f53Active\u7684ResourceManager\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u65f6\uff0c\u5176\u521b\u5efa\u7684Lock\u8282\u70b9\u4e5f\u4f1a\u88ab\u5220\u9664\uff0c\u6b64\u65f6\uff0c\u5176\u4f59\u5404\u4e2aStandby\u7684ResourceManager\u90fd\u4f1a\u6536\u5230\u901a\u77e5\uff0c\u7136\u540e\u91cd\u590d\u6b65\u9aa41\u3002<\/p>\n<p><strong>\u9694\u79bb\uff08Fencing\uff09<\/strong><\/p>\n<p>\u5728\u5206\u5e03\u5f0f\u73af\u5883\u4e2d\uff0c\u7ecf\u5e38\u4f1a\u51fa\u73b0\u8bf8\u5982\u5355\u673a<strong>\u5047\u6b7b<\/strong>\uff08\u673a\u5668\u7531\u4e8e\u7f51\u7edc\u95ea\u65ad\u6216\u662f\u5176\u81ea\u8eab\u7531\u4e8e\u8d1f\u8f7d\u8fc7\u9ad8\uff0c\u5e38\u89c1\u7684\u6709GC\u5360\u7528\u65f6\u95f4\u8fc7\u957f\u6216CPU\u8d1f\u8f7d\u8fc7\u9ad8\uff0c\u800c\u65e0\u6cd5\u6b63\u5e38\u5730\u5bf9\u5916\u8fdb\u884c\u53ca\u65f6\u54cd\u5e94\uff09\u60c5\u51b5\u3002\u5047\u8bbeRM\u96c6\u7fa4\u7531RM1\u548cRM2\u4e24\u53f0\u673a\u5668\u6784\u6210\uff0c\u67d0\u4e00\u65f6\u523b\uff0cRM1\u53d1\u751f\u4e86\u5047\u6b7b\uff0c\u6b64\u65f6\uff0cZookeeper\u8ba4\u4e3aRM1\u6302\u4e86\uff0c\u7136\u540e\u8fdb\u884c\u4e3b\u5907\u5207\u6362\uff0cRM2\u4f1a\u6210\u4e3aActive\u72b6\u6001\uff0c\u4f46\u662f\u5728\u968f\u540e\uff0cRM1\u6062\u590d\u4e86\u6b63\u5e38\uff0c\u5176\u4f9d\u7136\u8ba4\u4e3a\u81ea\u5df1\u8fd8\u5904\u4e8eActive\u72b6\u6001\uff0c\u8fd9\u5c31\u662f\u5206\u5e03\u5f0f\u8111\u88c2\u73b0\u8c61\uff0c\u5373\u5b58\u5728\u591a\u4e2a\u5904\u4e8eActive\u72b6\u6001\u7684RM\u5de5\u4f5c\uff0c\u53ef\u4ee5\u4f7f\u7528\u9694\u79bb\u6765\u89e3\u51b3\u6b64\u7c7b\u95ee\u9898\u3002<\/p>\n<p>YARN\u5f15\u5165\u4e86Fencing\u673a\u5236\uff0c\u501f\u52a9Zookeeper\u7684\u6570\u636e\u8282\u70b9\u7684ACL\u6743\u9650\u63a7\u5236\u673a\u5236\u6765\u5b9e\u73b0\u4e0d\u540cRM\u4e4b\u95f4\u7684\u9694\u79bb\u3002\u5728\u4e0a\u8ff0\u4e3b\u5907\u5207\u6362\u65f6\uff0c\u591a\u4e2aRM\u4e4b\u95f4\u901a\u8fc7\u7ade\u4e89\u521b\u5efa\u9501\u8282\u70b9\u6765\u5b9e\u73b0\u4e3b\u5907\u72b6\u6001\u7684\u786e\u5b9a\uff0c\u6b64\u65f6\uff0c\u53ea\u9700\u8981\u5728\u521b\u5efa\u8282\u70b9\u65f6\u643a\u5e26Zookeeper\u7684ACL\u4fe1\u606f\uff0c\u76ee\u7684\u662f\u4e3a\u4e86\u72ec\u5360\u8be5\u8282\u70b9\uff0c\u4ee5\u9632\u6b62\u5176\u4ed6RM\u5bf9\u8be5\u8282\u70b9\u8fdb\u884c\u66f4\u65b0\u3002<\/p>\n<p>\u8fd8\u662f\u4e0a\u8ff0\u6848\u4f8b\uff0c\u82e5RM1\u51fa\u73b0\u5047\u6b7b\uff0cZookeeper\u4f1a\u79fb\u9664\u5176\u521b\u5efa\u7684\u8282\u70b9\uff0c\u6b64\u65f6RM2\u4f1a\u521b\u5efa\u76f8\u5e94\u7684\u9501\u8282\u70b9\u5e76\u5207\u6362\u81f3Active\u72b6\u6001\uff0cRM1\u6062\u590d\u4e4b\u540e\uff0c\u4f1a\u8bd5\u56fe\u53bb\u66f4\u65b0Zookeeper\u76f8\u5173\u6570\u636e\uff0c\u4f46\u662f\u6b64\u65f6\u5176\u6ca1\u6709\u6743\u9650\u66f4\u65b0Zookeeper\u7684\u76f8\u5173\u8282\u70b9\u6570\u636e\uff0c\u56e0\u4e3a\u8282\u70b9\u4e0d\u662f\u7531\u5176\u521b\u5efa\u7684\uff0c\u4e8e\u662f\u5c31\u81ea\u52a8\u5207\u6362\u81f3Standby\u72b6\u6001\uff0c\u8fd9\u6837\u5c31\u907f\u514d\u4e86\u8111\u88c2\u73b0\u8c61\u7684\u51fa\u73b0\u3002<\/p>\n<p><strong>ResourceManager\u72b6\u6001\u5b58\u50a8<\/strong><\/p>\n<p>\u5728ResourceManager\u4e2d\uff0cRMStateStore\u53ef\u4ee5\u5b58\u50a8\u4e00\u4e9bRM\u7684\u5185\u90e8\u72b6\u6001\u4fe1\u606f\uff0c\u5305\u62ecApplication\u4ee5\u53caAttempts\u4fe1\u606f\u3001Delegation Token\u53caVersion Information\u7b49\uff0c\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0cRMStateStore\u7684\u7edd\u5927\u591a\u6570\u72b6\u6001\u4fe1\u606f\u90fd\u662f\u4e0d\u9700\u8981\u6301\u4e45\u5316\u5b58\u50a8\u7684\uff08\u5982\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\uff09\uff0c\u56e0\u4e3a\u5176\u5f88\u5bb9\u6613\u4ece\u4e0a\u4e0b\u6587\u4fe1\u606f\u4e2d\u91cd\u6784\uff0c\uff0c\u5728\u5b58\u50a8\u65b9\u6848\u8bbe\u8ba1\u4e2d\uff0c\u63d0\u4f9b\u4e86\u4e09\u79cd\u53ef\u80fd\u7684\u5b9e\u73b0\u3002<\/p>\n<p>1. \u57fa\u4e8e\u5185\u5b58\u5b9e\u73b0\uff0c\u4e00\u822c\u7528\u4e8e\u65e5\u5e38\u5f00\u53d1\u6d4b\u8bd5\u3002<\/p>\n<p>2. \u57fa\u4e8e\u6587\u4ef6\u7cfb\u7edf\u5b9e\u73b0\uff0c\u5982HDFS\u3002<\/p>\n<p>3. \u57fa\u4e8eZookeeper\u5b9e\u73b0\u3002<\/p>\n<p>\u7531\u4e8e\u5b58\u50a8\u7684\u4fe1\u606f\u4e0d\u662f\u7279\u522b\u5927\uff0cHadoop\u5b98\u65b9\u5efa\u8bae\u57fa\u4e8eZookeeper\u6765\u5b9e\u73b0\u72b6\u6001\u4fe1\u606f\u7684\u5b58\u50a8\uff0c\u5728Zookeeper\u4e2d\uff0cResourceManager\u7684\u72b6\u6001\u4fe1\u606f\u90fd\u88ab\u5b58\u50a8\u5728\/rmstore\u8fd9\u4e2a\u6839\u8282\u70b9\u4e0b\uff0c\u5176\u6570\u636e\u7ed3\u6784\u5982\u4e0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/616953\/201611\/616953-20161114213055826-2136958439.png\" alt=\"\" \/><\/p>\n<p>\u5728RMAppRoot\u8282\u70b9\u4e0b\u5b58\u50a8\u7684\u662f\u4e0e\u5404\u4e2aApplication\u76f8\u5173\u7684\u4fe1\u606f\uff0cRMDTSecretManagerRoot\u5b58\u50a8\u7684\u662f\u4e0e\u5b89\u5168\u76f8\u5173\u7684Token\u4fe1\u606f\u3002\u6bcf\u4e2aActive\u72b6\u6001\u7684ResourceManager\u5728\u521d\u59cb\u5316\u8282\u70b9\u90fd\u4f1a\u4eceZookeeper\u4e0a\u8bfb\u53d6\u5230\u8fd9\u4e9b\u4fe1\u606f\uff0c\u5e76\u6839\u636e\u8fd9\u4e9b\u72b6\u6001\u4fe1\u606f\u7ee7\u7eed\u540e\u7eed\u7684\u5904\u7406\u3002<\/p>\n<p><strong>\u4e09\u3001HBase<\/strong><\/p>\n<p>HBase\uff08Hadoop Database\uff09\u662f\u4e00\u4e2a\u57fa\u4e8eHadoop\u7684\u6587\u4ef6\u7cfb\u7edf\u8bbe\u8ba1\u7684\u9762\u5411\u6d77\u91cf\u6570\u636e\u7684\u9ad8\u53ef\u9760\u3001\u9ad8\u6027\u80fd\u3001\u9762\u5411\u5217\u3001\u53ef\u4f38\u7f29\u7684\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edf\uff0c\u5176\u9488\u5bf9\u6570\u636e\u5199\u5165\u5177\u6709\u5f3a\u4e00\u81f4\u6027\uff0c\u7d22\u5f15\u5217\u4e5f\u5b9e\u73b0\u4e86\u5f3a\u4e00\u81f4\u6027\uff0c\u5176\u91c7\u7528\u4e86Zookeeper\u670d\u52a1\u6765\u5b8c\u6210\u5bf9\u6574\u4e2a\u7cfb\u7edf\u7684\u5206\u5e03\u5f0f\u534f\u8c03\u5de5\u4f5c\uff0c\u5176\u67b6\u6784\u5982\u4e0b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/616953\/201611\/616953-20161114221022201-44433659.png\" alt=\"\" \/><\/p>\n<p>HBase\u67b6\u6784\u4e2d\uff0c<strong>Zookeeper\u662f\u4e32\u8054\u8d77HBase\u96c6\u7fa4\u4e0eClient\u7684\u5173\u952e\u6240\u5728\uff0cZookeeper\u5728HBase\u4e2d\u7684\u7cfb\u7edf\u5bb9\u9519\u3001RootRegion\u7ba1\u7406\u3001Region\u72b6\u6001\u7ba1\u7406\u3001\u5206\u5e03\u5f0fSplitLog\u4efb\u52a1\u7ba1\u7406\u3001Replication\u7ba1\u7406\u90fd\u626e\u6f14\u91cd\u8981\u89d2\u8272<\/strong>\u3002<\/p>\n<p><strong>\u7cfb\u7edf\u5bb9\u9519<\/strong><\/p>\n<p>\u5728HBase\u542f\u52a8\u65f6\uff0c\u6bcf\u4e2aRegionServer\u670d\u52a1\u5668\u90fd\u4f1a\u5230Zookeeper\u7684\/hbase\/rs\u8282\u70b9\u4e0b\u521b\u5efa\u4e00\u4e2a\u4fe1\u606f\u8282\u70b9\uff0c\u4f8b\u5982\/hbase\/rs\/[Hostname]\uff0c\u540c\u65f6\uff0cHMaster\u4f1a\u5bf9\u8fd9\u4e2a\u8282\u70b9\u8fdb\u884c\u76d1\u542c\uff0c\u5f53\u67d0\u4e2aRegionServer\u6302\u6389\u65f6\uff0cZookeeper\u4f1a\u56e0\u4e3a\u5728\u4e00\u6bb5\u65f6\u95f4\u5185\u65e0\u6cd5\u63a5\u6536\u5176\u5fc3\u8df3\u4fe1\u606f\uff08Session\u5931\u6548\uff09\uff0c\u800c\u5220\u9664\u6389\u8be5RegionServer\u670d\u52a1\u5668\u5bf9\u5e94\u7684\u8282\u70b9\uff0c\u4e0e\u6b64\u540c\u65f6\uff0cHMaster\u5219\u4f1a\u63a5\u6536\u5230Zookeeper\u7684NodeDelete\u901a\u77e5\uff0c\u4ece\u800c\u611f\u77e5\u5230\u67d0\u4e2a\u8282\u70b9\u65ad\u5f00\uff0c\u5e76\u7acb\u5373\u5f00\u59cb\u5bb9\u9519\u5de5\u4f5c\uff0cHMaster\u4f1a\u5c06\u8be5RegionServer\u6240\u5904\u7406\u7684\u6570\u636e\u5206\u7247\uff08Region\uff09\u91cd\u65b0\u8def\u7531\u5230\u5176\u4ed6\u8282\u70b9\u4e0a\uff0c\u5e76\u8bb0\u5f55\u5230Meta\u4fe1\u606f\u4e2d\u4f9b\u5ba2\u6237\u7aef\u67e5\u8be2\u3002<\/p>\n<p><strong>RootRegion\u7ba1\u7406<\/strong><\/p>\n<p>\u6570\u636e\u5b58\u50a8\u7684\u4f4d\u7f6e\u4fe1\u606f\u662f\u8bb0\u5f55\u5728\u5143\u6570\u636e\u5206\u7247\u4e0a\u7684\uff0c\u5373\u5728RootRegion\u4e0a\uff0c\u6bcf\u6b21\u5ba2\u6237\u7aef\u53d1\u8d77\u65b0\u7684\u8bf7\u6c42\uff0c\u5c31\u4f1a\u67e5\u8be2RootRegion\u6765\u786e\u5b9a\u6570\u636e\u7684\u4f4d\u7f6e\uff0c\u800cRootRegion\u81ea\u8eab\u7684\u4f4d\u7f6e\u5219\u8bb0\u5f55\u5728Zookeeper\u4e0a\uff08\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5728\/hbase\/root-region-server\u8282\u70b9\u4e2d\uff09\u3002\u5f53RootRegion\u53d1\u751f\u53d8\u5316\u65f6\uff0c\u5982Region\u624b\u5de5\u79fb\u52a8\u3001Balance\u6216\u8005\u662fRootRegion\u6240\u5728\u670d\u52a1\u5668\u53d1\u751f\u4e86\u6545\u969c\uff0c\u5c31\u80fd\u901a\u8fc7Zookeeper\u6765\u611f\u77e5\u5230\u8fd9\u4e00\u53d8\u5316\u5e76\u505a\u51fa\u4e00\u7cfb\u5217\u76f8\u5e94\u7684\u5bb9\u707e\u63aa\u65bd\uff0c\u4ece\u800c\u4fdd\u969c\u5ba2\u6237\u7aef\u603b\u80fd\u591f\u62ff\u5230\u6b63\u786e\u7684RootRegion\u4fe1\u606f\u3002<\/p>\n<p><strong>Region\u72b6\u6001\u7ba1\u7406<\/strong><\/p>\n<p><strong>Region\u662fHBase\u4e2d\u6570\u636e\u7684\u7269\u7406\u5207\u7247\uff0c\u6bcf\u4e2aRegion\u8bb0\u5f55\u4e86\u5168\u5c40\u6570\u636e\u7684\u4e00\u5c0f\u90e8\u5206\uff0c\u5e76\u4e14\u4e0d\u540c\u7684Region\u4e4b\u95f4\u7684\u6570\u636e\u662f\u76f8\u4e92\u4e0d\u91cd\u590d\u7684<\/strong>\u3002\u4f46\u5bf9\u4e8e\u4e00\u4e2a\u5206\u5e03\u5f0f\u7cfb\u7edf\u6765\u8bf4\uff0cRegion\u662f\u4f1a\u53d1\u751f\u53d8\u66f4\u7684\uff0c\u539f\u56e0\u53ef\u80fd\u662f\u7cfb\u7edf\u6545\u969c\u3001\u8d1f\u8f7d\u5747\u8861\u3001\u914d\u7f6e\u4fee\u6539\u3001Region\u5206\u88c2\u5408\u5e76\u7b49\uff0c\u4e00\u65e6Region\u53d1\u751f\u53d8\u52a8\uff0c\u5b83\u5fc5\u7136\u7ecf\u5386\u79bb\u7ebf\u548c\u91cd\u65b0\u5728\u7ebf\u7684\u8fc7\u7a0b\u3002\u5728\u79bb\u7ebf\u671f\u95f4\uff0c\u6570\u636e\u662f\u4e0d\u80fd\u88ab\u8bbf\u95ee\u7684\uff0c\u5e76\u4e14Region\u7684\u72b6\u6001\u53d8\u5316\u5fc5\u987b\u8ba9\u5168\u5c40\u77e5\u6653\uff0c\u5426\u5219\u53ef\u80fd\u4f1a\u51fa\u73b0\u67d0\u4e9b\u4e8b\u52a1\u6027\u7684\u5f02\u5e38\uff0c\u800c\u5bf9\u4e8eHBase\u96c6\u7fa4\u800c\u8a00\uff0cRegion\u7684\u6570\u91cf\u53ef\u80fd\u4f1a\u591a\u8fbe10\u4e07\u7ea7\u522b\uff0c\u56e0\u6b64\u8fd9\u6837\u89c4\u6a21\u7684Region\u72b6\u6001\u7ba1\u7406\u53ea\u6709\u4f9d\u9760Zookeeper\u624d\u80fd\u505a\u5230\u3002<\/p>\n<p><strong>\u5206\u5e03\u5f0fSplitLog\u4efb\u52a1\u7ba1\u7406<\/strong><\/p>\n<p>\u5f53\u67d0\u53f0RegionServer\u670d\u52a1\u5668\u6302\u6389\u540e\uff0c\u7531\u4e8e\u603b\u6709\u4e00\u90e8\u5206\u65b0\u5199\u5165\u7684\u6570\u636e\u8fd8\u6ca1\u6709\u6301\u4e45\u5316\u5230HFile\u4e2d\uff08\u5728\u5185\u5b58\u4e2d\uff09\uff0c\u56e0\u6b64\u5728\u8fc1\u79fb\u8be5RegionServer\u7684\u670d\u52a1\u65f6\uff0c\u5e94\u8be5\u4eceHLog\u4e2d\u6062\u590d\u8fd9\u90e8\u5206\u8fd8\u5728\u5185\u5b58\u4e2d\u7684\u6570\u636e\uff0c\u6b64\u65f6HMaster\u9700\u8981\u904d\u5386\u8be5RegionServer\u670d\u52a1\u5668\u7684HLog\uff08SplitLog\uff09\uff0c\u5e76\u6309\u7167Region\u5207\u5206\u6210\u5c0f\u5757\u79fb\u52a8\u5230\u65b0\u7684\u5730\u5740\uff0c\u5e76\u8fdb\u884c\u6570\u636e\u7684Replay\u3002\u7531\u4e8e\u5355\u4e2aRegionServer\u7684\u65e5\u5fd7\u91cf\u76f8\u5bf9\u5e9e\u5927\uff08\u53ef\u80fd\u5b58\u5728\u4e0a\u5343\u4e2aRegion\uff0c\u4e0aGB\u7684\u65e5\u5fd7\uff09\uff0c\u800c\u7528\u6237\u5f80\u5f80\u5e0c\u671b\u7cfb\u7edf\u80fd\u591f\u5feb\u901f\u5b8c\u6210\u65e5\u5fd7\u7684\u6062\u590d\u5de5\u4f5c\uff0c\u56e0\u6b64\uff0c\u9700\u8981\u5c06\u5904\u7406HLog\u7684\u4efb\u52a1\u5206\u914d\u7ed9\u591a\u53f0RegionServer\u670d\u52a1\u5668\u5171\u540c\u5904\u7406\uff0c\u800c\u8fd9\u53c8\u9700\u8981\u4e00\u4e2a\u6301\u4e45\u5316\u7ec4\u4ef6\u6765\u8f85\u52a9HMaster\u5b8c\u6210\u4efb\u52a1\u7684\u5206\u914d\uff0c\u5f53\u524d\u505a\u6cd5\u5982\u4e0b\uff0cHMaster\u4f1a\u5728Zookeeper\u4e0a\u521b\u5efa\u4e00\u4e2asplitlog\u8282\u70b9\uff08\u9ed8\u8ba4\u4e3a\/hbase\/splitlog\u8282\u70b9\uff09\uff0c\u5c06&#8221;\u54ea\u4e2aRegionServer\u5904\u7406\u54ea\u4e2aRegion&#8221;\u7684\u4fe1\u606f\u4ee5\u5217\u8868\u7684\u5f62\u5f0f\u5b58\u653e\u5728\u8be5\u8282\u70b9\u4e0a\uff0c\u7136\u540e\u7531\u5404\u4e2aRegionServer\u670d\u52a1\u5668\u81ea\u884c\u5230\u8be5\u8282\u70b9\u4e0a\u53bb\u9886\u53d6\u4efb\u52a1\u5e76\u5728\u4efb\u52a1\u6267\u884c\u6210\u529f\u6216\u5931\u8d25\u540e\u518d\u66f4\u65b0\u8be5\u8282\u70b9\u7684\u4fe1\u606f\u4ee5\u901a\u77e5HMaster\u7ee7\u7eed\u540e\u7eed\u6b65\u9aa4\uff0cZookeeper\u8d77\u5230\u4e86\u76f8\u4e92\u901a\u77e5\u548c\u4fe1\u606f\u6301\u4e45\u5316\u7684\u89d2\u8272\u3002<\/p>\n<p><strong>Replication\u7ba1\u7406<\/strong><\/p>\n<p><strong>Replication\u662f\u5b9e\u73b0HBase\u4e2d\u4e3b\u5907\u96c6\u7fa4\u95f4\u7684\u5b9e\u65f6\u540c\u6b65\u7684\u91cd\u8981\u6a21\u5757<\/strong>\uff0c\u4e0e\u4f20\u7edf\u5173\u7cfb\u578b\u6570\u636e\u5e93\u4e0d\u540c\u7684\u662f\uff0cHBase\u7684Replication\u662f\u591a\u5bf9\u591a\u7684\uff0c\u4e14\u6bcf\u4e2a\u8282\u70b9\u968f\u65f6\u90fd\u6709\u53ef\u80fd\u6302\u6389\uff0c\u56e0\u6b64\u5176\u4f1a\u590d\u6742\u5f97\u591a\u3002HBase\u4e5f\u501f\u52a9\u4e86Zookeeper\u6765\u5b8c\u6210Replication\u529f\u80fd\uff0c\u505a\u6cd5\u662f\u5728Zookeeper\u4e0a\u8bb0\u5f55\u4e00\u4e2areplication\u8282\u70b9\uff08\u9ed8\u8ba4\u662f\/hbase\/replication\u8282\u70b9\uff09\uff0c\u7136\u540e\u628a\u4e0d\u540c\u7684RegionServer\u670d\u52a1\u5668\u5bf9\u5e94\u7684HLog\u6587\u4ef6\u540d\u79f0\u8bb0\u5f55\u5230\u76f8\u5e94\u7684\u8282\u70b9\u4e0a\uff0cHMaster\u96c6\u7fa4\u4f1a\u5c06\u65b0\u589e\u7684\u6570\u636e\u63a8\u9001\u7ed9Slave\u96c6\u7fa4\uff0c\u5e76\u540c\u65f6\u5c06\u63a8\u9001\u4fe1\u606f\u8bb0\u5f55\u5230Zookeeper\u4e0a\uff08\u79f0\u4e3a\u65ad\u70b9\u8bb0\u5f55\uff09\uff0c\u7136\u540e\u91cd\u590d\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u5f53\u670d\u52a1\u5668\u6302\u6389\u65f6\uff0c\u7531\u4e8eZookeeper\u4e0a\u5df2\u7ecf\u4fdd\u5b58\u4e86\u65ad\u70b9\u4fe1\u606f\uff0c\u56e0\u6b64\u53ea\u8981\u6709HMaster\u80fd\u591f\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u6765\u534f\u540c\u7528\u6765\u63a8\u9001HLog\u6570\u636e\u7684\u4e3b\u8282\u70b9\u670d\u52a1\u5668\u5c31\u53ef\u4ee5\u8fdb\u884c\u7ee7\u7eed\u590d\u5236\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u56db\u3001Kafka<\/strong><\/p>\n<p>kafka\u662f\u4e00\u4e2a\u541e\u5410\u91cf\u6781\u9ad8\u7684\u5206\u5e03\u5f0f\u6d88\u606f\u7cfb\u7edf\uff0c\u5176\u6574\u4f53\u8bbe\u8ba1\u662f\u5178\u578b\u7684\u53d1\u5e03\u4e0e\u8ba2\u9605\u7cfb\u7edf\u6a21\u5f0f\uff0c\u5728Kafka\u96c6\u7fa4\u4e2d\uff0c\u6ca1\u6709\u4e2d\u5fc3\u4e3b\u8282\u70b9\u6982\u5ff5\uff0c\u6240\u6709\u670d\u52a1\u5668\u90fd\u662f\u5bf9\u7b49\u7684\uff0c\u56e0\u6b64\uff0c\u53ef\u4ee5\u5728\u4e0d\u505a\u4efb\u4f55\u914d\u7f6e\u66f4\u6539\u7684\u60c5\u51b5\u4e0b\u5b9e\u73b0\u670d\u52a1\u5668\u7684\u6dfb\u52a0\u4e0e\u5220\u9664\uff0c\u540c\u6837\uff0c\u6d88\u606f\u7684\u751f\u4ea7\u8005\u548c\u6d88\u8d39\u8005\u4e5f\u80fd\u591f\u968f\u610f\u91cd\u542f\u548c\u673a\u5668\u7684\u4e0a\u4e0b\u7ebf\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images2015.cnblogs.com\/blog\/616953\/201611\/616953-20161116110120201-1501887952.png\" alt=\"\" \/><\/p>\n<p><strong>\u751f\u4ea7\u8005\uff08Producer\uff09<\/strong>\uff1a\u6d88\u606f\u4ea7\u751f\u7684\u6e90\u5934\uff0c\u8d1f\u8d23\u751f\u6210\u6d88\u606f\u5e76\u53d1\u9001\u5230Kafka\u670d\u52a1\u5668\u3002<\/p>\n<p><strong>\u6d88\u8d39\u8005\uff08Consumer\uff09<\/strong>\uff1a\u6d88\u606f\u7684\u4f7f\u7528\u65b9\uff0c\u8d1f\u8d23\u6d88\u8d39Kafka\u670d\u52a1\u5668\u4e0a\u7684\u6d88\u606f\u3002<\/p>\n<p><strong>\u4e3b\u9898\uff08Topic\uff09<\/strong>\uff1a\u7531\u7528\u6237\u5b9a\u4e49\u5e76\u914d\u7f6e\u5728Kafka\u670d\u52a1\u7aef\uff0c\u7528\u4e8e\u5efa\u7acb\u751f\u4ea7\u8005\u548c\u6d88\u8d39\u8005\u4e4b\u95f4\u7684\u8ba2\u9605\u5173\u7cfb\uff0c\u751f\u4ea7\u8005\u53d1\u9001\u6d88\u606f\u5230\u6307\u5b9aTopic\u4e0b\uff0c\u6d88\u8d39\u8005\u4ece\u8fd9\u4e2aTopic\u4e2d\u6d88\u8d39\u6d88\u606f\u3002<\/p>\n<p><strong>\u6d88\u606f\u5206\u533a\uff08Partition\uff09<\/strong>\uff1a\u4e00\u4e2aTopic\u4e0b\u4f1a\u5206\u4e3a\u591a\u4e2a\u5206\u533a\uff0c\u5982&#8221;kafka-test&#8221;\u8fd9\u4e2aTopic\u53ef\u4ee5\u5206\u4e3a10\u4e2a\u5206\u533a\uff0c\u5206\u522b\u7531\u4e24\u53f0\u670d\u52a1\u5668\u63d0\u4f9b\uff0c\u90a3\u4e48\u901a\u5e38\u53ef\u4ee5\u914d\u7f6e\u8ba9\u6bcf\u53f0\u670d\u52a1\u5668\u63d0\u4f9b5\u4e2a\u5206\u533a\uff0c\u5047\u8bbe\u670d\u52a1\u5668ID\u4e3a0\u548c1\uff0c\u90a3\u4e48\u5206\u533a\u4e3a0-0\u30010-1\u30010-2\u30010-3\u30010-4\u548c1-0\u3001 1-1\u30011-2\u30011-3\u30011-4\u3002\u6d88\u606f\u5206\u533a\u673a\u5236\u548c\u5206\u533a\u7684\u6570\u91cf\u4e0e\u6d88\u8d39\u8005\u7684\u8d1f\u8f7d\u5747\u8861\u673a\u5236\u6709\u5f88\u5927\u7684\u5173\u7cfb\u3002<\/p>\n<p><strong>\u670d\u52a1\u5668\uff08Broker\uff09<\/strong>\uff1a\u7528\u4e8e\u5b58\u50a8\u4fe1\u606f\uff0c\u5728\u6d88\u606f\u4e2d\u95f4\u4ef6\u4e2d\u901a\u5e38\u88ab\u79f0\u4e3aBroker\u3002<\/p>\n<p><strong>\u6d88\u8d39\u8005\u5206\u7ec4\uff08Group\uff09<\/strong>\uff1a\u5f52\u7ec4\u540c\u7c7b\u6d88\u8d39\u8005\uff0c\u591a\u4e2a\u6d88\u8d39\u8005\u53ef\u4ee5\u5171\u540c\u6d88\u8d39\u4e00\u4e2aTopic\u4e0b\u7684\u6d88\u606f\uff0c\u6bcf\u4e2a\u6d88\u8d39\u8005\u6d88\u8d39\u5176\u4e2d\u7684\u90e8\u5206\u6d88\u606f\uff0c\u8fd9\u4e9b\u6d88\u8d39\u8005\u7ec4\u6210\u4e86\u6d88\u8d39\u8005\u5206\u7ec4\uff0c\u62e5\u6709\u540c\u4e00\u4e2a\u5206\u7ec4\u540d\u79f0\uff0c\u901a\u5e38\u4e5f\u88ab\u79f0\u4e3a\u6d88\u8d39\u8005\u96c6\u7fa4\u3002<\/p>\n<p><strong>\u504f\u79fb\u91cf\uff08Offset\uff09<\/strong>\uff1a\u6d88\u606f\u5b58\u50a8\u5728Kafka\u7684Broker\u4e0a\uff0c\u6d88\u8d39\u8005\u62c9\u53d6\u6d88\u606f\u6570\u636e\u7684\u8fc7\u7a0b\u4e2d\u9700\u8981\u77e5\u9053\u6d88\u606f\u5728\u6587\u4ef6\u4e2d\u7684\u504f\u79fb\u91cf\u3002<\/p>\n<p><strong>Broker\u6ce8\u518c<\/strong><\/p>\n<p>Broker\u662f\u5206\u5e03\u5f0f\u90e8\u7f72\u5e76\u4e14\u76f8\u4e92\u4e4b\u95f4\u76f8\u4e92\u72ec\u7acb\uff0c\u4f46\u662f\u9700\u8981\u6709\u4e00\u4e2a\u6ce8\u518c\u7cfb\u7edf\u80fd\u591f\u5c06\u6574\u4e2a\u96c6\u7fa4\u4e2d\u7684Broker\u7ba1\u7406\u8d77\u6765\uff0c\u6b64\u65f6\u5c31\u4f7f\u7528\u5230\u4e86Zookeeper\u3002\u5728Zookeeper\u4e0a\u4f1a\u6709\u4e00\u4e2a\u4e13\u95e8\u7528\u6765\u8fdb\u884cBroker\u670d\u52a1\u5668\u5217\u8868\u8bb0\u5f55\u7684\u8282\u70b9\/brokers\/ids\u3002\u6bcf\u4e2aBroker\u5728\u542f\u52a8\u65f6\uff0c\u90fd\u4f1a\u5230Zookeeper\u4e0a\u8fdb\u884c\u6ce8\u518c\uff0c\u5373\u5230\/brokers\/ids\u4e0b\u521b\u5efa\u5c5e\u4e8e\u81ea\u5df1\u7684\u8282\u70b9\uff0c\u5982\/brokers\/ids\/[0&#8230;N]\u3002Kafka\u4f7f\u7528\u4e86\u5168\u5c40\u552f\u4e00\u7684\u6570\u5b57\u6765\u6307\u4ee3\u6bcf\u4e2aBroker\u670d\u52a1\u5668\uff0c\u4e0d\u540c\u7684Broker\u5fc5\u987b\u4f7f\u7528\u4e0d\u540c\u7684Broker ID\u8fdb\u884c\u6ce8\u518c\uff0c\u521b\u5efa\u5b8c\u8282\u70b9\u540e\uff0c\u6bcf\u4e2aBroker\u5c31\u4f1a\u5c06\u81ea\u5df1\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u4fe1\u606f\u8bb0\u5f55\u5230\u8be5\u8282\u70b9\u4e2d\u53bb\u3002\u5176\u4e2d\uff0cBroker\u521b\u5efa\u7684\u8282\u70b9\u7c7b\u578b\u662f\u4e34\u65f6\u8282\u70b9\uff0c\u4e00\u65e6Broker\u5b95\u673a\uff0c\u5219\u5bf9\u5e94\u7684\u4e34\u65f6\u8282\u70b9\u4e5f\u4f1a\u88ab\u81ea\u52a8\u5220\u9664\u3002<\/p>\n<p><strong>Topic\u6ce8\u518c<\/strong><\/p>\n<p>\u5728Kafka\u4e2d\uff0c\u540c\u4e00\u4e2aTopic\u7684\u6d88\u606f\u4f1a\u88ab\u5206\u6210\u591a\u4e2a\u5206\u533a\u5e76\u5c06\u5176\u5206\u5e03\u5728\u591a\u4e2aBroker\u4e0a\uff0c\u8fd9\u4e9b\u5206\u533a\u4fe1\u606f\u53ca\u4e0eBroker\u7684\u5bf9\u5e94\u5173\u7cfb\u4e5f\u90fd\u662f\u7531Zookeeper\u5728\u7ef4\u62a4\uff0c\u7531\u4e13\u95e8\u7684\u8282\u70b9\u6765\u8bb0\u5f55\uff0c\u5982\/borkers\/topics\u3002Kafka\u4e2d\u6bcf\u4e2aTopic\u90fd\u4f1a\u4ee5\/brokers\/topics\/[topic]\u7684\u5f62\u5f0f\u88ab\u8bb0\u5f55\uff0c\u5982\/brokers\/topics\/login\u548c\/brokers\/topics\/search\u7b49\u3002Broker\u670d\u52a1\u5668\u542f\u52a8\u540e\uff0c\u4f1a\u5230\u5bf9\u5e94Topic\u8282\u70b9\uff08\/brokers\/topics\uff09\u4e0a\u6ce8\u518c\u81ea\u5df1\u7684Broker ID\u5e76\u5199\u5165\u9488\u5bf9\u8be5Topic\u7684\u5206\u533a\u603b\u6570\uff0c\u5982\/brokers\/topics\/login\/3-&gt;2\uff0c\u8fd9\u4e2a\u8282\u70b9\u8868\u793aBroker ID\u4e3a3\u7684\u4e00\u4e2aBroker\u670d\u52a1\u5668\uff0c\u5bf9\u4e8e&#8221;login&#8221;\u8fd9\u4e2aTopic\u7684\u6d88\u606f\uff0c\u63d0\u4f9b\u4e862\u4e2a\u5206\u533a\u8fdb\u884c\u6d88\u606f\u5b58\u50a8\uff0c\u540c\u6837\uff0c\u8fd9\u4e2a\u5206\u533a\u8282\u70b9\u4e5f\u662f\u4e34\u65f6\u8282\u70b9\u3002<\/p>\n<p><strong>\u751f\u4ea7\u8005\u8d1f\u8f7d\u5747\u8861<\/strong><\/p>\n<p>\u7531\u4e8e\u540c\u4e00\u4e2aTopic\u6d88\u606f\u4f1a\u88ab\u5206\u533a\u5e76\u5c06\u5176\u5206\u5e03\u5728\u591a\u4e2aBroker\u4e0a\uff0c\u56e0\u6b64\uff0c\u751f\u4ea7\u8005\u9700\u8981\u5c06\u6d88\u606f\u5408\u7406\u5730\u53d1\u9001\u5230\u8fd9\u4e9b\u5206\u5e03\u5f0f\u7684Broker\u4e0a\uff0c\u90a3\u4e48\u5982\u4f55\u5b9e\u73b0\u751f\u4ea7\u8005\u7684\u8d1f\u8f7d\u5747\u8861\uff0cKafka\u652f\u6301\u4f20\u7edf\u7684\u56db\u5c42\u8d1f\u8f7d\u5747\u8861\uff0c\u4e5f\u652f\u6301Zookeeper\u65b9\u5f0f\u5b9e\u73b0\u8d1f\u8f7d\u5747\u8861\u3002<\/p>\n<p>\u2460\u00a0<strong>\u56db\u5c42\u8d1f\u8f7d\u5747\u8861<\/strong>\uff0c\u6839\u636e\u751f\u4ea7\u8005\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u6765\u4e3a\u5176\u786e\u5b9a\u4e00\u4e2a\u76f8\u5173\u8054\u7684Broker\u3002\u901a\u5e38\uff0c\u4e00\u4e2a\u751f\u4ea7\u8005\u53ea\u4f1a\u5bf9\u5e94\u5355\u4e2aBroker\uff0c\u7136\u540e\u8be5\u751f\u4ea7\u8005\u4ea7\u751f\u7684\u6d88\u606f\u90fd\u53d1\u5f80\u8be5Broker\u3002\u8fd9\u79cd\u65b9\u5f0f\u903b\u8f91\u7b80\u5355\uff0c\u6bcf\u4e2a\u751f\u4ea7\u8005\u4e0d\u9700\u8981\u540c\u5176\u4ed6\u7cfb\u7edf\u5efa\u7acb\u989d\u5916\u7684TCP\u8fde\u63a5\uff0c\u53ea\u9700\u8981\u548cBroker\u7ef4\u62a4\u5355\u4e2aTCP\u8fde\u63a5\u5373\u53ef\u3002\u4f46\u662f\uff0c\u5176\u65e0\u6cd5\u505a\u5230\u771f\u6b63\u7684\u8d1f\u8f7d\u5747\u8861\uff0c\u56e0\u4e3a\u5b9e\u9645\u7cfb\u7edf\u4e2d\u7684\u6bcf\u4e2a\u751f\u4ea7\u8005\u4ea7\u751f\u7684\u6d88\u606f\u91cf\u53ca\u6bcf\u4e2aBroker\u7684\u6d88\u606f\u5b58\u50a8\u91cf\u90fd\u662f\u4e0d\u4e00\u6837\u7684\uff0c\u5982\u679c\u6709\u4e9b\u751f\u4ea7\u8005\u4ea7\u751f\u7684\u6d88\u606f\u8fdc\u591a\u4e8e\u5176\u4ed6\u751f\u4ea7\u8005\u7684\u8bdd\uff0c\u90a3\u4e48\u4f1a\u5bfc\u81f4\u4e0d\u540c\u7684Broker\u63a5\u6536\u5230\u7684\u6d88\u606f\u603b\u6570\u5dee\u5f02\u5de8\u5927\uff0c\u540c\u65f6\uff0c\u751f\u4ea7\u8005\u4e5f\u65e0\u6cd5\u5b9e\u65f6\u611f\u77e5\u5230Broker\u7684\u65b0\u589e\u548c\u5220\u9664\u3002<\/p>\n<p>\u2461\u00a0<strong>\u4f7f\u7528Zookeeper\u8fdb\u884c\u8d1f\u8f7d\u5747\u8861<\/strong>\uff0c\u7531\u4e8e\u6bcf\u4e2aBroker\u542f\u52a8\u65f6\uff0c\u90fd\u4f1a\u5b8c\u6210Broker\u6ce8\u518c\u8fc7\u7a0b\uff0c\u751f\u4ea7\u8005\u4f1a\u901a\u8fc7\u8be5\u8282\u70b9\u7684\u53d8\u5316\u6765\u52a8\u6001\u5730\u611f\u77e5\u5230Broker\u670d\u52a1\u5668\u5217\u8868\u7684\u53d8\u66f4\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u5b9e\u73b0\u52a8\u6001\u7684\u8d1f\u8f7d\u5747\u8861\u673a\u5236\u3002<\/p>\n<p><strong>\u6d88\u8d39\u8005\u8d1f\u8f7d\u5747\u8861<\/strong><\/p>\n<p>\u4e0e\u751f\u4ea7\u8005\u7c7b\u4f3c\uff0cKafka\u4e2d\u7684\u6d88\u8d39\u8005\u540c\u6837\u9700\u8981\u8fdb\u884c\u8d1f\u8f7d\u5747\u8861\u6765\u5b9e\u73b0\u591a\u4e2a\u6d88\u8d39\u8005\u5408\u7406\u5730\u4ece\u5bf9\u5e94\u7684Broker\u670d\u52a1\u5668\u4e0a\u63a5\u6536\u6d88\u606f\uff0c\u6bcf\u4e2a\u6d88\u8d39\u8005\u5206\u7ec4\u5305\u542b\u82e5\u5e72\u6d88\u8d39\u8005\uff0c\u6bcf\u6761\u6d88\u606f\u90fd\u53ea\u4f1a\u53d1\u9001\u7ed9\u5206\u7ec4\u4e2d\u7684\u4e00\u4e2a\u6d88\u8d39\u8005\uff0c\u4e0d\u540c\u7684\u6d88\u8d39\u8005\u5206\u7ec4\u6d88\u8d39\u81ea\u5df1\u7279\u5b9a\u7684Topic\u4e0b\u9762\u7684\u6d88\u606f\uff0c\u4e92\u4e0d\u5e72\u6270\u3002<\/p>\n<p><strong>\u6d88\u8d39\u5206\u533a\u4e0e\u6d88\u8d39\u8005\u7684\u5173\u7cfb<\/strong><\/p>\n<p>\u5bf9\u4e8e\u6bcf\u4e2a\u6d88\u8d39\u8005\u5206\u7ec4\uff0cKafka\u90fd\u4f1a\u4e3a\u5176\u5206\u914d\u4e00\u4e2a\u5168\u5c40\u552f\u4e00\u7684Group ID\uff0c\u540c\u4e00\u4e2a\u6d88\u8d39\u8005\u5206\u7ec4\u5185\u90e8\u7684\u6240\u6709\u6d88\u8d39\u8005\u5171\u4eab\u8be5ID\u3002\u540c\u65f6\uff0cKafka\u4e3a\u6bcf\u4e2a\u6d88\u8d39\u8005\u5206\u914d\u4e00\u4e2aConsumer ID\uff0c\u901a\u5e38\u91c7\u7528&#8221;Hostname:UUID&#8221;\u5f62\u5f0f\u8868\u793a\u3002\u5728Kafka\u4e2d\uff0c\u89c4\u5b9a\u4e86\u6bcf\u4e2a\u6d88\u606f\u5206\u533a\u6709\u4e14\u53ea\u80fd\u540c\u65f6\u6709\u4e00\u4e2a\u6d88\u8d39\u8005\u8fdb\u884c\u6d88\u8d39\uff0c\u56e0\u6b64\uff0c\u9700\u8981\u5728Zookeeper\u4e0a\u8bb0\u5f55\u6d88\u606f\u5206\u533a\u4e0e\u6d88\u8d39\u8005\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u6bcf\u4e2a\u6d88\u8d39\u8005\u4e00\u65e6\u786e\u5b9a\u4e86\u5bf9\u4e00\u4e2a\u6d88\u606f\u5206\u533a\u7684\u6d88\u8d39\u6743\u529b\uff0c\u9700\u8981\u5c06\u5176Consumer ID \u5199\u5165\u5230\u5bf9\u5e94\u6d88\u606f\u5206\u533a\u7684\u4e34\u65f6\u8282\u70b9\u4e0a\uff0c\u4f8b\u5982\/consumers\/[group_id]\/owners\/[topic]\/[broker_id-partition_id]\uff0c\u5176\u4e2d\uff0c[broker_id-partition_id]\u5c31\u662f\u4e00\u4e2a\u6d88\u606f\u5206\u533a\u7684\u6807\u8bc6\uff0c\u8282\u70b9\u5185\u5bb9\u5c31\u662f\u8be5\u6d88\u8d39\u5206\u533a\u4e0a\u6d88\u606f\u6d88\u8d39\u8005\u7684Consumer ID\u3002<\/p>\n<p><strong>\u6d88\u606f\u6d88\u8d39\u8fdb\u5ea6Offset\u8bb0\u5f55<\/strong><\/p>\n<p>\u5728\u6d88\u8d39\u8005\u5bf9\u6307\u5b9a\u6d88\u606f\u5206\u533a\u8fdb\u884c\u6d88\u606f\u6d88\u8d39\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u5b9a\u65f6\u5730\u5c06\u5206\u533a\u6d88\u606f\u7684\u6d88\u8d39\u8fdb\u5ea6Offset\u8bb0\u5f55\u5230Zookeeper\u4e0a\uff0c\u4ee5\u4fbf\u5728\u8be5\u6d88\u8d39\u8005\u8fdb\u884c\u91cd\u542f\u6216\u8005\u5176\u4ed6\u6d88\u8d39\u8005\u91cd\u65b0\u63a5\u7ba1\u8be5\u6d88\u606f\u5206\u533a\u7684\u6d88\u606f\u6d88\u8d39\u540e\uff0c\u80fd\u591f\u4ece\u4e4b\u524d\u7684\u8fdb\u5ea6\u5f00\u59cb\u7ee7\u7eed\u8fdb\u884c\u6d88\u606f\u6d88\u8d39\u3002Offset\u5728Zookeeper\u4e2d\u7531\u4e00\u4e2a\u4e13\u95e8\u8282\u70b9\u8fdb\u884c\u8bb0\u5f55\uff0c\u5176\u8282\u70b9\u8def\u5f84\u4e3a\/consumers\/[group_id]\/offsets\/[topic]\/[broker_id-partition_id]\uff0c\u8282\u70b9\u5185\u5bb9\u5c31\u662fOffset\u7684\u503c\u3002<\/p>\n<p><strong>\u6d88\u8d39\u8005\u6ce8\u518c<\/strong><\/p>\n<p>\u6d88\u8d39\u8005\u670d\u52a1\u5668\u5728\u521d\u59cb\u5316\u542f\u52a8\u65f6\u52a0\u5165\u6d88\u8d39\u8005\u5206\u7ec4\u7684\u6b65\u9aa4\u5982\u4e0b<\/p>\n<p>\u2460\u00a0<strong>\u6ce8\u518c\u5230\u6d88\u8d39\u8005\u5206\u7ec4<\/strong>\u3002\u6bcf\u4e2a\u6d88\u8d39\u8005\u670d\u52a1\u5668\u542f\u52a8\u65f6\uff0c\u90fd\u4f1a\u5230Zookeeper\u7684\u6307\u5b9a\u8282\u70b9\u4e0b\u521b\u5efa\u4e00\u4e2a\u5c5e\u4e8e\u81ea\u5df1\u7684\u6d88\u8d39\u8005\u8282\u70b9\uff0c\u4f8b\u5982\/consumers\/[group_id]\/ids\/[consumer_id]\uff0c\u5b8c\u6210\u8282\u70b9\u521b\u5efa\u540e\uff0c\u6d88\u8d39\u8005\u5c31\u4f1a\u5c06\u81ea\u5df1\u8ba2\u9605\u7684Topic\u4fe1\u606f\u5199\u5165\u8be5\u4e34\u65f6\u8282\u70b9\u3002<\/p>\n<p>\u2461\u00a0<strong>\u5bf9\u6d88\u8d39\u8005\u5206\u7ec4\u4e2d\u7684\u6d88\u8d39\u8005\u7684\u53d8\u5316\u6ce8\u518c\u76d1\u542c<\/strong>\u3002\u6bcf\u4e2a\u6d88\u8d39\u8005\u90fd\u9700\u8981\u5173\u6ce8\u6240\u5c5e\u6d88\u8d39\u8005\u5206\u7ec4\u4e2d\u5176\u4ed6\u6d88\u8d39\u8005\u670d\u52a1\u5668\u7684\u53d8\u5316\u60c5\u51b5\uff0c\u5373\u5bf9\/consumers\/[group_id]\/ids\u8282\u70b9\u6ce8\u518c\u5b50\u8282\u70b9\u53d8\u5316\u7684Watcher\u76d1\u542c\uff0c\u4e00\u65e6\u53d1\u73b0\u6d88\u8d39\u8005\u65b0\u589e\u6216\u51cf\u5c11\uff0c\u5c31\u89e6\u53d1\u6d88\u8d39\u8005\u7684\u8d1f\u8f7d\u5747\u8861\u3002<\/p>\n<p>\u2462\u00a0<strong>\u5bf9Broker\u670d\u52a1\u5668\u53d8\u5316\u6ce8\u518c\u76d1\u542c<\/strong>\u3002\u6d88\u8d39\u8005\u9700\u8981\u5bf9\/broker\/ids\/[0-N]\u4e2d\u7684\u8282\u70b9\u8fdb\u884c\u76d1\u542c\uff0c\u5982\u679c\u53d1\u73b0Broker\u670d\u52a1\u5668\u5217\u8868\u53d1\u751f\u53d8\u5316\uff0c\u90a3\u4e48\u5c31\u6839\u636e\u5177\u4f53\u60c5\u51b5\u6765\u51b3\u5b9a\u662f\u5426\u9700\u8981\u8fdb\u884c\u6d88\u8d39\u8005\u8d1f\u8f7d\u5747\u8861\u3002<\/p>\n<p>\u2463\u00a0<strong>\u8fdb\u884c\u6d88\u8d39\u8005\u8d1f\u8f7d\u5747\u8861\u3002<\/strong>\u4e3a\u4e86\u8ba9\u540c\u4e00\u4e2aTopic\u4e0b\u4e0d\u540c\u5206\u533a\u7684\u6d88\u606f\u5c3d\u91cf\u5747\u8861\u5730\u88ab\u591a\u4e2a\u6d88\u8d39\u8005\u6d88\u8d39\u800c\u8fdb\u884c\u6d88\u8d39\u8005\u4e0e\u6d88\u606f\u5206\u533a\u5206\u914d\u7684\u8fc7\u7a0b\uff0c\u901a\u5e38\uff0c\u5bf9\u4e8e\u4e00\u4e2a\u6d88\u8d39\u8005\u5206\u7ec4\uff0c\u5982\u679c\u7ec4\u5185\u7684\u6d88\u8d39\u8005\u670d\u52a1\u5668\u53d1\u751f\u53d8\u66f4\u6216Broker\u670d\u52a1\u5668\u53d1\u751f\u53d8\u66f4\uff0c\u4f1a\u53d1\u51fa\u6d88\u8d39\u8005\u8d1f\u8f7d\u5747\u8861\u3002<\/p>\n<p><strong>\u8d1f\u8f7d\u5747\u8861<\/strong><\/p>\n<p>Kafka\u501f\u52a9Zookeeper\u4e0a\u8bb0\u5f55\u7684Broker\u548c\u6d88\u8d39\u8005\u4fe1\u606f\uff0c\u91c7\u7528\u6d88\u8d39\u8005\u5747\u8861\u7b97\u6cd5\u8fdb\u884c\u8d1f\u8f7d\u5747\u8861\uff0c\u5176\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\u3002\u5047\u8bbe\u4e00\u4e2a\u6d88\u606f\u5206\u7ec4\u7684\u6bcf\u4e2a\u6d88\u8d39\u8005\u8bb0\u4e3aC1\uff0cC2\uff0cCi\uff0c&#8230;\uff0cCn\u3002\u90a3\u4e48\u5bf9\u4e8e\u6d88\u8d39\u8005Ci\uff0c\u5176\u5bf9\u5e94\u7684\u6d88\u606f\u5206\u533a\u5206\u914d\u7b56\u7565\u5982\u4e0b\uff1a<\/p>\n<p>1. \u8bbe\u7f6ePr\u4e3a\u6307\u5b9aTopic\u6240\u6709\u7684\u6d88\u606f\u5206\u533a\u3002<\/p>\n<p>2. \u8bbe\u7f6eCg\u4e3a\u7edf\u4e00\u6d88\u8d39\u8005\u5206\u7ec4\u4e2d\u7684\u6240\u6709\u6d88\u8d39\u8005\u3002<\/p>\n<p>3. \u5bf9Pr\u8fdb\u884c\u6392\u5e8f\uff0c\u4f7f\u5206\u5e03\u5728\u540c\u4e00\u4e2aBroker\u670d\u52a1\u5668\u4e0a\u7684\u5206\u533a\u5c3d\u91cf\u9760\u5728\u4e00\u8d77\u3002<\/p>\n<p>4. \u5bf9Cg\u8fdb\u884c\u6392\u5e8f\u3002<\/p>\n<p>5. \u8bbe\u7f6ei\u4e3aCi\u5728Cg\u4e2d\u7684\u4f4d\u7f6e\u7d22\u5f15\uff0c\u540c\u65f6\u8bbe\u7f6eN = size (Pr) \/ size (Cg)\u3002<\/p>\n<p>6. \u5c06\u7f16\u53f7\u4e3ai * N ~ (i + 1) * N &#8211; 1\u7684\u6d88\u606f\u5206\u533a\u5206\u914d\u7ed9Ci\u3002<\/p>\n<p>7. \u91cd\u65b0\u66f4\u65b0Zookeeper\u4e0a\u6d88\u606f\u5206\u533a\u4e0e\u6d88\u8d39\u8005Ci\u7684\u5173\u7cfb\u3002<\/p>\n<p><strong>\u4e94\u3001\u603b\u7ed3<\/strong><\/p>\n<p>\u672c\u7bc7\u535a\u5ba2\u8bb2\u89e3\u4e86Zookeeper\u5728\u5927\u578b\u5206\u5e03\u5f0f\u7cfb\u7edf\u4e2d\u7684\u5e94\u7528\uff0c\u4e5f\u4f53\u73b0\u4e86Zookeeper\u4f5c\u4e3a\u4e00\u6b3e\u5206\u5e03\u5f0f\u534f\u8c03\u5668\u7684\u4f18\u79c0\u7279\u70b9\uff0c\u81f3\u4e8eZookeeper\u5728\u5404\u4e2a\u7cfb\u7edf\u7684\u8be6\u7ec6\u5e94\u7528\uff0c\u8bfb\u8005\u53ef\u4ee5\u81ea\u884c\u67e5\u9605\u8d44\u6599\uff0c\u4e5f\u8c22\u8c22\u5404\u4f4d\u56ed\u53cb\u7684\u89c2\u770b~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u524d\u8a00 \u4e0a\u4e00\u7bc7\u535a\u6587\u8bb2\u89e3\u4e86Zookeeper\u7684\u5178\u578b\u5e94\u7528\u573a\u666f\uff0c\u5728\u5927\u6570\u636e\u65f6\u4ee3\uff0c\u5404\u79cd\u5206\u5e03\u5f0f\u7cfb\u7edf\u5c42\u51fa\u4e0d\u7a77\uff0c\u5176\u4e2d\uff0c\u6709\u5f88\u591a\u7cfb\u7edf\u90fd\u76f4\u63a5\u6216\u95f4\u63a5\u4f7f\u7528\u4e86Zookeeper\uff0c\u7528\u6765\u89e3\u51b3\u8bf8\u5982\u914d\u7f6e\u7ba1\u7406\u3001\u5206\u5e03\u5f0f\u901a\u77e5\/\u534f\u8c03\u3001\u96c6\u7fa4\u7ba1\u7406\u548cMaster\u9009\u4e3e\u7b49\u4e00\u7cfb\u5217\u5206\u5e03\u5f0f\u95ee\u9898\u3002 \u4e8c\u3001 Hadoop Hadoop\u7684\u6838\u5fc3\u662fHDFS\uff08Hadoop Distributed File System\uff09\u548cMapReduce\uff0c\u5206\u522b\u63d0\u4f9b\u4e86\u5bf9\u6d77\u91cf\u6570\u636e\u7684\u5b58\u50a8\u548c\u8ba1\u7b97\u80fd\u529b\uff0c\u540e\u6765\uff0cHadoop\u53c8\u5f15\u5165\u4e86\u5168\u65b0MapReduce\u6846\u67b6YARN\uff08Yet Another Resource Negotiator\uff09\u3002\u5728Hadoop\u4e2d\uff0cZookeeper\u4e3b\u8981\u7528\u4e8e\u5b9e\u73b0HA\uff08High Availability\uff09\uff0c\u8fd9\u90e8\u5206\u903b\u8f91\u4e3b\u8981\u96c6\u4e2d\u5728Hadoop Common\u7684HA\u6a21\u5757\u4e2d\uff0cHDFS\u7684NameNode\u4e0eYARN\u7684ResourceManager\u90fd\u662f\u57fa\u4e8e\u6b64HA\u6a21\u5757\u6765\u5b9e\u73b0\u81ea\u5df1\u7684HA\u529f\u80fd\uff0cYARN\u53c8\u4f7f\u7528\u4e86Zookeeper\u6765\u5b58\u50a8\u5e94\u7528\u7684\u8fd0\u884c\u72b6\u6001\u3002 YARN YARN\u662f\u4e00\u79cd\u65b0\u7684 Hadoop \u8d44\u6e90\u7ba1\u7406\u5668\uff0c\u5b83\u662f\u4e00\u4e2a\u901a\u7528\u8d44\u6e90\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u4e3a\u4e0a\u5c42\u5e94\u7528\u63d0\u4f9b\u7edf\u4e00\u7684\u8d44\u6e90\u7ba1\u7406\u548c\u8c03\u5ea6\uff0c\u5b83\u7684\u5f15\u5165\u4e3a\u96c6\u7fa4\u5728\u5229\u7528\u7387\u3001\u8d44\u6e90\u7edf\u4e00\u7ba1\u7406\u548c\u6570\u636e\u5171\u4eab\u7b49\u65b9\u9762\u5e26\u6765\u4e86\u5de8\u5927\u597d\u5904\u3002\u5176\u53ef\u4ee5\u652f\u6301MapReduce\u6a21\u578b\uff0c\u540c\u65f6\u4e5f\u652f\u6301Tez\u3001Spark\u3001Storm\u3001Impala\u3001Open MPI\u7b49\u3002 YARN\u4e3b\u8981\u7531ResourceManager\uff08RM\uff09\u3001NodeManager\uff08NM\uff09\u3001ApplicationManager\uff08AM\uff09\u3001Container\u56db\u90e8\u5206\u6784\u6210\u3002\u5176\u4e2d\uff0cResourceManager\u4e3a\u5168\u5c40\u8d44\u6e90\u7ba1\u7406\u5668\uff0c\u8d1f\u8d23\u6574\u4e2a\u7cfb\u7edf\u7684\u8d44\u6e90\u7ba1\u7406\u548c\u5206\u914d\u3002\u7531YARN\u4f53\u7cfb\u67b6\u6784\u53ef\u4ee5\u770b\u5230ResourceManager\u7684\u5355\u70b9\u95ee\u9898\uff0cResourceManager\u7684\u5de5\u4f5c\u72b6\u51b5\u76f4\u63a5\u51b3\u5b9a\u4e86\u6574\u4e2aYARN\u67b6\u6784\u662f\u5426\u53ef\u4ee5\u6b63\u5e38\u8fd0\u8f6c\u3002 ResourceManager [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-829","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=829"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/829\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}