{"id":1898,"date":"2017-08-30T11:27:19","date_gmt":"2017-08-30T03:27:19","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1898"},"modified":"2017-08-30T11:27:19","modified_gmt":"2017-08-30T03:27:19","slug":"ksql%e6%9e%b6%e6%9e%84%e5%8e%9f%e7%90%86%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1898","title":{"rendered":"KSQL\u67b6\u6784\u539f\u7406\u89e3\u6790"},"content":{"rendered":"<p>\n\tKSQL\u662f\u53ef\u7528\u4e8eApache Kafka\u7684\u6d41\u5f0fSQL\u3002\u6211\u4eec\u5728\u524d\u9762\u5df2\u7ecf\u4ecb\u7ecd\u8fc7\u5b83\u300a<a href=\"https:\/\/www.xttblog.com\/?p=1896\" name=\"Apache Kafka\u7684\u6d41\u5f0fSQL\u5f15\u64ceKSQL\u7b80\u4ecb\" target=\"_blank\" title=\"Apache Kafka\u7684\u6d41\u5f0fSQL\u5f15\u64ceKSQL\u7b80\u4ecb\">Apache Kafka\u7684\u6d41\u5f0fSQL\u5f15\u64ceKSQL\u7b80\u4ecb<\/a>\u300b\u3002\u672c\u6587\u6765\u63a2\u8ba8\u4e00\u4e0b\u5b83\u7684\u76f8\u5173\u67b6\u6784\u8bbe\u8ba1\u548c\u5b9e\u73b0\u539f\u7406\u3002\n<\/p>\n<h2>\n\tKSQL\u7684\u6838\u5fc3<br \/>\n<\/h2>\n<p>\n\tKSQL\u662f\u57fa\u4e8e<a href=\"http:\/\/kafka.apache.org\/\" name=\"Kafka\" target=\"_blank\" title=\"Kafka\">Kafka<\/a>\u7684<a href=\"https:\/\/kafka.apache.org\/documentation\/streams\/\" name=\"Kafka Streams API\" target=\"_blank\" title=\"Kafka Streams API\">Streams API<\/a>\u8fdb\u884c\u6784\u5efa\u7684\uff0c\u6240\u4ee5\u5b83\u7684\u4e24\u4e2a\u6838\u5fc3\u6982\u5ff5\u662f\u6d41\uff08Stream\uff09\u548c\u8868\uff08Table\uff09\u3002\u6d41\u662f\u6ca1\u6709\u8fb9\u754c\u7684\u7ed3\u6784\u5316\u6570\u636e\uff0c\u6570\u636e\u53ef\u4ee5\u88ab\u6e90\u6e90\u4e0d\u65ad\u5730\u6dfb\u52a0\u5230\u6d41\u5f53\u4e2d\uff0c\u4f46\u6d41\u4e2d\u5df2\u6709\u7684\u6570\u636e\u662f\u4e0d\u4f1a\u53d1\u751f\u53d8\u5316\u7684\uff0c\u5373\u4e0d\u4f1a\u88ab\u4fee\u6539\u4e5f\u4e0d\u4f1a\u88ab\u5220\u9664\u3002\u8868\u5c31\u662f\u6d41\u7684\u89c6\u56fe\uff0c\u6216\u8005\u8bf4\u5b83\u4ee3\u8868\u4e86\u53ef\u53d8\u6570\u636e\u7684\u96c6\u5408\u3002\u5b83\u4e0e\u4f20\u7edf\u7684\u6570\u636e\u5e93\u8868\u7c7b\u4f3c\uff0c\u53ea\u4e0d\u8fc7\u5177\u5907\u4e86\u4e00\u4e9b\u6d41\u5f0f\u8bed\u4e49\uff0c\u6bd4\u5982\u65f6\u95f4\u7a97\u53e3\uff0c\u800c\u4e14\u8868\u4e2d\u7684\u6570\u636e\u662f\u53ef\u53d8\u7684\u3002KSQL\u5c06\u6d41\u548c\u8868\u96c6\u6210\u5728\u4e00\u8d77\uff0c\u5141\u8bb8\u5c06\u4ee3\u8868\u5f53\u524d\u72b6\u6001\u7684\u8868\u4e0e\u4ee3\u8868\u5f53\u524d\u53d1\u751f\u4e8b\u4ef6\u7684\u6d41\u8fde\u63a5\u5728\u4e00\u8d77\u3002\n<\/p>\n<h2>\n\tKSQL\u67b6\u6784<br \/>\n<\/h2>\n<p>\n\t<img decoding=\"async\" alt=\"ksql\u67b6\u6784\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/ksql1.png\" style=\"width: 2398px;height: 2314px\" \/>\n<\/p>\n<p>\n\tKSQL\u662f\u4e00\u4e2a\u72ec\u7acb\u8fd0\u884c\u7684\u670d\u52a1\u5668\uff0c\u591a\u4e2aKSQL\u670d\u52a1\u5668\u53ef\u4ee5\u7ec4\u6210\u96c6\u7fa4\uff0c\u53ef\u4ee5\u52a8\u6001\u5730\u6dfb\u52a0\u670d\u52a1\u5668\u5b9e\u4f8b\u3002\u96c6\u7fa4\u5177\u6709\u5bb9\u9519\u673a\u5236\uff0c\u5982\u679c\u4e00\u4e2a\u670d\u52a1\u5668\u5931\u6548\uff0c\u5176\u4ed6\u670d\u52a1\u5668\u5c31\u4f1a\u63a5\u7ba1\u5b83\u7684\u5de5\u4f5c\u3002KSQL\u547d\u4ee4\u884c\u5ba2\u6237\u7aef\u901a\u8fc7REST API\u5411\u96c6\u7fa4\u53d1\u8d77\u67e5\u8be2\u64cd\u4f5c\uff0c\u53ef\u4ee5\u67e5\u770b\u6d41\u548c\u8868\u7684\u4fe1\u606f\u3001\u67e5\u8be2\u6570\u636e\u4ee5\u53ca\u67e5\u770b\u67e5\u8be2\u72b6\u6001\u3002\u56e0\u4e3a\u662f\u57fa\u4e8eStreams API\u6784\u5efa\u7684\uff0c\u6240\u4ee5KSQL\u4e5f\u6cbf\u88ad\u4e86Streams API\u7684\u5f39\u6027\u3001\u72b6\u6001\u7ba1\u7406\u548c\u5bb9\u9519\u80fd\u529b\uff0c\u540c\u65f6\u4e5f\u5177\u5907\u4e86<a href=\"https:\/\/www.confluent.io\/blog\/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it\/\" name=\"Exactly-once Semantics are Possible: Here\u2019s How Kafka Does it\" target=\"_blank\" title=\"Exactly-once Semantics are Possible: Here\u2019s How Kafka Does it\">\u4ec5\u4e00\u6b21\uff08exactly once\uff09<\/a>\u8bed\u4e49\u3002KSQL\u670d\u52a1\u5668\u5185\u5d4c\u4e86\u8fd9\u4e9b\u7279\u6027\uff0c\u5e76\u589e\u52a0\u4e86\u4e00\u4e2a\u5206\u5e03\u5f0fSQL\u5f15\u64ce\u3001\u7528\u4e8e\u63d0\u5347\u67e5\u8be2\u6027\u80fd\u7684\u81ea\u52a8\u5b57\u8282\u7801\u751f\u6210\u673a\u5236\uff0c\u4ee5\u53ca\u7528\u4e8e\u6267\u884c\u67e5\u8be2\u548c\u7ba1\u7406\u7684REST API\u3002\n<\/p>\n<h2>\n\tKafka+KSQL\u98a0\u8986\u4f20\u7edf\u6570\u636e\u5e93<br \/>\n<\/h2>\n<p>\n\t<img decoding=\"async\" alt=\"ksql\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/ksql2.png\" style=\"width: 563px;height: 326px\" \/>\n<\/p>\n<p>\n\t\u4f20\u7edf\u5173\u7cfb\u578b\u6570\u636e\u5e93\u4ee5\u8868\u4e3a\u6838\u5fc3\uff0c\u65e5\u5fd7\u53ea\u4e0d\u8fc7\u662f\u5b9e\u73b0\u624b\u6bb5\u3002\u800c\u5728\u4ee5\u4e8b\u4ef6\u4e3a\u4e2d\u5fc3\u7684\u4e16\u754c\u91cc\uff0c\u60c5\u51b5\u5374\u6070\u597d\u76f8\u53cd\u3002\u65e5\u5fd7\u6210\u4e3a\u4e86\u6838\u5fc3\uff0c\u800c\u8868\u51e0\u4e4e\u662f\u4ee5\u65e5\u5fd7\u4e3a\u57fa\u7840\uff0c\u65b0\u7684\u4e8b\u4ef6\u4e0d\u65ad\u88ab\u6dfb\u52a0\u5230\u65e5\u5fd7\u91cc\uff0c\u8868\u7684\u72b6\u6001\u4e5f\u56e0\u6b64\u53d1\u751f\u53d8\u5316\u3002\u5c06Kafka\u4f5c\u4e3a\u4e2d\u5fc3\u65e5\u5fd7\uff0c\u914d\u7f6eKSQL\u8fd9\u4e2a\u5f15\u64ce\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u521b\u5efa\u51fa\u6211\u4eec\u60f3\u8981\u7684\u7269\u5316\u89c6\u56fe\uff0c\u800c\u4e14\u89c6\u56fe\u4e5f\u4f1a\u6301\u7eed\u4e0d\u65ad\u5730\u5f97\u5230\u66f4\u65b0\u3002\n<\/p>\n<p>\n\tKSQL\u76ee\u524d\u8fd8\u5904\u4e8e<a href=\"https:\/\/github.com\/confluentinc\/ksql\" name=\"ksql\" target=\"_blank\" title=\"ksql\">\u5f00\u53d1\u8005\u9884\u89c8\u9636\u6bb5<\/a>\uff0c\u4f5c\u8005\u8fd8\u5728\u6536\u96c6\u793e\u533a\u7684\u53cd\u9988\u3002\u672a\u6765\u8ba1\u5212\u589e\u52a0\u66f4\u591a\u7684\u7279\u6027\uff0c\u5305\u62ec\u652f\u6301\u66f4\u4e30\u5bcc\u7684SQL\u8bed\u6cd5\uff0c\u8ba9KSQL\u6210\u4e3a\u751f\u4ea7\u5c31\u7eea\u7684\u7cfb\u7edf\u3002\n<\/p>\n<p>\n\t\u53c2\u8003\u8d44\u6599\n<\/p>\n<ul>\n<li>\n\t\t<a href=\"https:\/\/www.confluent.io\/blog\/ksql-open-source-streaming-sql-for-apache-kafka\/\" name=\"Introducing KSQL: Open Source Streaming SQL for Apache Kafka\" target=\"_blank\" title=\"Introducing KSQL: Open Source Streaming SQL for Apache Kafka\">Introducing KSQL: Open Source Streaming SQL for Apache Kafka<\/a>\n\t<\/li>\n<li>\n\t\t<a href=\"https:\/\/www.confluent.io\/blog\/exactly-once-semantics-are-possible-heres-how-apache-kafka-does-it\/\" name=\"Exactly-once Semantics are Possible: Here\u2019s How Kafka Does it\" target=\"_blank\" title=\"Exactly-once Semantics are Possible: Here\u2019s How Kafka Does it\">Exactly-once Semantics are Possible: Here&rsquo;s How Kafka Does it<\/a>\n\t<\/li>\n<\/ul>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1898\">KSQL\u67b6\u6784\u539f\u7406\u89e3\u6790<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>KSQL\u662f\u53ef\u7528\u4e8eApache Kafka\u7684\u6d41\u5f0fSQL\u3002\u6211\u4eec\u5728\u524d\u9762\u5df2\u7ecf\u4ecb\u7ecd\u8fc7\u5b83\u300aApache Kafka\u7684\u6d41\u5f0fS [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[789,1473],"class_list":["post-1898","post","type-post","status-publish","format-standard","hentry","category-sql","tag-kafka","tag-ksql"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1898"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1898\/revisions"}],"predecessor-version":[{"id":1899,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1898\/revisions\/1899"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1898"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}