{"id":5815,"date":"2022-02-28T18:09:48","date_gmt":"2022-02-28T10:09:48","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=5815"},"modified":"2022-11-14T17:16:10","modified_gmt":"2022-11-14T09:16:10","slug":"%e4%bd%bf%e7%94%a8sqoop%e5%af%bc%e5%85%a5mysql%e6%95%b0%e6%8d%ae%e5%88%b0hyperbase","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=5815","title":{"rendered":"\u4f7f\u7528Sqoop\u5bfc\u5165MySQL\u6570\u636e\u5230Hyperbase"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<p>\u4f7f\u7528Sqoop\u628aMySQL\u6570\u636e\u5e93\u7684\u6570\u636e\u5bfc\u5165\u5230Hyperbase\u4e2d\u3002<\/p>\n<p>\u5b9e\u9a8c\u73af\u5883\u4e3aTDH 6.2.1\uff0c\u5176\u4ed6\u7248\u672c\u4e5f\u53ef\u4ee5\u53c2\u8003\u3002<\/p>\n<hr \/>\n<h3>\u8be6\u7ec6\u8bf4\u660e<\/h3>\n<p>TDH Client\u96c6\u6210\u4e86Sqoop\u5de5\u5177\uff0c\u800cSqoop\u662f\u652f\u6301MySQL\u53caHBase\u6570\u636e\u5e93\u7684\uff0cHyperbase\u90e8\u5206\u517c\u5bb9HBase\uff0c\u6240\u4ee5\u53ef\u4ee5\u5c1d\u8bd5\u8fd9\u4e2a\u65b9\u6848\u3002<\/p>\n<h4>\u64cd\u4f5c\u6b65\u9aa4<\/h4>\n<h5>1 \u5b89\u88c5TDH Client<\/h5>\n<p>\u5728Manager 8180\u9875\u9762\u4e2d\u4e0b\u8f7dTDH Client\u7136\u540e\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e2d\u3002<\/p>\n<h5>2 \u68c0\u67e5TDH-Client\u76ee\u5f55\u4e2d\u662f\u5426\u6709hbase\u76ee\u5f55<\/h5>\n<p>\u8fdb\u5165<code>TDH-Client<\/code>\u76ee\u5f55\u4e2d\uff0c\u68c0\u67e5\u662f\u5426\u6709<code>hbase<\/code>\u76ee\u5f55\u3002<\/p>\n<p>\u5982\u679c\u5b58\u5728<code>hbase<\/code>\u76ee\u5f55\u5219\u8868\u793a\u6b63\u5e38\uff0c\u8fdb\u5165\u4e0b\u4e00\u6b65\u3002<\/p>\n<p>\u5982\u679c\u4e0d\u5b58\u5728<code>hbase<\/code>\u76ee\u5f55\uff0c\u5219\u521b\u5efa<code>hbase<\/code>\u76ee\u5f55\u5e76\u5c06<code>hyperbase<\/code>\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u62f7\u8d1d\u8fdb\u53bb\u3002<\/p>\n<pre><code class=\"language-shell\">mkdir hbase\ncp -r hyperbase\/* hbase\/<\/code><\/pre>\n<h5>3 \u4e0b\u8f7dlib\u5305<\/h5>\n<p>\u901a\u8fc7<a href=\"https:\/\/nj.transwarp.club:666\/main.html?download&weblink=d3c084c80b9a1ddb91aece7a24b34fe7&realfilename=lib.zip\">\u672c\u94fe\u63a5<\/a>\u4e0b\u8f7dlib\u5305\u3002<\/p>\n<h5>4 \u5c06\u4e0b\u8f7d\u7684lib\u5305\u4e2d\u7684\u6240\u6709jar\u5305\u4e0a\u4f20\u5230sqoop\/lib\u76ee\u5f55<\/h5>\n<p>\u5c06\u4e0a\u4e00\u6b65\u4e0b\u8f7d\u7684lib\u5305\u4e2d\u6240\u6709\u7684<code>.jar<\/code>\u6587\u4ef6\u4e0a\u4f20\u5230<code>TDH-Client\/sqoop\/lib<\/code>\u76ee\u5f55\u4e2d\u3002<\/p>\n<h5>5 \u521d\u59cb\u5316TDH Client<\/h5>\n<p>\u5728TDH Client\u6839\u76ee\u5f55\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u521d\u59cb\u5316\u3002<\/p>\n<pre><code class=\"language-shell\">source init.sh<\/code><\/pre>\n<h5>6 \u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u5bfc\u6570<\/h5>\n<pre><code class=\"language-shell\">sqoop import \\\n\n--connect jdbc:mysql:\/\/172.22.40.199:3306\/test \\\n\n--username root \\\n\n--password  root \\\n\n--table test2  \\\n\n--hbase-table test3 \\\n\n--column-family name  \\\n\n--hbase-create-table \\\n\n--hbase-row-key id \\\n\n--hbase-bulkload <\/code><\/pre>\n<p>\u5c06\u4e0a\u9762\u793a\u4f8b\u4e2d\u7684MySQL\u548cHyperbase\u76f8\u5173\u4fe1\u606f\u6539\u6210\u5b9e\u9645\u7684\u5373\u53ef\u3002<\/p>\n<h4>\u5e38\u89c1\u95ee\u9898<\/h4>\n<h5>AuthFailedException: KeeperErrorCode = AuthFailed for \/hyperbase1\/hbaseid<\/h5>\n<p><img decoding=\"async\" src=\"https:\/\/i.loli.net\/2021\/04\/30\/86ALaBNGOzjWpml.png\" alt=\"image.png\" \/><\/p>\n<p>\u8fd9\u662f\u7531\u4e8e\u5f00\u4e86\u5b89\u5168\u7684\u96c6\u7fa4zookeeper\u5f00\u4e86\u5f3a\u8ba4\u8bc1\u5bfc\u81f4\u7684\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\u662f\u5728Manager\u8282\u70b9\uff0c\u4fee\u6539<code>\/var\/lib\/transwarp-manager\/master\/content\/meta\/services\/ZOOKEEPER\/transwarp-6.2.1-final\/templates\/zookeeper-env.sh.ftl<\/code>\u6587\u4ef6\uff0c\u67e5\u627e\u5173\u952e\u8bcd<code>-Dzookeeper.allowSaslFailedClients=false<\/code>\uff0c\u7136\u540e\u628afalse\u6539\u6210true\uff0c\u91cd\u542fmanager\uff0c\u914d\u7f6e\u670d\u52a1+\u91cd\u542fzookeeper\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u4f7f\u7528Sqoop\u628aMySQL\u6570\u636e\u5e93\u7684\u6570\u636e\u5bfc\u5165\u5230Hyperbase\u4e2d\u3002 \u5b9e\u9a8c\u73af\u5883\u4e3aTDH 6.2.1\uff0c\u5176 ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=5815\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":81,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5815","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5815"}],"version-history":[{"count":2,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5815\/revisions"}],"predecessor-version":[{"id":8981,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/5815\/revisions\/8981"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}