{"id":317,"date":"2020-11-27T18:51:29","date_gmt":"2020-11-27T10:51:29","guid":{"rendered":"https:\/\/blog.frost-s.tk\/?p=317"},"modified":"2020-11-27T18:51:31","modified_gmt":"2020-11-27T10:51:31","slug":"hbase-%e6%95%b4%e7%90%86","status":"publish","type":"post","link":"https:\/\/blog.frost-s.com\/index.php\/2020\/11\/27\/hbase-%e6%95%b4%e7%90%86\/","title":{"rendered":"Hbase \u6574\u7406"},"content":{"rendered":"\n<h3 class=\"has-very-dark-gray-color has-text-color wp-block-heading\">Hbase\u7b80\u4ecb<\/h3>\n\n\n\n<ul type=\"1\"><li><strong>HBase<\/strong>\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u975e\u5173\u7cfb\u578b\u5206\u5e03\u5f0f\u6570\u636e\u5e93\uff08 <strong>NoSQL<\/strong>\uff09\uff0c\u5b83\u53c2\u8003\u4e86\u8c37\u6b4c\u7684<strong>BigTable<\/strong>\u5efa\u6a21\uff0c\u5b9e\u73b0\u7684\u7f16\u7a0b\u8bed\u8a00\u4e3a <strong>Java<\/strong>\u3002<\/li><li><strong>HBase<\/strong>\u662f\u4e00\u4e2a<strong>\u5206\u5e03\u5f0f\u5b58\u50a8\u7cfb\u7edf<\/strong>\uff0c\u5177\u6709\u9ad8\u53ef\u9760\u6027\u3001\u9ad8\u6027\u80fd\u3001\u9762\u5411\u5217\u3001\u53ef\u4f38\u7f29\uff08\u589e\u52a0\u6216\u51cf\u5c11\u786c\u4ef6\u7684\u6570\u91cf\uff09\u7684\u7279\u70b9\u3002<\/li><\/ul>\n\n\n\n<p>\u9ad8\u53ef\u9760\uff1a1.\u5e95\u5c42\u6587\u4ef6\u5b58\u50a8\u91c7\u7528\u7684\u662fHDFS\uff0c\u5177\u6709\u526f\u672c\u673a\u5236\u3002<\/p>\n\n\n\n<p>\u9ad8\u6027\u80fd\uff1a1.\u5206\u5e03\u5f0f\u7cfb\u7edf\uff0c\u901a\u8fc7\u5e76\u884c\u5ea6\u63d0\u9ad8\u6027\u80fd<\/p>\n\n\n\n<p>2.\u901a\u8fc7\u8868\u7684\u5207\u5206\uff0c\u5b9e\u73b0\u4e0estore\u7684\u5b58\u50a8<\/p>\n\n\n\n<p class=\"has-text-color has-very-dark-gray-color\"><span class=\"has-inline-color has-very-dark-gray-color\">3.\u00a0<strong>HBase<\/strong>\u5229\u7528<strong>Hadoop HDFS<\/strong>\u4f5c\u4e3a\u5176\u6587\u4ef6\u5b58\u50a8\u7cfb\u7edf<\/span><\/p>\n\n\n\n<ul type=\"1\"><li><strong>HBase<\/strong>\u9002\u5408\u5177\u6709\u5982\u4e0b\u9700\u6c42\u7684\u5e94\u7528\uff1a<ul><li>\u6d77\u91cf\u6570\u636e\uff08 <strong>TB<\/strong>\u3001 <strong>PB<\/strong>\uff09<\/li><li>\u9ad8\u541e\u5410\u91cf<\/li><li>\u9700\u8981\u5728\u6d77\u91cf\u6570\u636e\u4e2d\u5b9e\u73b0\u9ad8\u6548\u7684\u968f\u673a\u8bfb\u53d6<\/li><li>\u9700\u8981\u5f88\u597d\u7684\u6027\u80fd\u4f38\u7f29\u80fd\u529b<\/li><li>\u80fd\u591f\u540c\u65f6\u5904\u7406\u7ed3\u6784\u5316\u548c\u975e\u7ed3\u6784\u5316\u7684\u6570\u636e<\/li><li>\u4e0d\u9700\u8981\u5b8c\u5168\u62e5\u6709\u4f20\u7edf\u5173\u7cfb\u578b\u6570\u636e\u5e93\u6240\u5177\u5907\u7684ACID\u7279\u6027<\/li><\/ul><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"404\" src=\"https:\/\/blog.frost-s.com\/wp-content\/uploads\/2020\/11\/image-2-636x404.png\" alt=\"\u8ba1\u7b97\u673a\u751f\u6210\u4e86\u53ef\u9009\u6587\u5b57:\n\u90e8\u7f72\u67b6\u6784\u4e00\u67b6\u6784\n\u4e6a0\u5879D\nS\u7be1\u6d25@F\u95a3\nF\u7684\n\u56d7\n\u56d7\n\uff0c\u53f6\u7684\n\u56d7\n\u56d7\n\u5de5\u56d7\n\u56d7\n\u56d7\u56d7\" class=\"wp-image-322\"\/><\/figure>\n\n\n\n<h3 class=\"has-very-dark-gray-color has-text-color wp-block-heading\">Hbase \u903b\u8f91\u6a21\u578b<\/h3>\n\n\n\n<ol type=\"1\"><li>\u57fa\u672c\u7ed3\u6784<ul><li>\u8868(table) \u5b57\u7b26\u4e32<\/li><li>\u884c(row) \u884c\u7531\u884c\u5065(rowkey)\u552f\u4e00\u6807\u8bc6<\/li><li>\u5217\u65cf(column failmy)\u884c\u7684\u6570\u636e\u6309\u5217\u65cf\u5206\u7ec4cf\uff0c\u521b\u5efa\u8868\u7684\u65f6\u5019\u5b9a\u4e49\uff0c\u4e0d\u8f7b\u6613\u4fee\u6539<\/li><li>\u5217\u9650\u5b9a\u7b26(column qualifier)\u5217\u91cc\u9762\u7684\u6570\u636e\u5b9a\u4f4d\u901a\u8fc7\u5217\u9650\u5b9a\u7b26<\/li><li>\u5355\u5143(cell)\u884c\u5065\uff0c\u5217\u65cf\u548c\u5217\u9650\u5b9a\u7b26\u4e00\u8d77\u786e\u5b9a\u4e00\u4e2a\u5355\u5143\uff0cvalue<\/li><li>\u65f6\u95f4\u7248\u672c(vesion)\u5355\u5143\u503c\u6709\u65f6\u95f4\u7248\u672c\uff0c\u7528\u65f6\u95f4\u6233\u6765\u6807\u8bc6\u9ed8\u8ba41\u4e2a\u3002<\/li><\/ul><\/li><li><strong>\u4e3b\u952e\uff08<\/strong><strong>Row Key<\/strong><strong>\uff09<\/strong><ul><li>\u7528\u6765\u68c0\u7d22\u8bb0\u5f55\u7684\u4e3b\u952e\u3002<\/li><li>\u4e3b\u952e\u4e3a\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u6700\u5927\u957f\u5ea6\u4e3a64kb\uff0c\u6309\u5b57\u5178\u987a\u5e8f\u5b58\u50a8\uff0c\u5728HBase\u5185\u90e8\u4fdd\u5b58\u4e3a\u5b57\u8282\u6570\u7ec4<\/li><li>\u8bbf\u95eeHBase \u8868\u4e2d\u7684\u884c\uff0c\u53ea\u6709\u4e09\u79cd\u65b9\u5f0f<\/li><\/ul><\/li><\/ol>\n\n\n\n<p>- \u901a\u8fc7\u5355\u4e2aRow Key\u8bbf\u95ee&nbsp;&nbsp;<\/p>\n\n\n\n<p>- \u901a\u8fc7Row Key\u7684range&nbsp;<\/p>\n\n\n\n<p>- \u5168\u8868\u626b\u63cf<\/p>\n\n\n\n<ol type=\"1\"><li><strong>\u5217\u65cf\uff08<\/strong><strong>Column Family<\/strong><strong>\uff09<\/strong><\/li><\/ol>\n\n\n\n<ul><li>\u5217\u65cf\u5728\u521b\u5efa\u8868\u7684\u65f6\u5019\u58f0\u660e\uff0c\u4e00\u4e2a\u5217\u65cf\u53ef\u4ee5\u5305\u542b\u591a\u4e2a\u5217\uff0c\u5217\u4e2d\u7684\u6570\u636e\u90fd\u662f\u4ee5\u4e8c\u8fdb\u5236\u5f62\u5f0f\u5b58\u5728\uff0c\u6ca1\u6709\u6570\u636e\u7c7b\u578b\u3002<\/li><li>\u5217\u65cf\u662f\u4e00\u4e9b\u5217\u7684\u96c6\u5408\u3002<\/li><li>\u4e00\u4e2a\u5217\u65cf\u6240\u6709\u5217\u6210\u5458\u662f\u6709\u7740\u76f8\u540c\u7684\u524d\u7f00\u3002\u6bd4\u5982\uff0c\u5217courses:history&nbsp;\u548c&nbsp;courses:math\u90fd\u662f \u5217\u65cf&nbsp;courses\u7684\u6210\u5458.\u5192\u53f7(:)\u662f\u5217\u65cf\u7684\u5206\u9694\u7b26\uff0c\u7528\u6765\u533a\u5206\u524d\u7f00\u548c\u5217\u540d<\/li><\/ul>\n\n\n\n<ol type=\"1\"><li><strong>\u65f6\u95f4\u6233\u4e0e\u5b58\u50a8\u5355\u5143\uff08<\/strong><strong>Timestamp and Cell<\/strong><strong>\uff09<\/strong><\/li><\/ol>\n\n\n\n<ul><li>HBase\u4e2d\u901a\u8fc7row\u548ccolumns\u786e\u5b9a\u7684\u4e3a\u4e00\u4e2a\u5b58\u8d2e\u5355\u5143\u79f0\u4e3acell\u3002\u6bcf\u4e2a cell\u90fd\u4fdd\u5b58\u7740\u540c\u4e00\u4efd\u6570\u636e\u7684\u591a\u4e2a\u7248\u672c\u3002<\/li><li>\u5728\u5199\u5165\u6570\u636e\u65f6\uff0c\u65f6\u95f4\u6233\u53ef\u4ee5\u7531HBase\u81ea\u52a8\u8d4b\u503c\uff08\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\u7cbe\u786e\u5230\u6beb\u79d2\uff09\uff0c\u4e5f\u53ef\u4ee5\u663e\u793a\u8d4b\u503c\u3002<\/li><li>\u6bcf\u4e2acell\u4e2d\uff0c\u4e0d\u540c\u7248\u672c\u7684\u6570\u636e\u6309\u7167\u65f6\u95f4\u7684\u5012\u5e8f\u6392\u5e8f\u3002<\/li><\/ul>\n\n\n\n<p>\u00a0\u00a0\u00a0 {row, column, version}\u5143\u7ec4\u5c31\u662f\u4e00\u4e2aHBase\u4e2d\u7684\u4e00\u4e2a\u00a0cell\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1137\" height=\"498\" src=\"https:\/\/blog.frost-s.com\/wp-content\/uploads\/2020\/11\/image-1.png\" alt=\"\u8ba1\u7b97\u673a\u751f\u6210\u4e86\u53ef\u9009\u6587\u5b57:\n\u884c\n\u952e\n\u65f6\u95f4\u6233\nt8\n\u5217\u65cfcontents\ncontents:html\u2014&quot;<html&gt;..\ncontents:html=&quot;<html&gt;..\ncontents:html=&quot;<html&gt;..\n\u5217\u65cfanchor\nanchor:cnnsi.com\/'CNN&quot;\nanchor:my.look.ca=\n&quot;CNN.com\/\n\u5217\u65cfnume\ncom.cnn.www&quot;\nt6\n\u5de7\nt3\" class=\"wp-image-320\" srcset=\"https:\/\/blog.frost-s.com\/wp-content\/uploads\/2020\/11\/image-1.png 1137w, https:\/\/blog.frost-s.com\/wp-content\/uploads\/2020\/11\/image-1-768x336.png 768w\" sizes=\"(max-width: 1137px) 100vw, 1137px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Hbase\u7b80\u4ecb HBase\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u975e\u5173\u7cfb\u578b\u5206\u5e03\u5f0f\u6570\u636e\u5e93\uff08 NoSQL\uff09\uff0c\u5b83\u53c2\u8003\u4e86\u8c37\u6b4c\u7684BigTable\u5efa\u6a21 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":323,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/posts\/317"}],"collection":[{"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/comments?post=317"}],"version-history":[{"count":3,"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/posts\/317\/revisions"}],"predecessor-version":[{"id":324,"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/posts\/317\/revisions\/324"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/media\/323"}],"wp:attachment":[{"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/media?parent=317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/categories?post=317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.frost-s.com\/index.php\/wp-json\/wp\/v2\/tags?post=317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}