{"id":361551,"date":"2024-05-21T01:16:10","date_gmt":"2024-05-21T01:16:10","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=361551"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=361551","title":{"rendered":"<span>Apache Spark\u2026 \u042d\u0442\u043e \u0431\u0430\u0437\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong><em>Spark<\/em><\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a\u00a0\u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<blockquote>\n<p><em>Apache Spark is a unified computing engine and a set of libraries for parallel data processing on computer clusters. <br \/><\/em><a href=\"http:\/\/shop.oreilly.com\/product\/0636920034957.do\" rel=\"noopener noreferrer nofollow\"><sub>Spark: The Definitive Guide<\/sub><\/a><\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c80\/ebc\/9ee\/c80ebc9eec91dfa95ababee7b946069a.png\" alt=\"AI Generated**** Data Engineer using Apache Spark\" title=\"AI Generated* Data Engineer using Apache Spark\" width=\"2102\" height=\"710\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c80\/ebc\/9ee\/c80ebc9eec91dfa95ababee7b946069a.png\"\/><\/p>\n<div><figcaption>AI Generated*<strong><em> <\/em><\/strong>Data Engineer using Apache Spark<\/figcaption><\/div>\n<\/figure>\n<p><strong><em>Spark<\/em><\/strong> \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0430\u0442\u044c \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u043a\u0440\u0443\u0433 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e\u00a0\u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 SQL\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 Spark \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0414\u043b\u044f\u00a0\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e Spark, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<h3>\u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/63a\/9db\/e2a\/63a9dbe2aa99a3dcf7da63d1c850fb0a.png\" alt=\"\u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Spark. Not AI generated\" title=\"\u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Spark. Not AI generated\" width=\"1768\" height=\"1664\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/63a\/9db\/e2a\/63a9dbe2aa99a3dcf7da63d1c850fb0a.png\"\/><\/p>\n<div><figcaption>\u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Spark. Not AI generated<\/figcaption><\/div>\n<\/figure>\n<p><strong>I \u0447\u0430\u0441\u0442\u044c. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/strong><\/p>\n<p>Spark \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445: Java, Python, Scala \u0438 \u044f\u0437\u044b\u043a R.<\/p>\n<p><strong>II \u0447\u0430\u0441\u0442\u044c. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/strong><\/p>\n<p>Spark \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 5\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e Spark Core, Spark SQL, Spark Streaming, Spark MLlib \u0438 GraphX.<\/p>\n<ol>\n<li>\n<p><u>Spark Core<\/u> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u044c\u044e, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0432\u0430\u0440\u0438\u0439, \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0432\u00a0\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u00a0\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p><u>Spark SQL<\/u>\u00a0\u2014 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 SQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a\u00a0DataFrame.<\/p>\n<\/li>\n<li>\n<p><u>Spark Streaming<\/u>\u00a0\u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p><u>MLlib<\/u>\u00a0\u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f\u00a0\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><u>GraphX<\/u>\u00a0\u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u0433\u0440\u0430\u0444\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<p><strong>III \u0427\u0430\u0441\u0442\u044c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b\u00a0\u2014 Cluster Management,<\/strong> \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c Standalone cluster, Apache Mesos \u0438 YARN.<\/p>\n<p>\u0427\u0442\u043e\u00a0\u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <em>Catalyst Optimizer<\/em>, \u0442\u043e \u0432\u0432\u0438\u0434\u0443 \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u00a0Spark SQL\u00a0\u2014 \u044d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Spark, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u00a0SQL\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0442\u0430\u043a \u0438 DataFrame API, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Catalyst \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c Catalyst Optimizer \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f\u00a0\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0441\u00a0\u0446\u0435\u043b\u044c\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<h3>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u0435\u0439<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/548\/5d6\/0c7\/5485d60c700ee9f3e54008ed8d58065c.png\" alt=\"\u0440\u0438\u0441\u0443\u043d\u043e\u043a\" title=\"\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. Not AI generated\" width=\"1896\" height=\"1081\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/548\/5d6\/0c7\/5485d60c700ee9f3e54008ed8d58065c.png\"\/><\/p>\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. Not AI generated<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>DRIVER<\/strong>: \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/p>\n<ul>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/p>\n<\/li>\n<li>\n<p>\u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443\u00a0executors<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>EXECUTOR<\/strong>: \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/p>\n<ul>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u0434\u00a0\u043e\u0442 driver<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u00a0driver&#8217;\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>CLUSTER MANAGER<\/strong>: \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432\u00a0\u0434\u043b\u044f Spark-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/p>\n<ul>\n<li>\n<p>standalone,\u00a0YARN,\u00a0Mesos<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p><em>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u00a0\u0432\u0435\u0440\u0441\u0438\u044f\u043c Spark:<\/em><\/p>\n<ul>\n<li>\n<p><strong><em>RDD <\/em><\/strong><em>\u2014 <\/em>\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0Spark 0\u00a0(Low level API)<\/p>\n<ul>\n<li>\n<p><em>Resilient Distributed Dataset<\/em>\u00a0\u2014 \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438 partitions. RDD \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u0430\u043a\u00a0\u0432\u00a0\u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a \u0438 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445. Partitions \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. RDD \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b \u0438 \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f. <\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong><em>DataFrame<\/em><\/strong>\u00a0\u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0Spark 1.3\u00a0(Structured API)<\/p>\n<ul>\n<li>\n<p>\u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438\u00a0\u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437\u00a0\u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u0411\u043b\u043e\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u043e\u0434\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. DataFrame \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u00a0\u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438\u00a0\u043f\u043e\u043b\u0443\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0411\u0414.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong><em>DataSet <\/em><\/strong>\u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0Spark 1.6\u00a0(Structured API)<\/p>\n<ul>\n<li>\n<p>\u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0438\u043f\u0430 Row, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Immutability (\u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438) \u0438 Interoperability (\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438)**:<\/p>\n<p><strong><em>RDD<\/em><\/strong> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u00a0\u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044b \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438. \u0411\u043b\u043e\u043a\u043e\u043c, \u0438\u043b\u0438\u00a0\u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0446\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u00a0\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (transformations) \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432.<\/p>\n<p><strong><em>DataFrame<\/em><\/strong> \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0437\u00a0RDD. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e transformation \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a\u00a0RDD \u0443\u0436\u0435 \u043d\u0435\u00a0\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 RDD \u043d\u0435\u00a0\u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432\u00a0DataFrame.<\/p>\n<p><strong><em>DataSet<\/em><\/strong>: \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b Spark \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u00a0RDD \u0442\u0430\u043a \u0438 DataFrame \u0432\u00a0\u0441\u0430\u043c DataSet.<\/p>\n<h3>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<h4>Data Sources API<\/h4>\n<ul>\n<li>\n<p><strong><em>RDD <\/em><\/strong>\u2014 Data source API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 RDD \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437\u00a0\u043b\u044e\u0431\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0430\u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong><em>DataFrame <\/em><\/strong>\u2014 Data source API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 (AVRO, CSV, JSON, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u00a0\u0441\u0438\u0441\u0442\u0435\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f HDFS, HIVE** \u0442\u0430\u0431\u043b\u0438\u0446, MySQL).<\/p>\n<\/li>\n<li>\n<p><strong><em>DataSet <\/em><\/strong>\u2014 Dataset API \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>Spark DataFrame \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u0438\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/31c\/38e\/580\/31c38e58002d9098ba39fe635d4b6560.png\" alt=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 DF. Not AI generated\" title=\"\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 DF. Not AI generated\" width=\"2088\" height=\"931\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/31c\/38e\/580\/31c38e58002d9098ba39fe635d4b6560.png\"\/><\/p>\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 DF. Not AI generated<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spark DataFrame:<\/p>\n<p><strong><em>#\u0438\u0437 \u0444\u0430\u0439\u043b\u0430:<\/em><\/strong><\/p>\n<pre><code class=\"python\">from pyspark.sql.types import StructType,StringType, StructField, IntegerType  fields=[ StructField(\"col1\", IntegerType()), StructField(\"col2\", StringType())] schema1 = StructType(fields) from_file_df = spark.read.csv(\"\/directory\/your_file_name\", schema=schema1, sep=\";\", header=True.) #\u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u044b\u0437\u043e\u0432\u0435\u043c show(): from_file_df.show() <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a24\/18a\/0ee\/a2418a0ee5454bf590f400f0234b1a3f.png\" alt=\"DataFrame \u0438\u0437 txt. Not AI Generated\" title=\"DataFrame \u0438\u0437 txt. Not AI Generated\" width=\"1384\" height=\"514\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a24\/18a\/0ee\/a2418a0ee5454bf590f400f0234b1a3f.png\"\/><\/p>\n<div><figcaption>DataFrame \u0438\u0437 txt. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f json \u0444\u0430\u0439\u043b\u043e\u0432 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/50f\/c3d\/9d5\/50fc3d9d58e841296867f3985ba5c0a8.png\" alt=\"DataFrame \u0438\u0437 json. Not AI Generated\" title=\"DataFrame \u0438\u0437 json. Not AI Generated\" width=\"1878\" height=\"932\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/50f\/c3d\/9d5\/50fc3d9d58e841296867f3985ba5c0a8.png\"\/><\/p>\n<div><figcaption>DataFrame \u0438\u0437 json. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f csv \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 DataFrame \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d2e\/5d6\/902\/d2e5d69029cf38a044b9d97dafe4c953.png\" alt=\"DataFrame \u0438\u0437 csv. Not AI Generated\" title=\"DataFrame \u0438\u0437 csv. Not AI Generated\" width=\"1248\" height=\"594\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d2e\/5d6\/902\/d2e5d69029cf38a044b9d97dafe4c953.png\"\/><\/p>\n<div><figcaption>DataFrame \u0438\u0437 csv. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p><strong><em>#\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b HDFS <\/em><\/strong><em>&#8212; 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/em><\/p>\n<p><strong><em>#Pyspark<\/em><\/strong><\/p>\n<p><code>pyspark_df = spark.table(\"schema_name.table_name\")<\/code><\/p>\n<p><strong>#SQL quiery<\/strong><\/p>\n<p><code>sql_statement = \u201c\u201d\u201dSELECT * FROM schema_name.table_name\u201d\u201d\u201d<br \/>sql_df = spark.sql(sql_statement)<\/code><\/p>\n<p><strong><em>#\u0418\u0437 Pandas DF:<\/em><\/strong><\/p>\n<p><code>from_pandas_df = spark.createDataFrame(DF_Pandas)<\/code><\/p>\n<p><strong>#\u041d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 RDD:<\/strong><\/p>\n<p><code>from_rdd_df = spark.createDataFrame(rdd)<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/773\/3c5\/9e7\/7733c59e71270feb6ab65113425d5cc4.png\" alt=\"Spark DataFrame \u0438\u0437 Pandas DataFrame. Not AI Generated\" title=\"Spark DataFrame \u0438\u0437 Pandas DataFrame. Not AI Generated\" width=\"1754\" height=\"826\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/773\/3c5\/9e7\/7733c59e71270feb6ab65113425d5cc4.png\"\/><\/p>\n<div><figcaption>Spark DataFrame \u0438\u0437 Pandas DataFrame. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p>Spark DataFrame\u00a0\u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u0441 Pandas \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a select (\u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u043e\u043d\u043e\u043a), filter(\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f), sort(\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430), WithColumn(\u043d\u043e\u0432\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b), merge( join \u0442\u0430\u0431\u043b\u0438\u0446) \u0438 \u043f\u0440\u043e\u0447\u0438\u0435.\u00a0Spark\u00a0\u043e\u0442\u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430\u00a0\u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Pandas \u0432 Python.<\/p>\n<h3>Lazy evaluation<\/h3>\n<p>\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 (\u043b\u0435\u043d\u0438\u0432\u044b\u0435) \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u00a0RDD, DataFrame \u0438 DataSet \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c\u00a0\u2014 \u0432\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 executors \u0438 driver). \u041f\u0440\u0438\u00a0\u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u00a0RDD \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u00a0\u0432\u00a0\u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u00a0\u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f\u00a0\u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c RDD. \u041f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u0441\u0430\u043c\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u043b\u0438\u00a0\u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u0442\u043e\u0433 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439. \u0412\u00a0DataFrame \u0438 DataSet \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0432\u00a0\u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0434 \u043d\u0438\u043c (show(), count(), collect(), saveAs() \u0438\u00a0\u0442.\u00a0\u043f.).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3af\/c62\/2ab\/3afc622ab710eeca0f8fa38edf1d9900.png\" alt=\"AI generated lazy evaluation\" title=\"AI generated lazy evaluation\" width=\"1024\" height=\"583\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3af\/c62\/2ab\/3afc622ab710eeca0f8fa38edf1d9900.png\"\/><\/p>\n<div><figcaption>AI generated lazy evaluation<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 spark \u0441\u0435\u0441\u0441\u0438\u0438<\/h3>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Spark \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<p><code>spark1 = SparkSession.builder.master(\"local\").appName(\"&lt;app_name>\").getOrCreate()<\/code><\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0441\u0441\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445****:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"189\" width=\"189\">\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/p>\n<\/th>\n<th data-colwidth=\"85\" width=\"85\">\n<p>Default<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><a href=\"http:\/\/spark.app.name\" rel=\"noopener noreferrer nofollow\"><em>spark.app.name<\/em><\/a><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">(none)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 UI \u0438 \u043b\u043e\u0433\u0430\u0445.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.driver.cores<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c (\u0434\u043b\u044f cluster mode).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.driver.maxResultSize<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1g<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e Spark \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u043d\u0430\u043f\u0440. collect) \u0432 \u0431\u0430\u0439\u0442\u0430\u0445.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.driver.memory<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1g<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.executor.memory<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1g<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 executor.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.executor.pyspark.memory<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">Not set<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 PySpark \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e executor. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u043a\u0430\u0437\u0430\u043d, \u0442\u043e\u0433\u0434\u0430 PySpark \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f executor \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d &#8212; Spark \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u043e\u0431\u043e\u0439 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2c1\/46b\/e0d\/2c146be0d115165967a8f34f4c7b2d9c.png\" alt=\"AI Generated Data Engineer. \u041f\u043e\u043d\u044f\u0442\u044c \u0431\u044b \u0433\u0434\u0435 \u043b\u0438\u0446\u043e...\" title=\"AI Generated Data Engineer. \u041f\u043e\u043d\u044f\u0442\u044c \u0431\u044b \u0433\u0434\u0435 \u043b\u0438\u0446\u043e...\" width=\"1746\" height=\"786\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/2c1\/46b\/e0d\/2c146be0d115165967a8f34f4c7b2d9c.png\"\/><\/p>\n<div><figcaption>AI Generated Data Engineer. \u041f\u043e\u043d\u044f\u0442\u044c \u0431\u044b \u0433\u0434\u0435 \u043b\u0438\u0446\u043e&#8230;<\/figcaption><\/div>\n<\/figure>\n<p>*<a href=\"https:\/\/www.freepik.com\" rel=\"noopener noreferrer nofollow\">AI pictures Generator<\/a><br \/>**<a rel=\"noopener noreferrer nofollow\">Apache Spark RDD vs DataFrame vs DataSet<\/a><br \/>***<a href=\"https:\/\/data-flair.training\/blogs\/apache-hive-tutorial\/\" rel=\"noopener noreferrer nofollow\">Hive Tutorial for Beginners<\/a><br \/>****<a href=\"https:\/\/spark.apache.org\/docs\/latest\/configuration.html#application-properties\" rel=\"noopener noreferrer nofollow\">Application Properties<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/777294\/\"> https:\/\/habr.com\/ru\/articles\/777294\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong><em>Spark<\/em><\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a\u00a0\u043d\u0430\u0431\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<blockquote>\n<p><em>Apache Spark is a unified computing engine and a set of libraries for parallel data processing on computer clusters. <br \/><\/em><a href=\"http:\/\/shop.oreilly.com\/product\/0636920034957.do\" rel=\"noopener noreferrer nofollow\"><sub>Spark: The Definitive Guide<\/sub><\/a><\/p>\n<\/blockquote>\n<figure class=\"full-width\">\n<div><figcaption>AI Generated*<strong><em> <\/em><\/strong>Data Engineer using Apache Spark<\/figcaption><\/div>\n<\/figure>\n<p><strong><em>Spark<\/em><\/strong> \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0430\u0442\u044c \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u043a\u0440\u0443\u0433 \u0437\u0430\u0434\u0430\u0447 \u043f\u043e\u00a0\u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 SQL\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u044b\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 Spark \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u043a\u043e\u0434\u043e\u043c. \u0414\u043b\u044f\u00a0\u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e Spark, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438.<\/p>\n<h3>\u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430<\/h3>\n<figure class=\"full-width\">\n<div><figcaption>\u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430 Spark. Not AI generated<\/figcaption><\/div>\n<\/figure>\n<p><strong>I \u0447\u0430\u0441\u0442\u044c. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/strong><\/p>\n<p>Spark \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u0430\u043d\u0430\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u0441\u0440\u0435\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445: Java, Python, Scala \u0438 \u044f\u0437\u044b\u043a R.<\/p>\n<p><strong>II \u0447\u0430\u0441\u0442\u044c. \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/strong><\/p>\n<p>Spark \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 5\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432. \u042d\u0442\u043e Spark Core, Spark SQL, Spark Streaming, Spark MLlib \u0438 GraphX.<\/p>\n<ol>\n<li>\n<p><u>Spark Core<\/u> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u044c\u044e, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0432\u0430\u0440\u0438\u0439, \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447 \u0432\u00a0\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u00a0\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c.<\/p>\n<\/li>\n<li>\n<p><u>Spark SQL<\/u>\u00a0\u2014 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 SQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a\u00a0DataFrame.<\/p>\n<\/li>\n<li>\n<p><u>Spark Streaming<\/u>\u00a0\u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p><u>MLlib<\/u>\u00a0\u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f\u00a0\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><u>GraphX<\/u>\u00a0\u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u0433\u0440\u0430\u0444\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ol>\n<p><strong>III \u0427\u0430\u0441\u0442\u044c \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b\u00a0\u2014 Cluster Management,<\/strong> \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c Standalone cluster, Apache Mesos \u0438 YARN.<\/p>\n<p>\u0427\u0442\u043e\u00a0\u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <em>Catalyst Optimizer<\/em>, \u0442\u043e \u0432\u0432\u0438\u0434\u0443 \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u00a0Spark SQL\u00a0\u2014 \u044d\u0442\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Spark, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u00a0SQL\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0442\u0430\u043a \u0438 DataFrame API, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Catalyst \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c Catalyst Optimizer \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0434\u043b\u044f\u00a0\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0441\u00a0\u0446\u0435\u043b\u044c\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<h3>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u0435\u0439<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. Not AI generated<\/figcaption><\/div>\n<\/figure>\n<ul>\n<li>\n<p><strong>DRIVER<\/strong>: \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/p>\n<ul>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b<\/p>\n<\/li>\n<li>\n<p>\u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443\u00a0executors<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>EXECUTOR<\/strong>: \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f<\/p>\n<ul>\n<li>\n<p>\u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043e\u0434\u00a0\u043e\u0442 driver<\/p>\n<\/li>\n<li>\n<p>\u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u00a0driver&#8217;\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>CLUSTER MANAGER<\/strong>: \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432\u00a0\u0434\u043b\u044f Spark-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/p>\n<ul>\n<li>\n<p>standalone,\u00a0YARN,\u00a0Mesos<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p><em>\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u00a0\u0432\u0435\u0440\u0441\u0438\u044f\u043c Spark:<\/em><\/p>\n<ul>\n<li>\n<p><strong><em>RDD <\/em><\/strong><em>\u2014 <\/em>\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0Spark 0\u00a0(Low level API)<\/p>\n<ul>\n<li>\n<p><em>Resilient Distributed Dataset<\/em>\u00a0\u2014 \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438 partitions. RDD \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u0430\u043a\u00a0\u0432\u00a0\u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u043a \u0438 \u043d\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445. Partitions \u043c\u043e\u0433\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. RDD \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b \u0438 \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f. <\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong><em>DataFrame<\/em><\/strong>\u00a0\u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0Spark 1.3\u00a0(Structured API)<\/p>\n<ul>\n<li>\n<p>\u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438\u00a0\u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437\u00a0\u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432. \u0411\u043b\u043e\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u043e\u0434\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. DataFrame \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u00a0\u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043b\u0438\u00a0\u043f\u043e\u043b\u0443\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432\u00a0\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0411\u0414.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong><em>DataSet <\/em><\/strong>\u2014 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0Spark 1.6\u00a0(Structured API)<\/p>\n<ul>\n<li>\n<p>\u044d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0442\u0438\u043f\u0430 Row, \u0440\u0430\u0437\u0431\u0438\u0442\u044b\u0445 \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Immutability (\u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u0438) \u0438 Interoperability (\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438)**:<\/p>\n<p><strong><em>RDD<\/em><\/strong> \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437\u00a0\u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044b \u043d\u0430\u00a0\u0431\u043b\u043e\u043a\u0438. \u0411\u043b\u043e\u043a\u043e\u043c, \u0438\u043b\u0438\u00a0\u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0435\u0439, \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0446\u0435\u043b\u044c\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0432\u00a0\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f (transformations) \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432.<\/p>\n<p><strong><em>DataFrame<\/em><\/strong> \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u0437\u00a0RDD. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e transformation \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a\u00a0RDD \u0443\u0436\u0435 \u043d\u0435\u00a0\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 RDD \u043d\u0435\u00a0\u043f\u043e\u0434\u043b\u0435\u0436\u0438\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432\u00a0DataFrame.<\/p>\n<p><strong><em>DataSet<\/em><\/strong>: \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b Spark \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u00a0RDD \u0442\u0430\u043a \u0438 DataFrame \u0432\u00a0\u0441\u0430\u043c DataSet.<\/p>\n<h3>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<h4>Data Sources API<\/h4>\n<ul>\n<li>\n<p><strong><em>RDD <\/em><\/strong>\u2014 Data source API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 RDD \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437\u00a0\u043b\u044e\u0431\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0430\u0436\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><strong><em>DataFrame <\/em><\/strong>\u2014 Data source API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0444\u0430\u0439\u043b\u043e\u0432 (AVRO, CSV, JSON, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u00a0\u0441\u0438\u0441\u0442\u0435\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f HDFS, HIVE** \u0442\u0430\u0431\u043b\u0438\u0446, MySQL).<\/p>\n<\/li>\n<li>\n<p><strong><em>DataSet <\/em><\/strong>\u2014 Dataset API \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>Spark DataFrame \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u0438\u0437 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 DF. Not AI generated<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Spark DataFrame:<\/p>\n<p><strong><em>#\u0438\u0437 \u0444\u0430\u0439\u043b\u0430:<\/em><\/strong><\/p>\n<pre><code class=\"python\">from pyspark.sql.types import StructType,StringType, StructField, IntegerType  fields=[ StructField(\"col1\", IntegerType()), StructField(\"col2\", StringType())] schema1 = StructType(fields) from_file_df = spark.read.csv(\"\/directory\/your_file_name\", schema=schema1, sep=\";\", header=True.) #\u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u044b\u0437\u043e\u0432\u0435\u043c show(): from_file_df.show() <\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>DataFrame \u0438\u0437 txt. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f json \u0444\u0430\u0439\u043b\u043e\u0432 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u0443, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>DataFrame \u0438\u0437 json. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f csv \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043e \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 DataFrame \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>DataFrame \u0438\u0437 csv. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p><strong><em>#\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b HDFS <\/em><\/strong><em>&#8212; 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/em><\/p>\n<p><strong><em>#Pyspark<\/em><\/strong><\/p>\n<p><code>pyspark_df = spark.table(\"schema_name.table_name\")<\/code><\/p>\n<p><strong>#SQL quiery<\/strong><\/p>\n<p><code>sql_statement = \u201c\u201d\u201dSELECT * FROM schema_name.table_name\u201d\u201d\u201d<br \/>sql_df = spark.sql(sql_statement)<\/code><\/p>\n<p><strong><em>#\u0418\u0437 Pandas DF:<\/em><\/strong><\/p>\n<p><code>from_pandas_df = spark.createDataFrame(DF_Pandas)<\/code><\/p>\n<p><strong>#\u041d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 RDD:<\/strong><\/p>\n<p><code>from_rdd_df = spark.createDataFrame(rdd)<\/code><\/p>\n<figure class=\"full-width\">\n<div><figcaption>Spark DataFrame \u0438\u0437 Pandas DataFrame. Not AI Generated<\/figcaption><\/div>\n<\/figure>\n<p>Spark DataFrame\u00a0\u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u0441 Pandas \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a select (\u0432\u044b\u0431\u043e\u0440 \u043a\u043e\u043b\u043e\u043d\u043e\u043a), filter(\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f), sort(\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430), WithColumn(\u043d\u043e\u0432\u044b\u0435 \u0441\u0442\u043e\u043b\u0431\u0446\u044b), merge( join \u0442\u0430\u0431\u043b\u0438\u0446) \u0438 \u043f\u0440\u043e\u0447\u0438\u0435.\u00a0Spark\u00a0\u043e\u0442\u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430\u00a0\u043a\u043e\u043d\u0446\u0435\u043f\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Pandas \u0432 Python.<\/p>\n<h3>Lazy evaluation<\/h3>\n<p>\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 (\u043b\u0435\u043d\u0438\u0432\u044b\u0435) \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u00a0RDD, DataFrame \u0438 DataSet \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c\u00a0\u2014 \u0432\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 executors \u0438 driver). \u041f\u0440\u0438\u00a0\u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u00a0RDD \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u00a0\u0432\u00a0\u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u00a0\u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f\u00a0\u0431\u044b\u043b\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0430\u0434 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c RDD. \u041f\u0440\u0438\u00a0\u044d\u0442\u043e\u043c \u0441\u0430\u043c\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438\u043b\u0438\u00a0\u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u0442\u043e\u0433 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439. \u0412\u00a0DataFrame \u0438 DataSet \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0432\u00a0\u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u0434 \u043d\u0438\u043c (show(), count(), collect(), saveAs() \u0438\u00a0\u0442.\u00a0\u043f.).<\/p>\n<figure class=\"full-width\">\n<div><figcaption>AI generated lazy evaluation<\/figcaption><\/div>\n<\/figure>\n<h3>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 spark \u0441\u0435\u0441\u0441\u0438\u0438<\/h3>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Spark \u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<p><code>spark1 = SparkSession.builder.master(\"local\").appName(\"&lt;app_name>\").getOrCreate()<\/code><\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0441\u0441\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445****:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<th data-colwidth=\"189\" width=\"189\">\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440<\/p>\n<\/th>\n<th data-colwidth=\"85\" width=\"85\">\n<p>Default<\/p>\n<\/th>\n<th>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/th>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><a href=\"http:\/\/spark.app.name\" rel=\"noopener noreferrer nofollow\"><em>spark.app.name<\/em><\/a><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">(none)<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0418\u043c\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0432 UI \u0438 \u043b\u043e\u0433\u0430\u0445.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.driver.cores<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044f\u0434\u0435\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u043e\u043c (\u0434\u043b\u044f cluster mode).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.driver.maxResultSize<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1g<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432\u0441\u0435\u0445 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0439 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e Spark \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f (\u043d\u0430\u043f\u0440. collect) \u0432 \u0431\u0430\u0439\u0442\u0430\u0445.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.driver.memory<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1g<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.executor.memory<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">1g<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 executor.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"189\" width=\"189\">\n<p align=\"left\"><em>spark.executor.pyspark.memory<\/em><\/p>\n<\/td>\n<td data-colwidth=\"85\" width=\"85\">\n<p align=\"left\">Not set<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 PySpark \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e executor. \u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u043a\u0430\u0437\u0430\u043d, \u0442\u043e\u0433\u0434\u0430 PySpark \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f executor \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d &#8212; Spark \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u043e\u0431\u043e\u0439 \u0434\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>AI Generated Data Engineer. \u041f\u043e\u043d\u044f\u0442\u044c \u0431\u044b \u0433\u0434\u0435 \u043b\u0438\u0446\u043e&#8230;<\/figcaption><\/div>\n<\/figure>\n<p>*<a href=\"https:\/\/www.freepik.com\" rel=\"noopener noreferrer nofollow\">AI pictures Generator<\/a><br \/>**<a rel=\"noopener noreferrer nofollow\">Apache Spark RDD vs DataFrame vs DataSet<\/a><br \/>***<a href=\"https:\/\/data-flair.training\/blogs\/apache-hive-tutorial\/\" rel=\"noopener noreferrer nofollow\">Hive Tutorial for Beginners<\/a><br \/>****<a href=\"https:\/\/spark.apache.org\/docs\/latest\/configuration.html#application-properties\" rel=\"noopener noreferrer nofollow\">Application Properties<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/777294\/\"> https:\/\/habr.com\/ru\/articles\/777294\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-361551","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=361551"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/361551\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=361551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=361551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=361551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}