{"id":32559,"date":"2025-04-24T20:17:42","date_gmt":"2025-04-24T12:17:42","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/32559.html"},"modified":"2025-04-24T20:17:42","modified_gmt":"2025-04-24T12:17:42","slug":"spark-streaming","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/32559.html","title":{"rendered":"Spark-Streaming"},"content":{"rendered":"<h2 style=\"text-align:justify\">Spark-Streaming\u6982\u8ff0<\/h2>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">Spark Streaming \u7528\u4e8e\u6d41\u5f0f\u6570\u636e\u7684\u5904\u7406<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">Spark Streaming \u652f\u6301\u7684\u6570\u636e\u8f93\u5165\u6e90\u5f88\u591a&#xff0c;\u4f8b\u5982&#xff1a;Kafka\u3001Flume\u3001Twitter\u7b49&#xff0c;\u4ee5\u53ca\u548c\u7b80\u5355\u7684 TCP \u5957\u63a5\u5b57\u7b49\u7b49<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6570\u636e\u8f93\u5165\u540e\u53ef\u4ee5\u7528 Spark \u7684\u9ad8\u5ea6\u62bd\u8c61\u539f\u8bed\u5982&#xff1a;map\u3001reduce\u3001join\u3001window \u7b49\u8fdb\u884c\u8fd0\u7b97\u3002\u800c\u7ed3\u679c\u4e5f\u80fd\u4fdd\u5b58\u5728\u5f88\u591a\u5730\u65b9&#xff0c;\u5982 HDFS&#xff0c;\u6570\u636e\u5e93\u7b49<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"152\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121739-680a2be3387f6.png\" width=\"533\" \/><\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u548c\u00a0Spark \u57fa\u4e8e RDD \u7684\u6982\u5ff5\u5f88\u76f8\u4f3c&#xff0c;Spark Streaming \u4f7f\u7528\u79bb\u6563\u5316\u6d41(discretized stream)\u4f5c\u4e3a\u62bd\u8c61\u8868\u793a&#xff0c;\u53eb\u4f5c\u00a0DStream<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">DStream \u662f\u968f\u65f6\u95f4\u63a8\u79fb\u800c\u6536\u5230\u7684\u6570\u636e\u7684\u5e8f\u5217<\/p>\n<h3 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">Spark-Streaming\u7684\u7279\u70b9<\/h3>\n<li>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6613\u7528\u6027&#xff1a;Spark Streaming\u652f\u6301Java\u3001Python\u3001Scala\u7b49\u7f16\u7a0b\u8bed\u8a00&#xff0c;\u53ef\u4ee5\u50cf\u7f16\u5199\u79bb\u7ebf\u7a0b\u5e8f\u4e00\u6837\u7f16\u5199\u5b9e\u65f6\u8ba1\u7b97\u7684\u7a0b\u5e8f<\/p>\n<\/li>\n<li>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bb9\u9519&#xff1a;Spark Streaming\u5728\u6ca1\u6709\u989d\u5916\u4ee3\u7801\u548c\u914d\u7f6e\u7684\u60c5\u51b5\u4e0b&#xff0c;\u53ef\u4ee5\u6062\u590d\u4e22\u5931\u7684\u6570\u636e\u3002\u5bf9\u4e8e\u5b9e\u65f6\u8ba1\u7b97\u6765\u8bf4&#xff0c;\u5bb9\u9519\u6027\u81f3\u5173\u91cd\u8981<\/p>\n<\/li>\n<li>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6613\u6574\u5408&#xff1a;Spark Streaming\u53ef\u4ee5\u5728Spark\u4e0a\u8fd0\u884c&#xff0c;\u5e76\u4e14\u8fd8\u5141\u8bb8\u91cd\u590d\u4f7f\u7528\u76f8\u540c\u7684\u4ee3\u7801\u8fdb\u884c\u6279\u5904\u7406\u3002\u4e5f\u5c31\u662f\u8bf4&#xff0c;\u5b9e\u65f6\u5904\u7406\u53ef\u4ee5\u4e0e\u79bb\u7ebf\u5904\u7406\u76f8\u7ed3\u5408&#xff0c;\u5b9e\u73b0\u4ea4\u4e92\u5f0f\u7684\u67e5\u8be2\u64cd\u4f5c<\/p>\n<\/li>\n<h3 style=\"text-align:justify\">Spark-Streaming\u67b6\u6784<\/h3>\n<p>\u67b6\u6784\u56fe&#xff1a;<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"196\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121739-680a2be35e8e5.png\" width=\"399\" \/><\/p>\n<\/p>\n<h3 style=\"text-align:justify\">DStream\u5b9e\u64cd<\/h3>\n<p>\u5b9e\u4f8b&#xff1a;<\/p>\n<p>\u4f7f\u7528\u00a0netcat \u5de5\u5177\u5411 9999 \u7aef\u53e3\u4e0d\u65ad\u7684\u53d1\u9001\u6570\u636e&#xff0c;\u901a\u8fc7 SparkStreaming \u8bfb\u53d6\u7aef\u53e3\u6570\u636e\u5e76\u7edf\u8ba1\u4e0d\u540c\u5355\u8bcd\u51fa\u73b0\u7684\u6b21\u6570<\/p>\n<p>\u6dfb\u52a0<span style=\"color:#000000\">spark-streaming\u7684\u4f9d\u8d56<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"118\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121739-680a2be389605.png\" width=\"407\" \/><\/p>\n<p>\u4ee3\u7801&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"396\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121739-680a2be3b035b.png\" width=\"517\" \/><\/p>\n<p>\u5728\u865a\u62df\u673a\u542f\u52a8netcat\u5e76\u53d1\u9001\u6570\u636e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"101\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121739-680a2be3e3390.png\" width=\"353\" \/><\/p>\n<p>\u8fd0\u884c\u7ed3\u679c&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"174\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121740-680a2be416537.png\" width=\"407\" \/><\/p>\n<p style=\"margin-left:18.0000pt\">\u6848\u4f8b\u89e3\u6790&#xff1a;<\/p>\n<p style=\"margin-left:18.0000pt\">Discretized Stream \u662f Spark Streaming \u7684\u57fa\u7840\u62bd\u8c61&#xff0c;\u4ee3\u8868\u6301\u7eed\u6027\u7684\u6570\u636e\u6d41\u548c\u7ecf\u8fc7\u5404\u79cd Spark \u539f\u8bed\u64cd\u4f5c\u540e\u7684\u7ed3\u679c\u6570\u636e\u6d41\u3002\u5728\u5185\u90e8\u5b9e\u73b0\u4e0a&#xff0c;DStream \u662f\u4e00\u7cfb\u5217\u8fde\u7eed\u7684 RDD \u6765\u8868\u793a\u3002\u6bcf\u4e2a RDD \u542b\u6709 \u4e00\u6bb5\u65f6\u95f4\u95f4\u9694\u5185\u7684\u6570\u636e<\/p>\n<p style=\"margin-left:18.0000pt\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"86\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121740-680a2be440a93.png\" width=\"552\" \/><\/p>\n<p style=\"margin-left:18.0000pt\">\u5bf9\u6570\u636e\u7684\u64cd\u4f5c\u4e5f\u662f\u6309\u7167 RDD \u4e3a\u5355\u4f4d\u6765\u8fdb\u884c\u7684<\/p>\n<p style=\"margin-left:18.0000pt\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"158\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121740-680a2be467238.png\" width=\"536\" \/><\/p>\n<p style=\"margin-left:18.0000pt\">\u8ba1\u7b97\u8fc7\u7a0b\u7531 Spark Engine \u6765\u5b8c\u6210<\/p>\n<p style=\"margin-left:18.0000pt\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"88\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121740-680a2be48fc4c.png\" width=\"517\" \/><\/p>\n<h2 style=\"margin-left:0.0001pt;margin-right:0px;text-align:justify\">Spark-Streaming\u6838\u5fc3\u7f16\u7a0b<\/h2>\n<h3 style=\"text-align:justify\">DStream \u521b\u5efa<\/h3>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u521b\u5efaDStream\u7684\u4e09\u79cd\u65b9\u5f0f&#xff1a;RDD\u961f\u5217\u3001\u81ea\u5b9a\u4e49\u6570\u636e\u6e90\u3001kafka\u6570\u636e\u6e90<\/p>\n<h4 style=\"text-align:justify\">RDD\u961f\u5217<\/h4>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528 ssc.queueStream(queueOfRDDs)\u6765\u521b\u5efa DStream&#xff0c;\u6bcf\u4e00\u4e2a\u63a8\u9001\u5230\u8fd9\u4e2a\u961f\u5217\u4e2d\u7684 RDD&#xff0c;\u90fd\u4f1a\u4f5c\u4e3a\u4e00\u4e2aDStream \u5904\u7406<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5b9e\u4f8b&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5faa\u73af\u521b\u5efa\u51e0\u4e2a RDD&#xff0c;\u5c06 RDD \u653e\u5165\u961f\u5217\u3002\u901a\u8fc7 SparkStream \u521b\u5efa Dstream&#xff0c;\u8ba1\u7b97 WordCount<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"459\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121740-680a2be4b6091.png\" width=\"454\" \/><\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8fd0\u884c\u7ed3\u679c&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"241\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121740-680a2be4eae42.png\" width=\"292\" \/><\/p>\n<h4 style=\"text-align:justify\">\u81ea\u5b9a\u4e49\u6570\u636e\u6e90<\/h4>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u81ea\u5b9a\u4e49\u6570\u636e\u6e90\u9700\u8981\u7ee7\u627f Receiver&#xff0c;\u5e76\u5b9e\u73b0 onStart\u3001onStop \u65b9\u6cd5\u6765\u81ea\u5b9a\u4e49\u6570\u636e\u6e90\u91c7\u96c6<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6848\u4f8b&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u81ea\u5b9a\u4e49\u6570\u636e\u6e90&#xff0c;\u5b9e\u73b0\u76d1\u63a7\u67d0\u4e2a\u7aef\u53e3\u53f7&#xff0c;\u83b7\u53d6\u8be5\u7aef\u53e3\u53f7\u5185\u5bb9<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"393\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121741-680a2be523dfb.png\" width=\"455\" \/><\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"228\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121741-680a2be56fd08.png\" width=\"458\" \/><\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8fd0\u884c\u7ed3\u679c&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"292\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121741-680a2be59c567.png\" width=\"376\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e26\u6b21\uff0c\u6536\u85cf13\u6b21\u3002Spark Streaming \u7528\u4e8e\u6d41\u5f0f\u6570\u636e\u7684\u5904\u7406Spark Streaming \u652f\u6301\u7684\u6570\u636e\u8f93\u5165\u6e90\u5f88\u591a\uff0c\u4f8b\u5982\uff1aKafka\u3001Flume\u3001Twitter\u7b49\uff0c\u4ee5\u53ca\u548c\u7b80\u5355\u7684 TCP \u5957\u63a5\u5b57\u7b49\u7b49\u6570\u636e\u8f93\u5165\u540e\u53ef\u4ee5\u7528 Spark \u7684\u9ad8\u5ea6\u62bd\u8c61\u539f\u8bed\u5982\uff1amap\u3001reduce\u3001join\u3001window \u7b49\u8fdb\u884c\u8fd0\u7b97\u3002\u800c\u7ed3\u679c\u4e5f\u80fd\u4fdd\u5b58\u5728\u5f88\u591a\u5730\u65b9\uff0c\u5982 HDFS\uff0c\u6570\u636e\u5e93\u7b49\u548c Spark \u57fa\u4e8e RDD \u7684\u6982\u5ff5\u5f88\u76f8\u4f3c\uff0cSpark Streaming \u4f7f\u7528\u79bb\u6563\u5316\u6d41(discretized stream)\u4f5c\u4e3a\u62bd\u8c61\u8868\u793a\uff0c\u53eb\u4f5c DStream\u3002<\/p>\n","protected":false},"author":2,"featured_media":32545,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[365,664,323],"topic":[],"class_list":["post-32559","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-spark","tag-664","tag-323"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spark-Streaming - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/32559.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spark-Streaming - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e26\u6b21\uff0c\u6536\u85cf13\u6b21\u3002Spark Streaming \u7528\u4e8e\u6d41\u5f0f\u6570\u636e\u7684\u5904\u7406Spark Streaming \u652f\u6301\u7684\u6570\u636e\u8f93\u5165\u6e90\u5f88\u591a\uff0c\u4f8b\u5982\uff1aKafka\u3001Flume\u3001Twitter\u7b49\uff0c\u4ee5\u53ca\u548c\u7b80\u5355\u7684 TCP \u5957\u63a5\u5b57\u7b49\u7b49\u6570\u636e\u8f93\u5165\u540e\u53ef\u4ee5\u7528 Spark \u7684\u9ad8\u5ea6\u62bd\u8c61\u539f\u8bed\u5982\uff1amap\u3001reduce\u3001join\u3001window \u7b49\u8fdb\u884c\u8fd0\u7b97\u3002\u800c\u7ed3\u679c\u4e5f\u80fd\u4fdd\u5b58\u5728\u5f88\u591a\u5730\u65b9\uff0c\u5982 HDFS\uff0c\u6570\u636e\u5e93\u7b49\u548c Spark \u57fa\u4e8e RDD \u7684\u6982\u5ff5\u5f88\u76f8\u4f3c\uff0cSpark Streaming \u4f7f\u7528\u79bb\u6563\u5316\u6d41(discretized stream)\u4f5c\u4e3a\u62bd\u8c61\u8868\u793a\uff0c\u53eb\u4f5c DStream\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/32559.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-24T12:17:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121739-680a2be3387f6.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32559.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/32559.html\",\"name\":\"Spark-Streaming - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-24T12:17:42+00:00\",\"dateModified\":\"2025-04-24T12:17:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/32559.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/32559.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/32559.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spark-Streaming\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spark-Streaming - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/32559.html","og_locale":"zh_CN","og_type":"article","og_title":"Spark-Streaming - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.1k\u6b21\uff0c\u70b9\u8d5e26\u6b21\uff0c\u6536\u85cf13\u6b21\u3002Spark Streaming \u7528\u4e8e\u6d41\u5f0f\u6570\u636e\u7684\u5904\u7406Spark Streaming \u652f\u6301\u7684\u6570\u636e\u8f93\u5165\u6e90\u5f88\u591a\uff0c\u4f8b\u5982\uff1aKafka\u3001Flume\u3001Twitter\u7b49\uff0c\u4ee5\u53ca\u548c\u7b80\u5355\u7684 TCP \u5957\u63a5\u5b57\u7b49\u7b49\u6570\u636e\u8f93\u5165\u540e\u53ef\u4ee5\u7528 Spark \u7684\u9ad8\u5ea6\u62bd\u8c61\u539f\u8bed\u5982\uff1amap\u3001reduce\u3001join\u3001window \u7b49\u8fdb\u884c\u8fd0\u7b97\u3002\u800c\u7ed3\u679c\u4e5f\u80fd\u4fdd\u5b58\u5728\u5f88\u591a\u5730\u65b9\uff0c\u5982 HDFS\uff0c\u6570\u636e\u5e93\u7b49\u548c Spark \u57fa\u4e8e RDD \u7684\u6982\u5ff5\u5f88\u76f8\u4f3c\uff0cSpark Streaming \u4f7f\u7528\u79bb\u6563\u5316\u6d41(discretized stream)\u4f5c\u4e3a\u62bd\u8c61\u8868\u793a\uff0c\u53eb\u4f5c DStream\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/32559.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-24T12:17:42+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250424121739-680a2be3387f6.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/32559.html","url":"https:\/\/www.wsisp.com\/helps\/32559.html","name":"Spark-Streaming - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-24T12:17:42+00:00","dateModified":"2025-04-24T12:17:42+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/32559.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/32559.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/32559.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Spark-Streaming"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/32559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=32559"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/32559\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/32545"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=32559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=32559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=32559"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=32559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}