{"id":1662,"date":"2020-09-25T17:09:47","date_gmt":"2020-09-25T09:09:47","guid":{"rendered":"http:\/\/www.gbase8.cn\/?p=1662"},"modified":"2021-12-23T16:25:06","modified_gmt":"2021-12-23T08:25:06","slug":"gbase-8a%e9%83%a8%e5%88%86v95%e7%89%88%e6%9c%ac%e5%8d%87%e7%ba%a7%e6%97%b6%e9%9c%80%e8%a6%81%e5%bc%ba%e8%a1%8c%e5%88%b7%e5%bf%ab%e7%85%a7%e7%9a%84%e6%93%8d%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/www.gbase8.cn\/en\/1662","title":{"rendered":"\u5357\u5927\u901a\u7528GBase 8a\u90e8\u5206V95\u7248\u672c\u5347\u7ea7\u65f6\u9700\u8981gcware.flush_statemachine\u5f3a\u884c\u5237\u5feb\u7167\u7684\u64cd\u4f5c"},"content":{"rendered":"<p>GBase 8a\u90e8\u5206V95\u7248\u672c\u5347\u7ea7\u65f6\u9700\u8981\u5f3a\u884c\u5237\u5feb\u7167\u7684\u64cd\u4f5c<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Directory Navigation<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a2b1575c6507\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a2b1575c6507\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.gbase8.cn\/en\/1662\/#1%E3%80%81%E5%8D%87%E7%BA%A7%E5%89%8D%E5%A6%82%E4%BD%95%E7%A1%AE%E8%AE%A4gcware%E5%BF%AB%E7%85%A7%E7%89%88%E6%9C%AC%EF%BC%9F\" >1\u3001\u5347\u7ea7\u524d\u5982\u4f55\u786e\u8ba4gcware\u5feb\u7167\u7248\u672c\uff1f&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.gbase8.cn\/en\/1662\/#_2%E3%80%81%E5%A6%82%E4%BD%95%E5%88%B7%E5%BF%AB%E7%85%A7%EF%BC%9F\" >&nbsp;2\u3001\u5982\u4f55\u5237\u5feb\u7167\uff1f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.gbase8.cn\/en\/1662\/#3%E3%80%81%E5%A6%82%E4%BD%95%E7%A1%AE%E8%AE%A4%E5%BF%AB%E7%85%A7%E5%88%B7%E6%88%90%E5%8A%9F%E4%BA%86%EF%BC%9F\" >3\u3001\u5982\u4f55\u786e\u8ba4\u5feb\u7167\u5237\u6210\u529f\u4e86\uff1f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.gbase8.cn\/en\/1662\/#4%E3%80%81%E5%90%8E%E7%BB%AD%E8%AE%A1%E5%88%92\" >4\u3001\u540e\u7eed\u8ba1\u5212<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.gbase8.cn\/en\/1662\/#%E6%93%8D%E4%BD%9C%E6%A0%B7%E4%BE%8B\" >\u64cd\u4f5c\u6837\u4f8b<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1%E3%80%81%E5%8D%87%E7%BA%A7%E5%89%8D%E5%A6%82%E4%BD%95%E7%A1%AE%E8%AE%A4gcware%E5%BF%AB%E7%85%A7%E7%89%88%E6%9C%AC%EF%BC%9F\"><\/span>1\u3001\u5347\u7ea7\u524d\u5982\u4f55\u786e\u8ba4gcware\u5feb\u7167\u7248\u672c\uff1f&nbsp; <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>&nbsp; \u5728\u6240\u6709gcware\u670d\u52a1\u7684\u8282\u70b9\u4e0a\uff0c\u8fdb\u5165$GCWARE_BASE\/data\/gcware\u76ee\u5f55\uff0c\u67e5\u770bSNAPSHOT.term.index\u4fe1\u606f\uff0c\u5982\u679c\u5b58\u5728\u591a\u4e2aSNAPSHOT.term.index\uff0c\u5148\u6bd4\u8f83term\u4f4d\u7f6e\u7684\u6570\u503c\uff0cterm\u5927\u7684\u4e3a\u6700\u65b0\u7684\u5feb\u7167\uff0c\u5982\u679cterm\u4e00\u81f4\uff0c\u518d\u6bd4\u8f83index\u4f4d\u7f6e\u7684\u6570\u503c\uff0cindex\u5927\u7684\u4e3a\u6700\u65b0\u7684\u5feb\u7167\u3002&nbsp; &nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"_2%E3%80%81%E5%A6%82%E4%BD%95%E5%88%B7%E5%BF%AB%E7%85%A7%EF%BC%9F\"><\/span>&nbsp;<strong>2\u3001\u5982\u4f55\u5237\u5feb\u7167\uff1f<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\uff081\uff09\u5347\u7ea7\u4e4b\u524d\u505c\u6b62\u96c6\u7fa4\u6240\u6709\u8282\u70b9\u670d\u52a1\uff1b\u00a0 \u00a0 <\/li><li>\uff082\uff09\u53ea\u542f\u52a8\u6240\u6709gcware\u670d\u52a1\uff08V952coor\u4e0a\u6267\u884c\uff1agcluster_services gcware start\uff0cV953gcware\u4e0a\u6267\u884c\uff1agcware_services gcware start\uff09\u00a0 \u00a0 <\/li><li>\uff083\uff09\u4efb\u610f\u9009\u62e9\u4e00\u4e2acoor\u8282\u70b9\uff0c\u6267\u884cgcadmin\u67e5\u770bgcware\u670d\u52a1\u72b6\u6001\uff0c\u786e\u4fdd\u6240\u6709gcware\u670d\u52a1\u72b6\u6001\u5747\u4e3aOPEN\u00a0 \u00a0 <\/li><li>\uff084\uff09\u4efb\u610f\u9009\u62e9\u4e00\u4e2acoor\u8282\u70b9\uff0c\u6267\u884cpython,import gcware,gcware.flush_statemachine()\uff0cgcware\u5237\u5feb\u7167\u662f\u5f02\u6b65\u6267\u884c\u7684\uff0c\u8fd4\u56de1\u4ee3\u8868\u4ec5\u4ee3\u8868\u5237\u5feb\u7167\u547d\u4ee4\u53d1\u9001\u6210\u529f\u3002\u00a0 \u00a0<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3%E3%80%81%E5%A6%82%E4%BD%95%E7%A1%AE%E8%AE%A4%E5%BF%AB%E7%85%A7%E5%88%B7%E6%88%90%E5%8A%9F%E4%BA%86%EF%BC%9F\"><\/span>3\u3001\u5982\u4f55\u786e\u8ba4\u5feb\u7167\u5237\u6210\u529f\u4e86\uff1f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\uff081\uff09\u5728\u6240\u6709gcware\u670d\u52a1\u7684\u8282\u70b9\u4e0a\uff0c\u8fdb\u5165$GCWARE_BASE\/data\/gcware\u76ee\u5f55\uff0c\u67e5\u770bSNAPSHOT.term.index\u4fe1\u606f\uff0c\u5982\u679cterm\u6216index\uff0c\u5176\u4e2d\u4efb\u610f\u4e00\u4e2a\u53d8\u5927\u7684SNAPSHOT.term.index\u6587\u4ef6\u5939\u5b58\u5728\uff0c\u5219\u4ee3\u8868\u5237\u65b0\u6210\u529f\u3002\u00a0 \u00a0 <\/li><li>\uff082\uff09\u5982\u679c\u6267\u884c\u5b8cgcware.flush_statemachine()\u540e\u7acb\u5373\u67e5\u770b\uff0c\u53ef\u80fd\u4f1a\u5b58\u5728SNAPSHOT.term.index.s\u7684\u6587\u4ef6\u5939\u5b58\u5728\uff0c\u8868\u793a\u5237\u65b0\u5feb\u7167\u6b63\u5728\u8fdb\u884c\u4e2d\u3002<strong>\u00a0 \u00a0 <\/strong><\/li><li>\u4e00\u822c\u5237\u5b8c\u4e86\uff0cSNAPSHOT\u6587\u4ef6\u4f1a\u53d8\u6210\u5f88\u5c0f\u7684\uff0c\u6bd4\u5982320\u4e2a\u5b57\u8282\u3002<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@gbase_rh7_001 gcware]$ python\r\nPython 2.7.5 (default, Aug  2 2016, 04:20:16)\r\n&#91;GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import gcware\r\n>>> gcware.flush_statemachine()\r\n1\r\n>>> gcware.flush_statemachine()\r\n1\r\n>>> gcware.flush_statemachine()\r\n1\r\n>>> gcware.flush_statemachine()\r\n1\r\n>>> exit()\r\n&#91;gbase@gbase_rh7_001 gcware]$ ll\r\ntotal 16\r\n-rw-r--r--. 1 gbase gbase  49 Dec 23 16:19 GCWARE_META.A\r\n-rw-r--r--. 1 gbase gbase  40 Dec 23 16:19 GCWARE_META.B\r\n-rw-r--r--. 1 gbase gbase 320 Dec 23 16:19 REDOLOG.37975\r\n-rw-r--r--. 1 gbase gbase 320 Dec 23 16:19 REDOLOG.37977\r\ndrwxr-xr-x. 3 gbase gbase  69 Dec 23 16:19 SNAPSHOT.142.37975\r\ndrwxr-xr-x. 3 gbase gbase  69 Dec 23 16:19 SNAPSHOT.142.37977\r\n&#91;gbase@gbase_rh7_001 gcware]$ <\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4%E3%80%81%E5%90%8E%E7%BB%AD%E8%AE%A1%E5%88%92\"><\/span><strong>4\u3001\u540e\u7eed\u8ba1\u5212<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4e3a\u4e86\u63d0\u5347\u6613\u7528\u6027\uff0c\u964d\u4f4e\u73b0\u573a\u8bef\u64cd\u4f5c\u7684\u98ce\u9669\uff0cV95\u7684\u4e0b\u4e00\u7248\u672c\u4f1a\u628a\u4e0a\u8ff0\u8fc7\u7a0b\u81ea\u52a8\u5316\uff0c\u7531\u5347\u7ea7\u811a\u672c\u81ea\u52a8\u5b8c\u6210\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%93%8D%E4%BD%9C%E6%A0%B7%E4%BE%8B\"><\/span>\u64cd\u4f5c\u6837\u4f8b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;gbase@localhost gcinstall]$ gcluster_services gcware start\nStarting gcware :                                          &#91;  OK  ]\n&#91;gbase@localhost gcinstall]$ gcadmin\nCLUSTER STATE:         ACTIVE\nVIRTUAL CLUSTER MODE:  NORMAL\n\n=============================================================\n|           GBASE COORDINATOR CLUSTER INFORMATION           |\n=============================================================\n|   NodeName   | IpAddress  | gcware | gcluster | DataState |\n-------------------------------------------------------------\n| coordinator1 | 10.0.2.102 | CLOSE  |  CLOSE   |     0     |\n-------------------------------------------------------------\n| coordinator2 | 10.0.2.202 |  OPEN  |  CLOSE   |     0     |\n-------------------------------------------------------------\n| coordinator3 | 10.0.2.203 | CLOSE  |  CLOSE   |     0     |\n-------------------------------------------------------------\n=========================================================================================================\n|                                    GBASE DATA CLUSTER INFORMATION                                     |\n=========================================================================================================\n| NodeName |                IpAddress                 | DistributionId | gnode | syncserver | DataState |\n---------------------------------------------------------------------------------------------------------\n|  node1   |                10.0.2.102                |       6        | CLOSE |   CLOSE    |     0     |\n---------------------------------------------------------------------------------------------------------\n|  node2   |                10.0.2.202                |       6        | CLOSE |   CLOSE    |     0     |\n---------------------------------------------------------------------------------------------------------\n|  node3   |                10.0.2.203                |       6        | CLOSE |   CLOSE    |     0     |\n---------------------------------------------------------------------------------------------------------\n\n&#91;gbase@localhost gcinstall]$ python\nPython 2.7.5 (default, Aug  2 2016, 04:20:16)\n&#91;GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; import gcware;\n&gt;&gt;&gt; gcware.flush_statemachine()\n1\n&gt;&gt;&gt; quit\nUse quit() or Ctrl-D (i.e. EOF) to exit\n&gt;&gt;&gt; quit()\n&#91;gbase@localhost gcinstall]$ gcluster_services gcware stop\nStopping gcware :                                          &#91;  OK  ]\n&#91;gbase@localhost gcinstall]$ <\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>\u5357\u5927\u901a\u7528GBase 8a\u90e8\u5206V95\u7248\u672c\u5347\u7ea7\u65f6\u9700\u8981\u5f3a\u884c\u5237\u5feb\u7167\u7684\u64cd\u4f5c<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[99,93],"class_list":["post-1662","post","type-post","status-publish","format-standard","hentry","category-gbase8a","tag-gcware","tag-93"],"_links":{"self":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/comments?post=1662"}],"version-history":[{"count":8,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1662\/revisions"}],"predecessor-version":[{"id":8528,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/posts\/1662\/revisions\/8528"}],"wp:attachment":[{"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/media?parent=1662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/categories?post=1662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gbase8.cn\/en\/wp-json\/wp\/v2\/tags?post=1662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}