{"id":1732,"date":"2020-06-24T17:43:58","date_gmt":"2020-06-24T09:43:58","guid":{"rendered":"http:\/\/39.97.231.10\/?p=1732"},"modified":"2020-06-24T17:43:58","modified_gmt":"2020-06-24T09:43:58","slug":"flink-on-zeppelin","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=1732","title":{"rendered":"Flink on Zeppelin\uff08\u4e00\uff09"},"content":{"rendered":"<p>\u4eceZeppelin 0.9\u5f00\u59cb\u5c06\u6b63\u5f0f\u652f\u6301Flink 1.10\u3002Flink\u662f\u4e00\u4e2a\u6279\u6d41\u7edf\u4e00\u7684\u8ba1\u7b97\u5f15\u64ce\uff0c\u672c\u6587\u5c06\u4ece\u7b2c\u4e00\u4e2awordcount\u7684\u4f8b\u5b50\u4e3a\u8d77\u70b9\u6765\u8bb2\u8ff0\u5982\u4f55\u5728Zeppelin\u4e2d\u4f7f\u7528Flink\u3002<br \/>\n<strong>\u51c6\u5907\u5de5\u4f5c<\/strong><br \/>\n\u5728Zeppelin\u4e2d\u9002\u7528Flink\uff0c\u9700\u8981\u4e0b\u8f7d\u6700\u65b0\u7684Zeppelin 0.9.0 \u4ee5\u53ca Flink 1.10 \uff0c\u9664\u4e86\u4e0b\u8f7dFlink\u7684\u6807\u51c6release\uff0c\u5982\u679c\u4f60\u8981\u4f7f\u7528Flink on Yarn\u6a21\u5f0f\u6216\u8005\u8fde\u63a5Hive\uff0c\u90a3\u4e48\u4f60\u8fd8\u9700\u8981\u4e0b\u8f7d\u5176\u4ed6Flink\u7ec4\u4ef6\u3002<br \/>\n<strong>Flink on Yarn \u9700\u8981\u7684\u7ec4\u4ef6\uff1a<\/strong><\/p>\n<ul class=\\\" list-paddingleft-2\\\">\n<li>flink-hadoop-compatibility (https:\/\/repo1.maven.org\/maven2\/org\/apache\/flink\/flink-hadoop-compatibility_2.11\/1.9.1\/flink-hadoop-compatibility_2.11-1.9.1.jar)<\/li>\n<li>flink-shaded-hadoop-2-uber\u00a0 (https:\/\/repo.maven.apache.org\/maven2\/org\/apache\/flink\/flink-shaded-hadoop-2-uber\/2.7.5-7.0\/flink-shaded-hadoop-2-uber-2.7.5-7.0.jar)<\/li>\n<\/ul>\n<p><strong>\u8fde\u63a5Hive\u9700\u8981\u7684\u7ec4\u4ef6\uff1a<\/strong><\/p>\n<ul class=\\\" list-paddingleft-2\\\">\n<li>flink-connector-hive<\/li>\n<li>hive-exec<\/li>\n<\/ul>\n<p><strong>\u4f7f\u7528pyflink\u9700\u8981\u7684\u7ec4\u4ef6<\/strong><\/p>\n<ul class=\\\" list-paddingleft-2\\\">\n<li>flink-python<\/li>\n<\/ul>\n<p>\u8fd9\u662f\u6211\u7684lib\u76ee\u5f55\u4e0b\u7684\u6240\u6709jar (\u4e5f\u53ef\u4ee5\u53c2\u8003Flink\u5b98\u65b9\u6587\u6863\uff0chttps:\/\/ci.apache.org\/projects\/flink\/flink-docs-master\/dev\/table\/hive\/scala_shell_hive.html\uff09<br \/>\n<img class=\\\"rich_pages js_insertlocalimg\\\" src=\\\"https:\/\/notecdn.yiban.io\/cloud_res\/521685660\/imgs\/20-6-24_09:37:03.609_46597.jpeg\\\" \/><br \/>\n<strong>\u914d\u7f6eZeppelin + Flink<\/strong><br \/>\n\u63a5\u4e0b\u6765\u662f\u914d\u7f6eZeppelin\u548cFlink\u3002\u9996\u5148\u89e3\u538b\u7f29Zeppelin\u5305\u4e4b\u540e\uff0ccd\u5230Zeppelin\u76ee\u5f55\u8fd0\u884c\u4e0b\u9762\u8fd0\u884c\u8fd9\u4e2a\u547d\u4ee4\u542f\u52a8Zeppelin<\/p>\n<section>\n<pre class=\\\"code-snippet__js\\\">bin\/zeppelin-daemon.sh\u00a0start<\/pre>\n<\/section>\n<p>\u7136\u540e\u5728\u6d4f\u89c8\u5668\u91cc\u6253\u5f00http:\/\/localhost:8080 \u5c31\u53ef\u4ee5\u770b\u5230 Zeppelin\u9875\u9762\u4e86\u3002<br \/>\n<img class=\\\"rich_pages js_insertlocalimg\\\" src=\\\"https:\/\/notecdn.yiban.io\/cloud_res\/521685660\/imgs\/20-6-24_09:37:03.482_10356.jpeg\\\" \/><br \/>\n\u5c31\u4e0b\u6765\u5c31\u9700\u8981\u914d\u7f6eFlink Interpreter\u3002\u5728Zeppelin\u4e2d\u53ef\u4ee5\u4f7f\u75283\u79cd\u4e0d\u540c\u7684Flink\u96c6\u7fa4\u6a21\u5f0f<\/p>\n<ul class=\\\" list-paddingleft-2\\\">\n<li>Local<\/li>\n<li>Remote<\/li>\n<li>Yarn<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u5c06\u5206\u522b\u8bf4\u660e\u5982\u4f55\u914d\u7f6eFlink Interpreter\u6765\u8fd0\u884c\u8fd93\u79cd\u6a21\u5f0f\u3002<br \/>\n<strong>Local \u6a21\u5f0f<\/strong><br \/>\nFlink\u7684Local\u6a21\u5f0f\u4f1a\u5728\u672c\u5730\u521b\u5efa\u4e00\u4e2aMiniCluster\uff0c\u9002\u5408\u505aPOC\u6216\u8005\u5c0f\u6570\u636e\u91cf\u7684\u8bd5\u9a8c\u3002\u5fc5\u987b\u914d\u7f6eFLINK_HOME \u548c flink.execution.mode<br \/>\n<img class=\\\"rich_pages js_insertlocalimg\\\" src=\\\"https:\/\/notecdn.yiban.io\/cloud_res\/521685660\/imgs\/20-6-24_09:37:03.603_1324.png\\\" \/><br \/>\n<strong>Remote \u6a21\u5f0f<\/strong><br \/>\nFlink\u7684Remote\u6a21\u5f0f\u4f1a\u8fde\u63a5\u4e00\u4e2a\u5df2\u7ecf\u521b\u5efa\u597d\u7684Flink\u96c6\u7fa4\uff0c\u4e00\u822c\u662fFlink standalone\u96c6\u7fa4\u3002\u9664\u4e86\u914d\u7f6eFLINK_HOME \u548c flink.execution.mode\u5916\uff0c\u8fd8\u9700\u8981\u914d\u7f6eflink.execution.remote.host\u548cflink.execution.remote.port\u6765\u6307\u5b9aJobManager\u7684\u5730\u5740\u3002<br \/>\n<img class=\\\"rich_pages js_insertlocalimg\\\" src=\\\"https:\/\/notecdn.yiban.io\/cloud_res\/521685660\/imgs\/20-6-24_09:37:03.598_95335.jpeg\\\" \/><br \/>\n<strong>YARN \u6a21\u5f0f<\/strong><br \/>\nFlink\u7684Yarn\u6a21\u5f0f\u4f1a\u5728Yarn\u96c6\u7fa4\u4e2d\u521b\u5efaFlink Cluster\u3002\u9664\u4e86\u914d\u7f6eFLINK_HOME \u548c flink.execution.mode\u8fd8\u9700\u8981\u914d\u7f6eHADOOP_CONF_DIR\uff0c\u5e76\u4e14\u8981\u786e\u4fddZeppelin\u8fd9\u53f0\u673a\u5668\u53ef\u4ee5\u8bbf\u95ee\u4f60\u7684hadoop\u96c6\u7fa4\u3002<br \/>\n<img class=\\\"rich_pages js_insertlocalimg\\\" src=\\\"https:\/\/notecdn.yiban.io\/cloud_res\/521685660\/imgs\/20-6-24_09:37:03.637_55741.png\\\" \/><br \/>\n<strong>\u9a8c\u8bc1Flink Interpreter<\/strong><br \/>\n\u5b8c\u6210\u4e86\u4e0a\u9762\u7684\u914d\u7f6e\u4e4b\u540e\uff0c\u53ef\u4ee5\u8fd0\u884c\u4e0b\u9762\u7684wordcount\u4ee3\u7801\u6765\u9a8c\u8bc1Flink Interpreter\u662f\u5426\u80fd\u6b63\u5e38\u5de5\u4f5c\u3002<br \/>\n<img class=\\\"rich_pages js_insertlocalimg\\\" src=\\\"https:\/\/notecdn.yiban.io\/cloud_res\/521685660\/imgs\/20-6-24_09:37:03.555_44614.jpeg\\\" \/><br \/>\n\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u4f60\u53ef\u4ee5\u770b\u5230WordCount\u7684\u8f93\u51fa\uff0c\u4ee5\u53ca\u53f3\u4e0a\u89d2\u7684Flink JOB\u94fe\u63a5\uff0c\u70b9\u51fb\u8fd9\u4e2a\u94fe\u63a5\u4f60\u53ef\u4ee5\u770b\u5230Flink Web UI\u4e2d\u5173\u4e8e\u8fd9\u4e2aWordCount Job\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<br \/>\n\u8fd9\u5c31\u662f\u5982\u4f55\u5728Zeppelin\u8fd0\u884cFlink WordCount\u7684\u8fc7\u7a0b\uff0c\u5982\u679c\u6709\u78b0\u5230\u4efb\u4f55\u95ee\u9898\uff0c\u8bf7\u52a0\u5165\u4e0b\u9762\u8fd9\u4e2a\u9489\u9489\u7fa4\u8ba8\u8bba\u3002\u540e\u7eed\u6211\u4eec\u4f1a\u6709\u66f4\u591aTutorial\u7684\u6587\u7ae0\uff0c\u656c\u8bf7\u671f\u5f85\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eceZeppelin 0.9\u5f00\u59cb\u5c06\u6b63\u5f0f\u652f\u6301Flink 1.10\u3002Flink\u662f\u4e00\u4e2a\u6279\u6d41\u7edf\u4e00\u7684\u8ba1\u7b97\u5f15\u64ce\uff0c\u672c\u6587\u5c06\u4ece\u7b2c\u4e00 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=1732\"> <span class=\"screen-reader-text\">Flink on Zeppelin\uff08\u4e00\uff09<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","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":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[131,118],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"\u4eceZeppelin 0.9\u5f00\u59cb\u5c06\u6b63\u5f0f\u652f\u6301Flink 1.10\u3002Flink\u662f\u4e00\u4e2a\u6279\u6d41\u7edf\u4e00\u7684\u8ba1\u7b97\u5f15\u64ce\uff0c\u672c\u6587\u5c06\u4ece\u7b2c\u4e00&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1732"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1732"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/1732\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1732"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}