{"id":1691,"date":"2026-11-10T23:51:58","date_gmt":"2026-11-10T15:51:58","guid":{"rendered":"https:\/\/blog.humh.cn\/?p=1691"},"modified":"2026-11-10T23:51:59","modified_gmt":"2026-11-10T15:51:59","slug":"%e5%a4%a7%e6%95%b0%e6%8d%ae%e5%b9%b3%e5%8f%b0%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/blog.humh.cn\/?p=1691","title":{"rendered":"\u5927\u6570\u636e\u5e73\u53f0\u4ecb\u7ecd"},"content":{"rendered":"\n<h1>\u4e00\u3001\u5e73\u53f01.0\u67b6\u6784<\/h1>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110202133862.png\" target=\"_blank\" rel=\"noopener\"><img width=\"1024\" height=\"859\" class=\"wp-image-1692 lazyload\" title=\"\u5927\u6570\u636e\u5e73\u53f0\u4ecb\u7ecd\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110202133862-1024x859.png\" alt=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110202133862-1024x859.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110202133862-1024x859.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110202133862-300x252.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110202133862-768x644.png 768w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110202133862.png 1268w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><\/a><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110220248175.png\" target=\"_blank\" rel=\"noopener\"><img width=\"1024\" height=\"609\" class=\"wp-image-1695 lazyload\" title=\"\u5927\u6570\u636e\u5e73\u53f0\u4ecb\u7ecd\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110220248175-1024x609.png\" alt=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110220248175-1024x609.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110220248175-1024x609.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110220248175-300x178.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110220248175-768x457.png 768w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110220248175.png 1165w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><\/a><\/figure><\/div>\n\n\n\n<h2>1. \u6570\u636e\u6e90\uff1a<\/h2>\n\n\n\n<p>\u76ee\u524d\u6570\u636e\u6e90\u4e3b\u8981\u6709\u4e24\u7c7b\uff0c\u4e00\u7c7b\u662f<strong>\u65e5\u5fd7\u57cb\u70b9<\/strong>\uff0c\u5305\u62ec\u670d\u52a1\u7aef\u57cb\u70b9\u3001\u5ba2\u6237\u7aef\u57cb\u70b9\u3001H5 \u57cb\u70b9\uff0c\u901a\u8fc7 fluentd \u670d\u52a1\u91c7\u96c6\u843d\u5730\u5230\u96c6\u7fa4\u78c1\u76d8\u4e0a\uff0c\u53e6\u4e00\u7c7b\u662f <strong>mysql binlog<\/strong> \u6570\u636e\uff0c\u901a\u8fc7canal + kafka + fluentd \u843d\u5730\u5230\u78c1\u76d8\u4e0a\uff0c\u7edf\u4e00\u5c06\u6587\u4ef6\u540c\u6b65\u5230\u6570\u636e\u96c6\u7fa4\u4e2d(HDFS)<\/p>\n\n\n\n<h2>2. \u6570\u636e\u5206\u53d1<\/h2>\n\n\n\n<p>\u4e3b\u8981\u662f\u6570\u636e\u6d41\u8f6c\uff0c\u8fd9\u91cc\u6d41\u8f6c\u7684\u76ee\u6807\u4e3b\u8981\u662f\u4e24\u5927\u90e8\u5206\uff0c\u4e00\u90e8\u5206\u662f\u6d41\u8f6c\u5230\u79bb\u7ebf\u6570\u636e\u4ed3\u5e93\u4e2d\uff0c\u4e00\u90e8\u5206\u662f\u6d41\u8f6c\u5230 kafka \u4e2d\uff0c\u540e\u7eed\u4f9b\u5b9e\u65f6\u6d41\u8ba1\u7b97\u3002<\/p>\n\n\n\n<h3>2.1 \u79bb\u7ebf\u4ed3\u5e93<\/h3>\n\n\n\n<h4>\u57cb\u70b9\u65e5\u5fd7<\/h4>\n\n\n\n<p>\u670d\u52a1\u7aef\u4ee3\u7801\u901a\u8fc7 fluent api \u5c06\u539f\u59cb\u57cb\u70b9\u65e5\u5fd7\u4e0a\u62a5\u81f3 fluentd \u4e2d\uff0cfluentd \u518d\u5c06\u91c7\u96c6\u6570\u636e\u76f4\u63a5\u843d\u5230\u670d\u52a1\u5668\u78c1\u76d8\u4e0a\u3002<\/p>\n\n\n\n<p><span class=\"has-inline-color has-luminous-vivid-orange-color\"><strong>\u7279\u522b\u8bf4\u660e<\/strong><\/span>\uff1a<\/p>\n\n\n\n<p>\u6211\u4eec\u5c01\u88c5\u4e86\u4e24\u5c42 fluentd\uff0c\u7b2c\u4e00\u5c42 fluentd \u505a forward \u96c6\u7fa4\uff0c\u7b2c\u4e8c\u5c42 fluentd \u4e3a\u591a\u53f0\u673a\u5668\u591a\u53f0\u8282\u70b9\u5404\u81ea\u72ec\u7acb\u3002\u670d\u52a1\u7aef\u662f\u5148\u5c06\u57cb\u70b9\u65e5\u5fd7\u4e0a\u62a5\u81f3 forward \u96c6\u7fa4\u4e0a\uff0cforward \u96c6\u7fa4\u518d\u6839\u636e\u914d\u7f6e\u7684\u4e0d\u540c match \u89c4\u5219\u6309\u4e1a\u52a1\u57df\u533a\u5206\uff0c\u5206\u522b\u5c06\u6570\u636e\u8f6c\u53d1\u81f3\u7b2c\u4e8c\u5c42 fluentd \u5373\u4e0d\u540c\u673a\u5668\u8282\u70b9\u4e0a\u7684 fluentd\u3002\u914d\u7f6e\u7c7b\u4f3c\u5982<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;match cv.product.access.api>\n  @type forward\n  &lt;server>\n    host 10.111.1.x\n    port 24224\n  &lt;\/server>\n  &lt;buffer>\n    flush_interval 3\n  &lt;\/buffer>\n&lt;\/match>\n\n&lt;match cv.*.report.mockrobot>\n  @type forward\n  &lt;server>\n    host 10.111.1.y\n    port 24224\n  &lt;\/server>\n  &lt;buffer>\n    flush_interval 3\n  &lt;\/buffer>\n&lt;\/match>\n\n...<\/pre>\n\n\n\n<p>\u8fd9\u4e48\u505a\u6709\u4e24\u4e2a\u597d\u5904\uff1a<\/p>\n\n\n\n<ul><li>\u7b2c\u4e00\u5c42 forward \u53ef\u505a\u6570\u636e\u7f13\u51b2\uff0c\u5bf9\u4e8e\u670d\u52a1\u7aef\u5373 fluentd \u5ba2\u6237\u7aef\u80fd\u505a\u5230\u6570\u636e\u63a5\u6536\u5165\u53e3\u7684\u7edf\u4e00\uff1b<\/li><li>\u7b2c\u4e8c\u5c42\u6309\u591a\u79cd\u4e0d\u540c\u4e1a\u52a1\u57df\u90e8\u7f72\u591a\u4e2a fluentd \u5230\u4e0d\u540c\u7684\u673a\u5668\u8282\u70b9\u4e0a\uff0c\u4e1a\u52a1\u57df\u6570\u636e\u7269\u7406\u72ec\u7acb\u4e14\u6570\u636e\u843d\u5730\u78c1\u76d8\u538b\u529b\u88ab\u5927\u5927\u964d\u4f4e\uff1b<\/li><\/ul>\n\n\n\n<h4>MySQL\u6570\u636e<\/h4>\n\n\n\n<p>mysql \u7684 binlog \u6570\u636e\u662f\u901a\u8fc7 canal \u670d\u52a1\u91c7\u96c6 binlog \u4f1a\u4f20\u5165\u5230 kafka \u4e2d\uff0c\u518d\u901a\u8fc7 fluentd \u8bfb\u53d6 kafka \u4e2d\u7684 binlog \u6570\u636e\u843d\u5230\u670d\u52a1\u5668\uff0c<span class=\"has-inline-color has-luminous-vivid-orange-color\">binlog -> canal -> kafka -> fluentd -> \u78c1\u76d8<\/span>\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># canal.properties \u4e2d\u6570\u636e\u4e0b\u53d1 kafka \u90e8\u5206\u914d\u7f6e\ncanal.mq.servers=kafka-cluster-kafka-bootstrap.kafka-cluster:9092\ncanal.mq.acks=1\ncanal.mq.retries=0\ncanal.mq.partitionsNum=3\ncanal.mq.partitionHash=.*\\\\..*:$pk$<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># fluentd-consumer.properties \u4e2d kafka \u6570\u636e\u62c9\u53d6\u90e8\u5206\u914d\u7f6e\nfluentd.connect=10.111.1.x:26224\n\nfluentd.tag.prefix=kafka.\n\nfluentd.consumer.topics=binlog-.*\n\nfluentd.consumer.threads=2\n\nfluentd.consumer.backup.dir=\/tmp\/fluentd-consumer-backup\/\n\nfluentd.consumer.from.beginning=true\n\nzookeeper.connect=10.111.1.x:2181,10.111.1.y:2181,10.111.1.z:2181\ngroup.id=binlog-master-fluentd-consumer-group\nzookeeper.session.timeout.ms=400\nzookeeper.sync.time.ms=200\nauto.commit.interval.ms=1000\nauto.offset.reset=smallest<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u8fd8\u9700\u8981\u642d\u914d Kafka \u4fa7\u7684 Connect \u4e0e Connector \u7ec4\u4ef6\u670d\u52a1\uff08Kafka Connect \u662f\u4e00\u79cd\u7528\u4e8e\u5728 Apache Kafka \u548c\u5916\u90e8\u7cfb\u7edf\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u7684\u5de5\u5177\uff09\u3002<\/p>\n\n\n\n<p>\u6240\u6709\u7ecf fluentd \u6253\u5305\u5e76\u843d\u5730\u78c1\u76d8\u7684\u6570\u636e\uff0c\u540e\u7eed\u7edf\u4e00\u901a\u8fc7\u811a\u672c\u540c\u6b65\u5230\u6570\u4ed3\u4e2d\uff08\u5982\u901a\u8fc7 ossutil \u5c06\u6570\u636e\u5305\u4e0a\u4f20\u6307\u5b9a OSS  bucket\uff0c\u7136\u540e\u518d\u540c\u6b65 COS\uff0cHDFS \u7ed1\u5b9a\u4e86 COS bucket\uff09\u3002<\/p>\n\n\n\n<p>spark \u76f4\u63a5\u62bd\u53d6\u8868\u6570\u636e\u7684\u90e8\u5206\uff08\u5982 read.jdbc\uff09\u4e0d\u5c5e\u4e8e\u6570\u636e\u5206\u53d1\uff0c\u53ef\u5ffd\u7565\u3002<\/p>\n\n\n\n<h3>2.2 \u5b9e\u65f6\u6d41\u5904\u7406<\/h3>\n\n\n\n<h4>\u57cb\u70b9\u65e5\u5fd7<\/h4>\n\n\n\n<p>\u57cb\u70b9\u65e5\u5fd7\u901a\u8fc7 fluentd \u843d\u5230\u78c1\u76d8\u540e\uff0c\u501f\u52a9 filebeat \u670d\u52a1 \u8bfb\u53d6 fluentd \u7684 link \u6587\u4ef6 \u5c06\u6570\u636e\u4f20\u5165\u5230 kafka\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\u670d\u52a1\u7aef (Fluent API)\n  \u2192 \u7b2c\u4e00\u5c42 forward (fluentd-forward\/fluent.conf, @type forward)\n  \u2192 \u7b2c\u4e8c\u5c42 aggregator (cvhosts\/10.111.1.x\/fluentdv1.3\/etc\/conf.d\/td.conf)\n       @type file + symlink_path \u2192 \u5199\u6eda\u52a8\u6587\u4ef6 + \u751f\u6210 .link \u7b26\u53f7\u94fe\u63a5\n  \u2192 filebeat (tail .link \u6587\u4ef6)\n  \u2192 Kafka topic: report-*<\/pre>\n\n\n\n<p>forward \u540e\u7684\u7b2c\u4e8c\u5c42 fluentd \u7c7b\u4f3c\u914d\u7f6e\u7c7b\u4f3c\u5982\u4e0b\uff0c\u6301\u7eed\u5c06\u6570\u636e\u5199\u5165\u81f3\u94fe\u63a5\u6587\u4ef6\u4e2d<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;match cv.{product,None}.report.video>\n  @type file\n  @id report_video\n  path report_video.log.*.log      # \u5b9e\u9645\u6eda\u52a8\u7684 chunk \u6587\u4ef6\n  compress gzip\n  symlink_path report_video.link   # \u2605 \u5173\u952e\uff1a\u59cb\u7ec8\u6307\u5411\u6700\u65b0 chunk \u6587\u4ef6\u7684\u7b26\u53f7\u94fe\u63a5\n  &lt;buffer>\n    chunk_limit_size 512m\n    flush_at_shutdown true\n  &lt;\/buffer>\n&lt;\/match><\/pre>\n\n\n\n<p><code>symlink_path<\/code> \u7684\u5de5\u4f5c\u65b9\u5f0f\uff1afile \u63d2\u4ef6\u6bcf\u6b21 flush \u51fa\u4e00\u4e2a\u65b0\u7684 chunk \u6587\u4ef6\uff08<code>report_video.log.&lt;\u65f6\u95f4\u6233>.&lt;hash>.log.gz<\/code>\uff09\u540e\uff0c\u4f1a<strong>\u539f\u5b50\u5730\u66f4\u65b0\u8fd9\u4e2a\u7b26\u53f7\u94fe\u63a5<\/strong>\u6307\u5411\u6700\u65b0\u6587\u4ef6\u3002\u8fd9\u6837 filebeat \u53ea\u9700\u8981\u76ef\u4f4f\u4e00\u4e2a\u56fa\u5b9a\u8def\u5f84 <code>report_video.link<\/code>\uff0c\u5c31\u80fd\u8fde\u7eed\u8bfb\u5230\u6240\u6709\u6570\u636e\u3002\u8fd9\u5c31\u662f fluentd \u2192 filebeat \u7684\u6807\u51c6\u5bf9\u63a5\u65b9\u5f0f\uff08\u5b98\u65b9\u6587\u6863\u91cc <code>symlink_path<\/code> \u7684\u8bbe\u8ba1\u7528\u9014\u5c31\u662f &#8220;hook up with tail-like programs&#8221;\uff09\u3002<\/p>\n\n\n\n<p>filebeat \u4fa7\u7c7b\u4f3c\u914d\u7f6e\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">filebeat.inputs:\n- type: log\n  paths:\n  - \/logs\/report_video.link    # \u76ef\u4f4f fluentd \u751f\u6210\u7684 symlink\n  symlinks: true               # \u5141\u8bb8\u8ddf\u968f\u7b26\u53f7\u94fe\u63a5\n  tail_files: true             # \u542f\u52a8\u65f6\u4ece\u6587\u4ef6\u672b\u5c3e\u5f00\u59cb\uff0c\u4e0d\u91cd\u8bfb\u5386\u53f2\n  processors:\n  - dissect:                   # \u6309\u5236\u8868\u7b26\u5207\u5f00 fluentd \u9ed8\u8ba4\u7684 out_file \u884c\u683c\u5f0f\n      tokenizer: \"%{time}\\t%{tag}\\t{%{record}\"\n      target_prefix: \"log\"\noutput.kafka:\n  hosts: [\"kafka-cluster-kafka-brokers.kafka-cluster:9092\"]\n  topic: 'report-video'\n  version: 1.1.0\n  required_acks: 1\n  client_id: beat_report_video\n  codec.format:                # \u628a\u5207\u5f00\u7684\u5b57\u6bb5\u91cd\u65b0\u62fc\u6210\u5408\u6cd5 JSON \u53d1\u51fa\u53bb\n    string: '{\"timestamp\":\"%{[log.time]}\",%{[log.record]}'\n<\/pre>\n\n\n\n<p>\u5176\u5b9e\u65e9\u671f\u5e76\u6ca1\u6709\u989d\u5916\u5f15\u5165 filebeat\uff0c\u800c\u662f fluentd \u76f4\u63a5\u5230 kafka\uff0cfluentd \u4e2d\u7c7b\u4f3c\u914d\u7f6e\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># fluentd \u4e2d\u90e8\u5206\u914d\u7f6e\n@type kafka_buffered\nbrokers kafka-host:9092\ndefault_topic report-video\nflush_interval 3s\nretry_limit 1\nbuffer_type file\nbuffer_path \/data5\/logs\/cv\/report_video.log.kafka<\/pre>\n\n\n\n<p><code>kafka_buffered<\/code>\uff1a\u8001\u7248\u672c <code>fluent-plugin-kafka<\/code>\uff080.x \u65f6\u4ee3\uff09\u7684\u8f93\u51fa\u63d2\u4ef6\uff0c\u81ea\u5e26\u6301\u4e45\u5316 buffer\u3002\u73b0\u5728\u5df2\u5e9f\u5f03\uff0c\u65b0\u7248\u63d2\u4ef6\u91cc\u7edf\u4e00\u53eb <code>kafka2<\/code>\uff08<code>kafka_buffered<\/code> \u7684\u53c2\u6570\u5b83\u5168\u517c\u5bb9\uff09\u3002<\/p>\n\n\n\n<ul><li>\u4f18\u70b9\uff1a\u94fe\u8def\u77ed\uff0c\u5c11\u8df3\u4e00\u7ec4\u4ef6\uff1bfluentd kafka \u63d2\u4ef6\u81ea\u5e26 buffer\u3001\u91cd\u8bd5\u3001ack \u63a7\u5236\uff1b<\/li><li>\u7f3a\u70b9\uff1afluentd \u76f4\u63a5\u9762\u5bf9 Kafka \u53ef\u7528\u6027\u65f6\u8981\u6709\u8db3\u591f\u5927\u7684 buffer\uff08\u78c1\u76d8 buffer\uff09\u9632\u6b62 Kafka \u6296\u52a8\u4e22\u6570\u636e\u3002<\/li><\/ul>\n\n\n\n<p>\u800c filebeat \u6709\u5b8c\u5584\u7684 registry\/\u65ad\u70b9\u7eed\u4f20\uff0c\u8fdb\u7a0b\u6302\u4e86\u91cd\u542f\u4e0d\u4e22\u5df2\u843d\u76d8\u7684\u65e5\u5fd7\uff0c\u540c\u65f6 fluentd \u548c Kafka \u89e3\u8026\u3002\u5c3d\u7ba1\u591a\u4e00\u4e2a\u7ec4\u4ef6\u8fd0\u7ef4\u4e14\u591a\u4e00\u6b21\u78c1\u76d8 I\/O\uff0c\u4f46\u53ef\u5ffd\u7565\u4e0d\u8ba1\u3002<\/p>\n\n\n\n<h4>MySQL\u6570\u636e<\/h4>\n\n\n\n<p>binlog \u5219\u901a\u8fc7 canal \u76f4\u63a5\u51fa\u5165\u5230 kafka \u4e2d\u00a0 \u540e\u7eed\u7edf\u4e00\u901a\u8fc7 kafka \u8fdb\u884c\u5b9e\u65f6\u6d41\u5f0f\u8ba1\u7b97\u3002<\/p>\n\n\n\n<h2>3. \u6570\u636e\u5904\u7406<\/h2>\n\n\n\n<p>\u4e3b\u8981\u4e24\u90e8\u5206\uff1a \u79bb\u7ebf\u6570\u4ed3+\u5b9e\u65f6\u6d41<\/p>\n\n\n\n<p>\u79bb\u7ebf\u6570\u4ed3\uff1a\u6784\u5efa\u6570\u636e\u4ed3\u5e93\uff0c\u4e3b\u8981\u4f7f\u7528 Spark DataFrame\u3001Hive SQL \u8fdb\u884c ETL \u6e05\u6d17\uff0c\u6570\u636e\u4fdd\u5b58\u5230 EMR \u96c6\u7fa4\u4e2d<\/p>\n\n\n\n<p>\u5b9e\u65f6\u6d41\uff1a\u4e3b\u8981\u4f7f\u7528 KafkaStream \u8fdb\u884c Kafka \u6d41\u7684\u5904\u7406\u3002<\/p>\n\n\n\n<h2>4. \u6570\u636e\u5b58\u50a8<\/h2>\n\n\n\n<p>\u5904\u7406\u540e\u7684\u6570\u636e\u4e3b\u8981\u4fdd\u5b58\u5728 HDFS \u4e0a\u4e2a\u522b\u5e94\u7528\u6570\u636e\u4f1a\u56de\u5199\u7ed9\u4e1a\u52a1\uff0c\u4fdd\u5b58\u5230 Redis \u6216\u8005\u6570\u636e\u5e93\u4e2d\uff0c \u90e8\u5206\u8fd8\u4f1a\u4fdd\u5b58\u5728 ES \u4e2d\uff0c\u4e00\u4e9b\u6307\u6807\u6570\u636e\u4f1a\u5199\u5165Influxdb \u4e2d\uff0c\u901a\u8fc7 Grafana \u8fdb\u884c\u5c55\u793a\u3002<\/p>\n\n\n\n<p>\u540e\u7aef\u7cfb\u7edf\u90e8\u7f72\u5728\u963f\u91cc\u4e91\u5185\uff0c\u4f46\u6570\u636e\u5e73\u53f0\u56e0\u4e3a\u65e9\u671f\u6570\u636e\u5e73\u53f0\u56e0\u6210\u672c\u7b49\u591a\u56e0\u7d20\u8003\u8651\u90e8\u7f72\u5728\u817e\u8baf\u4e91\u4fa7\uff0c\u6240\u4ee5\u5c24\u5176\u79bb\u7ebf\u6570\u636e\u5728\u94fe\u8def\u672b\u7aef\u5148\u662f\u5b58\u4e8e OSS \u4e0a\uff0c\u518d\u901a\u8fc7\u5b9a\u5236\u5316\u811a\u672c\u548c\u670d\u52a1\u540c\u6b65\u81f3 COS \u4e0a\uff0c\u6700\u7ec8\u96c6\u6210\u6302\u8f7d\u4e8e HDFS \u4e2d\u3002<\/p>\n\n\n\n<h2>5. \u7ec4\u4ef6<\/h2>\n\n\n\n<ul><li>HDFS + Yarn + Spark + Hive<\/li><li>Airflow\uff1aDAG ELT\u6570\u636e\u6e05\u6d17\u4efb\u52a1\u8c03\u5ea6\u7cfb\u7edf<\/li><li>Hue<\/li><li>Zeppelin\uff1a\u65e5\u5e38\u4e3b\u8981\u7684\u770b\u677f\u4e0e\u6570\u636e\u67e5\u8be2\u5e73\u53f0\uff0c\u4e3b\u8981\u9488\u5bf9\u79bb\u7ebf\u6570\u636e\uff0c\u63d0\u4f9b\u7ed9\u8fd0\u8425\u3001\u4ea7\u54c1\u3001\u6570\u636e\u5206\u6790\u5e08\u7b49\u591a\u65b9\u4eba\u5458\u3002<\/li><li>Ranger\uff1a\u6ca1\u6709\u4f7f\u7528\u81ea\u5efa\u00a0ldap\uff0chdfs\u00a0\u4e0e\u00a0zeppelin\u00a0\u4f7f\u7528\u4e86\u00a0ranger\u00a0\u8fdb\u884c\u6743\u9650\u63a7\u5236<\/li><li>Knox\uff1a\u5b89\u5168\u53cd\u5411\u4ee3\u7406\u4e0e API \u7f51\u5173\u7cfb\u7edf<\/li><li>Grafana\uff1a\u65e5\u5e38\u5b9e\u65f6\u6570\u636e\u5927\u76d8\u4e0e\u7ec4\u4ef6\u670d\u52a1\u76d1\u63a7<\/li><\/ul>\n\n\n\n<h1>\u4e8c\u3001\u5e73\u53f0\u8fc1\u79fb\u4e0e\u6f14\u8fdb<\/h1>\n\n\n\n<p>\u540e\u6765\u7ecf\u6574\u4f53\u8003\u91cf\u5c06\u817e\u8baf\u4e91 EMR \u8fc1\u79fb\u963f\u91cc\u4e91 EMR\uff0c\u6df1\u5ea6\u4f7f\u7528\u4e86\u963f\u91cc\u4e91 EMR \u4ea7\u54c1\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u6570\u636e\u5b58\u50a8\u6765\u8bf4\uff0c\u963f\u91cc\u4e91 EMR HDFS \u4e2d\u76f4\u63a5\u6302\u8f7d OSS\uff0c\u6570\u636e\u65e0\u9700\u518d\u540c\u6b65\u817e\u8baf\u4e91 COS\u3002<\/p>\n\n\n\n<h2>1. \u6570\u636e\u5206\u53d1<\/h2>\n\n\n\n<p>\u56e0\u4e3a\u67d0\u4e9b\u5951\u673a\u6211\u4eec\u820d\u5f03\u4e86 Kakfa\uff0c\u6539\u7531\u963f\u91cc\u4e91 SLS \u4ee3\u66ff\uff0c\u4e5f\u5b8c\u5168\u5e9f\u5f03\u4e86 fluentd\u3002<\/p>\n\n\n\n<p>\u540e\u7aef\u76f4\u63a5\u901a\u8fc7 SLS api \u4e0a\u62a5\u57cb\u70b9\u65e5\u5fd7\u81f3 SLS \u4e2d\uff0cMySQL binlog \u4e5f\u7531 canal \u91c7\u96c6\u6539\u4e3a logtail\uff0c\u5c06 canal\u2192 kafka\u00a0\u2192 fluentd \u2192 oss \u2192 cos \u6536\u96c6\u94fe\u8def\u66ff\u6362\u4e3a logtail\u2192 sls\u00a0\u2192 flink \u2192 oss\u3002<\/p>\n\n\n\n<p>\u79bb\u7ebf\u6570\u4ed3 OSS \u6570\u636e\u7531 Flink \u6d88\u8d39 SLS \u843d\u5730\u3002<\/p>\n\n\n\n<h2>2. \u6570\u636e\u5904\u7406<\/h2>\n\n\n\n<p>\u79bb\u7ebf\u6570\u636e\u6e05\u6d17\uff0c\u539f\u5148\u5927\u91cf\u7684 Spark Scala \u5b9e\u73b0\u6539\u4e3a Spark SQL \u6216 Hive SQL \u7684\u65b9\u5f0f\u3002<\/p>\n\n\n\n<p>\u5b9e\u65f6\u6d41\u8ba1\u7b97\u6539\u4e3a Flink + SLS Stream\uff1a<\/p>\n\n\n\n<ul><li>\u7edd\u5927\u90e8\u5206\u5b9e\u65f6\u6570\u636e\u6e05\u6d17\u7531 Flink \u76f4\u63a5\u5b8c\u6210<\/li><li>\u76d1\u7ba1\u6570\u636e\u5b9e\u65f6\u4e0a\u62a5\u7f51\u8b66\u56e0\u4e3a\u6d89\u53ca\u591a\u7ec4\u4ef6\u4ea4\u4e92\uff08\u5982 FTP\uff09\u3001\u903b\u8f91\u590d\u6742\uff08\u9700\u8981 Shell \u811a\u672c\u6267\u884c\uff09\u4e14\u76d1\u63a7\u544a\u8b66\u7b49\uff0c\u6545\u65e0\u6cd5 Flink \u5b8c\u6210\uff0c\u6545\u7531\u539f\u5148 Kafka Stream \u6539\u4e3a SLS Stream\uff0c\u91c7\u7528 SLS \u539f\u751f SDK <code>loghub-client<\/code> \u5b8c\u6210\uff0c\u8fd9\u6837\u8fc1\u79fb\u518d\u5f00\u53d1\u5de5\u4f5c\u91cf\u5927\u5927\u51cf\u5c11\u3002<\/li><\/ul>\n\n\n\n<p>\u5b9e\u65f6\u6570\u636e\u67e5\u8be2\u5f15\u5165\u4e86 Hologress \u7684\u652f\u6301\uff0c\u65e5\u5e38\u5f00\u53d1 HoloWeb \u6216\u5176\u4ed6 BI \u5de5\u5177\u76f4\u63a5\u67e5\u8be2\uff0c\u4e5f\u589e\u52a0\u4e86\u5176\u4ed6\u7aef\u53e3\u7684\u652f\u6301\uff0c\u5982\uff1a<\/p>\n\n\n\n<ul><li>\u516c\u53f8\u4f01\u4e1a\u540e\u53f0\u63d0\u4ea4\u56fa\u5b9a\u4e1a\u52a1\u7684\u67e5\u8be2\u8bf7\u6c42\uff08\u56fa\u5b9aSQL\uff09\uff0c\u5bf9\u5e94\u540e\u7aef\u63a5\u53e3\u5185 Holo JDBC \u67e5\u8be2\uff1b<\/li><li>Zeppelin Holo \u89e3\u91ca\u5668\u67e5\u8be2\uff0c\u63d0\u4f9b\u7ed9\u8fd0\u8425\u4ea7\u54c1\u5c97\u5bf9\u699c\u5355\u4e1a\u52a1\u6570\u636e\u7684\u5b9e\u65f6\u83b7\u53d6\u3002<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"203\" class=\"wp-image-1697 lazyload\" title=\"\u5927\u6570\u636e\u5e73\u53f0\u4ecb\u7ecd\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110234523739-1024x203.png\" alt=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110234523739-1024x203.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110234523739-1024x203.png 1024w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110234523739-300x59.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110234523739-768x152.png 768w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110234523739-1536x305.png 1536w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2026\/11\/20261110234523739-2048x406.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"><\/figure>\n\n\n\n<h2>3. \u7ec4\u4ef6<\/h2>\n\n\n\n<ul><li>\u5e9f\u5f03\u4e86 Ranger\uff0c\u6539\u4e3a LDAP \u96c6\u6210\uff1b<\/li><li>\u539f\u5148 Zeppelin \u505a\u4e3a\u5bf9\u8fd0\u8425\u3001\u4ea7\u54c1\u7b49\u975e\u5f00\u53d1\u5c97\u7684\u4e3b\u8981\u6570\u636e\u67e5\u8be2\u5c55\u793a\u5e73\u53f0\u5916\uff0c\u8fd8\u5f15\u5165\u4e86 Superset \u642d\u914d\u4f7f\u7528\uff1b<\/li><li>Airflow \u8c03\u5ea6\u5148\u662f\u8fc1\u79fb\u5230\u4e86\u963f\u91cc\u4e91 <strong><s>\u6570\u636e\u5f00\u53d1\u63a7\u5236\u53f0<\/s><\/strong> \u7cfb\u7edf\u4e2d\uff0c\u56e0 2025 \u5e74\u5f00\u59cb\u4e0b\u7ebf\uff0c\u540e\u8fc1\u79fb\u5230\u963f\u91cc\u4e91 Workflow \u4e0a\uff08EMR Workflow\u662f\u4e00\u4e2a\u5168\u6258\u7ba1\u7684\u5de5\u4f5c\u6d41\u548c\u4efb\u52a1\u8c03\u5ea6\u670d\u52a1\uff0c100%\u517c\u5bb9\u5f00\u6e90Apache DolphinScheduler \u6d77\u8c5a\u8c03\u5ea6\uff09\uff1b<\/li><\/ul>\n\n\n\n<h2>4. \u6570\u4ed3\u89c4\u8303<\/h2>\n\n\n\n<p>\u79bb\u7ebf\u6570\u4ed3\u5206\u5c42\u7ed3\u6784\u8fdb\u884c\u91cd\u6784\uff0c\u5c06\u539f\u5148 idl\u3001cdl\u3001adl \u7b49\u5206\u5c42\u6539\u4e3a\u4e86 ods\u3001dim\u3001dwd\u3001dws\u3001ads \u7684\u7ed3\u6784\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5e73\u53f01.0\u67b6\u6784 1. \u6570\u636e\u6e90\uff1a \u76ee\u524d\u6570\u636e\u6e90\u4e3b\u8981\u6709\u4e24\u7c7b\uff0c\u4e00\u7c7b\u662f\u65e5\u5fd7\u57cb\u70b9\uff0c\u5305\u62ec\u670d\u52a1\u7aef\u57cb\u70b9\u3001\u5ba2\u6237\u7aef\u57cb\u70b9\u3001H5 \u57cb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[129,10],"tags":[136,120,130,122],"_links":{"self":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/1691"}],"collection":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1691"}],"version-history":[{"count":3,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/1691\/revisions"}],"predecessor-version":[{"id":1698,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/1691\/revisions\/1698"}],"wp:attachment":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}