{"id":453142,"date":"2025-03-24T15:02:11","date_gmt":"2025-03-24T15:02:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=453142"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=453142","title":{"rendered":"<span>\u041f\u0440\u0430\u043a\u0442\u0438\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043e\u043a Spark Kubernetes Executor<\/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>\u041f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Docker-\u0441\u0431\u043e\u0440\u043e\u043a \u043d\u0430 \u0431\u0430\u0437\u0435 Spark \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a Spark Kubernetes Executors \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Spark-\u0437\u0430\u0434\u0430\u0447 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 Pyspark \u0438 Cassandra Connector, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043a\u0430\u043a \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 Docker-\u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f Spark \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0442\u0435\u043a\u0435 \u0438\u043b\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043f\u0430\u0440\u0443 Docker-\u0441\u0431\u043e\u0440\u043e\u043a: \u043e\u0434\u043d\u0443 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043b\u0435\u0433\u0430\u0441\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438. \u041d\u0438\u0436\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e\u0431 \u044d\u0442\u0430\u043f\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 Docker-\u0441\u0431\u043e\u0440\u043e\u043a, \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u044f\u0441\u044c \u0432 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u043e \u0445\u043e\u0434\u0443 \u0434\u0435\u043b\u0430.<\/p>\n<h3>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 Java \u0438 Spark, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443. \u0417\u0432\u0443\u0447\u0438\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f, \u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (\u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435), \u043f\u043e\u0442\u044f\u043d\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u0418\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 Spark \u043d\u0443\u0436\u043d\u043e\u0439 \u043d\u0430\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0437 <a href=\"https:\/\/archive.apache.org\/dist\/spark\/spark-3.3.2\/\" rel=\"noopener noreferrer nofollow\">Apache Archive Distribution Directory<\/a>  (\u0437\u0434\u0435\u0441\u044c Spark v3.3.2 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430). \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u0430\u043c Spark \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0441 OpenJDK, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u0438 \u0432\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443.<\/p>\n<p>\u0418 \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0431\u043e\u0440\u043e\u043a \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f <code>python:2.7.18-slim-buster<\/code> \u2014 \u043d\u0438\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u0441\u0438\u0439 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u0430\u0440\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439. \u041f\u0435\u0440\u0432\u0443\u044e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u201c\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u201d:<\/p>\n<pre><code class=\"bash\"># Debian GNU\/Linux 11 (bullseye) # OpenJDK Runtime Environment 18.9 (build 11.0.16+8) # Python 3.9.2 + dependencies (requirements.txt) # Scala 2.12.15 + Spark\/Pyspark 3.3.2 # Cassandra Connector 3.3.0 + dependencies (ivy.xml)<\/code><\/pre>\n<p>\u0410 \u0432\u0442\u043e\u0440\u0443\u044e, \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u201c\u043d\u0443\u0436\u043d\u043e\u0439\u201d (\u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430):<\/p>\n<pre><code># Debian GNU\/Linux 10 (buster) slim with Python 2.7.18 # OpenJDK Runtime Environment (Temurin)(build 1.8.0_422-b05) # Python 2.7.18 + dependencies (requirements.txt) # Scala 2.11 (2.11.12) + Spark\/PySpark 2.4.5 # Cassandra Connector 2.5.2 + dependencies (ivy.xml)<\/code><\/pre>\n<h3>Spark \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0430<\/h3>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u0441 \u043e\u0444. \u0441\u0431\u043e\u0440\u043a\u043e\u0439 Spark \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 <code>\/kubernetes\/dockerfiles\/spark\/Dockerfile<\/code> \u2014 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442 \u043a\u0430\u0440\u043a\u0430\u0441, \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u044d\u0442\u043e\u0442 Dockerfile (\u0438\u0437 \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0430\u043c \u0432\u0435\u0440\u0441\u0438\u0438 Spark) \u201c\u043a\u0430\u043a \u0435\u0441\u0442\u044c\u201d. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u043c\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<pre><code>ARG java_image_tag=11-jre-slim  FROM openjdk:${java_image_tag}  ARG spark_uid=185  RUN set -ex &amp;&amp; \\     sed -i 's\/http:\\\/\\\/deb.\\(.*\\)\/https:\\\/\\\/deb.\\1\/g' \/etc\/apt\/sources.list &amp;&amp; \\     apt-get update &amp;&amp; \\     ln -s \/lib \/lib64 &amp;&amp; \\     apt install -y bash tini libc6 libpam-modules krb5-user libnss3 procps &amp;&amp; \\     mkdir -p \/opt\/spark &amp;&amp; \\     mkdir -p \/opt\/spark\/examples &amp;&amp; \\     mkdir -p \/opt\/spark\/work-dir &amp;&amp; \\     touch \/opt\/spark\/RELEASE &amp;&amp; \\     rm \/bin\/sh &amp;&amp; \\     ln -sv \/bin\/bash \/bin\/sh &amp;&amp; \\     echo \"auth required pam_wheel.so use_uid\" &gt;&gt; \/etc\/pam.d\/su &amp;&amp; \\     chgrp root \/etc\/passwd &amp;&amp; chmod ug+rw \/etc\/passwd &amp;&amp; \\     rm -rf \/var\/cache\/apt\/*  # \u0417\u0414\u0415\u0421\u042c \u0411\u0423\u0414\u0415\u0422 \u041d\u0410\u0428\u0410 \u0412\u0421\u0422\u0410\u0412\u041a\u0410, \u0413\u0414\u0415 \u0421\u041a\u0410\u0427\u0418\u0412\u0410\u0415\u0422\u0421\u042f \u0414\u0418\u0421\u0422\u0420\u0418\u0411\u0423\u0422\u0418\u0412 SPARK  COPY jars \/opt\/spark\/jars COPY bin \/opt\/spark\/bin COPY sbin \/opt\/spark\/sbin COPY kubernetes\/dockerfiles\/spark\/entrypoint.sh \/opt\/ COPY kubernetes\/dockerfiles\/spark\/decom.sh \/opt\/ COPY examples \/opt\/spark\/examples COPY kubernetes\/tests \/opt\/spark\/tests COPY data \/opt\/spark\/data  ENV SPARK_HOME \/opt\/spark  # \u0417\u0414\u0415\u0421\u042c \u0411\u0423\u0414\u0415\u0422 \u041d\u0410\u0428\u0410 \u0412\u0421\u0422\u0410\u0412\u041a\u0410, \u0413\u0414\u0415 \u0423\u0421\u0422\u0410\u041d\u0410\u0412\u041b\u0418\u0412\u0410\u0415\u0422\u0421\u042f CASSANDRA CONNECTOR  WORKDIR \/opt\/spark\/work-dir RUN chmod g+w \/opt\/spark\/work-dir RUN chmod a+x \/opt\/decom.sh  ENTRYPOINT [ \"\/opt\/entrypoint.sh\" ] USER ${spark_uid}<\/code><\/pre>\n<p>\u0412 \u043e\u0431\u0449\u0438\u0445 \u0447\u0435\u0440\u0442\u0430\u0445 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a \u0434\u043b\u044f Spark<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e \u044d\u0442\u0438\u043c \u043f\u0430\u043f\u043a\u0430\u043c \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043f\u043e\u043a \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 <code>\/opt\/entrypoint.sh<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a Spark Driver\/Executor \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c Spark \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 Kubernetes<\/p>\n<\/li>\n<li>\n<p><code>USER ${spark_uid}<\/code> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u0437-\u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>spark<\/code> (\u0432\u043c\u0435\u0441\u0442\u043e root)<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0443\u0449\u0435\u0440\u0431\u0430 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430?<\/p>\n<ul>\n<li>\n<p>\u041f\u0430\u043a\u0435\u0442\u044b <code>libpam-modules<\/code> \u0438 <code>krb5-user<\/code> \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0434\u0430\/\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0447\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 COPY \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0443 <code>RUN mv \u2026 &amp;&amp; mv \u2026 &amp;&amp; mv \u2026<\/code>, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0447\u0438\u0441\u043b\u043e \u0441\u043b\u043e\u0451\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043e\u043a <code>examples, tests, data<\/code> \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0438\u0445 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0432 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code># \u0412\u0421\u0422\u0410\u0412\u041a\u0410: \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u043c Spark \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 RUN mkdir -p \/tmp &amp;&amp; cd $_ &amp;&amp; \\ wget -nv -O spark.tgz https:\/\/archive.apache.org\/...\/spark-3.3.2.tgz &amp;&amp; \\ tar -xf spark.tgz --strip-components=1 &amp;&amp; \\ chown -R spark:spark .<\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, <s>\u043d\u043e \u043d\u0430 \u043c\u043e\u0435\u043c dialup<\/s> \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Spark \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0443 \u043e-\u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <code>COPY spark.tgz .<\/code>, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0432 \u0441\u0442\u0430\u0432\u0448\u0438\u0439 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u043c <code>wget<\/code>.<\/p>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u043d\u0430\u0448 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 Spark Kubernetes Executor \u0433\u043e\u0442\u043e\u0432, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u043d\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h3>\u041f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0430\u0434\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438<\/h3>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0435\u043c \u0441\u043a\u0435\u043b\u0435\u0442 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e Dockerfile, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 multistage build. \u0412\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u201c\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u201d \u0441\u0431\u043e\u0440\u043a\u0438 (\u0435\u0441\u043b\u0438 \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0435):<\/p>\n<pre><code>### \u0421\u0422\u0410\u0414\u0418\u042f 1: \u0421\u0431\u043e\u0440\u043a\u0430 Python FROM openjdk:11-jre-slim AS python3_builder # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Python, pip, venv \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 requirements.txt  ...  ### \u0421\u0422\u0410\u0414\u0418\u042f 2: Cassandara Connector \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 FROM openjdk:11-jre-slim AS cassandra_connector_builder ...  ### \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0434\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 FROM openjdk:11-jre-slim COPY --from=python3_builder ...  # \u0412\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 Dockerfile \u0441\u043e Spark, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 ...<\/code><\/pre>\n<p>\u0418 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Python, \u0433\u0434\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f  <code>python:2.7.18-slim-buster<\/code>, \u0430 JDK \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code>### \u0421\u0422\u0410\u0414\u0418\u042f 1: \u0421\u0431\u043e\u0440\u043a\u0430 Python FROM python:2.7.18-slim-buster AS python2_builder # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 venv \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 requirements.txt  ...  ### \u0421\u0422\u0410\u0414\u0418\u042f 2: Cassandara Connector \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 FROM openjdk:11-jre-slim AS cassandra_connector_builder ...  ### \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0434\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 FROM python:2.7.18-slim-buster COPY --from=python2_builder \/opt\/venv \/opt\/venv  # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Java \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 RUN apt-get install -y temurin-8-jdk ENV JAVA_HOME=\/usr\/lib\/jvm\/temurin-8-jdk-amd64 ENV PATH=\"$JAVA_HOME\/bin:$PATH\"  # \u0412\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 Dockerfile \u0441\u043e Spark, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 ...<\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0433\u043b\u044f\u0434\u044f \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 Dockerfile, \u0432\u044b \u0441\u043a\u0430\u0436\u0435\u0442\u0435, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 JDK \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 stage \u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u044b. \u0421\u043a\u0430\u0436\u0443 \u0431\u043e\u043b\u044c\u0448\u0435 \u2014 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0430\u043a \u0438 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0438 \u0434\u0430\u0436\u0435 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041d\u043e \u0431\u044b\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0434\u0432\u0430 \u0443\u043b\u043e\u0432\u0438\u043c\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e) \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 <s>\u043e\u0442 \u0433\u0440\u0435\u0445\u0430 \u043f\u043e\u0434\u0430\u043b\u044c\u0448\u0435<\/s> \u0432 \u0446\u0435\u043b\u044f\u0445 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c (\u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438) \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 multistage build \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 JDK \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Python<\/h3>\n<p>\u0412\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u201c\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439&#187; \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code>### \u0421\u0422\u0410\u0414\u0418\u042f 1: \u0421\u0431\u043e\u0440\u043a\u0430 Python FROM openjdk:11-jre-slim AS python3_builder  RUN apt-get update &amp;&amp; \\     apt install -y wget python3.9 python3.9-distutils libpython3.9 &amp;&amp; \\     update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.9 1 &amp;&amp; \\     update-alternatives --install \/usr\/bin\/python python \/usr\/bin\/python3.9 1 &amp;&amp; \\     wget https:\/\/bootstrap.pypa.io\/get-pip.py &amp;&amp; \\     python3.9 get-pip.py  COPY requirements.txt .  RUN pip install --upgrade pip &amp;&amp; \\     pip install virtualenv &amp;&amp; \\     virtualenv \/opt\/venv &amp;&amp; \\     . \/opt\/venv\/bin\/activate &amp;&amp; \\     pip install -r requirements.txt<\/code><\/pre>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0433\u043a\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0438 \u043e\u0431\u0440\u0430\u0449\u0443 \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 pip \u0447\u0435\u0440\u0435\u0437 <code>get-pip.py<\/code> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0447\u0435\u043c <code>apt install python3-pip<\/code><\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 slim-\u043e\u0431\u0440\u0430\u0437, \u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <code>python3.9-distutils, libpython3.9<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 <s>\u043f\u0438\u0445\u0430\u0435\u0442\u0435 \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u0443 \u043a\u0443\u0447\u0443<\/s> \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043e\u0431\u0440\u0430\u0437 \u0431\u0435\u0437 multistage build, \u0442\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0434\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043a\u044d\u0448 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 pip (<code>--no-cache-dir<\/code> \u0434\u043b\u044f pip)<\/p>\n<\/li>\n<li>\n<p>\u0411\u0443\u0434\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0438\u0434\u0435\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 <code>venv<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u0430 \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<\/li>\n<\/ul>\n<pre><code>COPY --from=python3_builder \/opt\/venv \/opt\/venv SHELL [\"\/bin\/bash\", \"-c\"] RUN . \/opt\/venv\/bin\/activate<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 Docker-\u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Python, \u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e Python v2.7.18  <s>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0443\u0437\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0434\u043a\u043e\u0441\u0442\u044c\u044e<\/s> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Debian, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0432\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 <code>python:2.7.18-slim-buster<\/code> (\u043a\u0430\u043a \u0438 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u043e 2-\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Dockerfile) \u043b\u0438\u0431\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c Python \u201c\u0441 \u043d\u0443\u043b\u044f\u201c.<\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0441\u0431\u043e\u0440\u043a\u0430 Python \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0440\u0435\u043c\u044f\u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430. \u0418 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0435\u0432 \u0432 Docker \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432\u0441\u0435 \u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435. \u0410 \u0435\u0433\u043e \u0438 \u0442\u0430\u043a \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u201c\u0431\u0443\u0442\u044b\u043b\u043e\u0447\u043d\u043e\u0435 \u0433\u043e\u0440\u043b\u044b\u0448\u043a\u043e\u201d \u0432\u043e \u0432\u0441\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e requirements.txt, \u0442\u043e \u0432\u0430\u043c, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0434\u043b\u044f Pyspark (\u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c):<\/p>\n<pre><code>pyspark==3.3.2 py4j&gt;=0.10.9.5 grpcio&lt;1.57 grpcio-status&lt;1.57 googleapis-common-protos==1.56.4 ...<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Cassandara Connector<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 Docker-\u043e\u0431\u0440\u0430\u0437\u044b \u0441\u043e Spark. \u0422\u0430\u043a \u0447\u0442\u043e Cassandara Connector \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0430\u0441\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0418 \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u0430\u043c\u044b\u043c <s>\u0432\u044b\u043c\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c<\/s> \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043a\u0432\u0435\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0439\u0442\u0438.<\/p>\n<p>\u042f \u043d\u0435 Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u0443\u043f\u0443\u0441\u043a\u0430\u044e. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u0440\u0438\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u043e\u0439 Java-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0435 \u0438 \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u201cproduction ready\u201c \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u0448\u0438\u0431\u043a\u0438 Java \u0432 \u043b\u043e\u0433\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u043b\u043e\u0434\u0438\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 Java-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u044b\u043b \u0432\u0437\u044f\u0442 \u043f\u0430\u043a\u0435\u0442 <code>ivy<\/code>, \u0443\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Spark. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 stage \u0441 Cassandara Connector \u0432 Dockerfile \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Spark, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443 \u0436\u0435 \u0441\u0430\u043c\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <code>ivy<\/code>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439 stage (\u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 Spark \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0438\u0438 <code>ivy<\/code>, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432):<\/p>\n<pre><code>### \u0421\u0422\u0410\u0414\u0418\u042f 2: Cassandara Connector \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 FROM openjdk:11-jre-slim AS cassandra_connector_builder  RUN apt update &amp;&amp; \\     apt install -y wget &amp;&amp; \\     wget -O ivy-2.5.1.jar https:\/\/repo1.maven.org\/maven2\/org\/apache\/ivy\/ivy\/2.5.1\/ivy-2.5.1.jar  COPY java\/ivy.xml . COPY java\/ivysettings.xml .  # \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c Java-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f Cassandra Connector RUN java -jar ivy-2.5.1.jar \\     -settings ivysettings.xml \\     -ivy ivy.xml \\     -retrieve \"\/opt\/spark\/cassandra\/[artifact]-[revision](-[classifier]).[ext]\"<\/code><\/pre>\n<p>\u0418\u0434\u0435\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 Java-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 <code>$SPARK_HOME\/jars\/<\/code> (<code>ClassPath<\/code> \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0438, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c, \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u043a\u044d\u0448\u0430 <code>ivy<\/code> \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u0435\u043d \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430.<\/p>\n<p>\u042d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c <code>extraClassPath<\/code> \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b Spark-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 <code>ivy<\/code> \u0442\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u0432\u044b\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u044d\u0448 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 Spark App \u0432 Kubernetes, \u043a\u043e\u0433\u0434\u0430 <code>ivy<\/code> \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, <s>\u0430\u0434\u0441\u043a\u0438<\/s> \u0442\u043e\u0440\u043c\u043e\u0437\u044f \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0434.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 Spark <code>ClassPath<\/code>, \u0442\u043e\u0433\u0434\u0430, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0431\u043e\u043b\u044c\u0448\u0435 \u041d\u0415 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 Spark-\u0441\u0435\u0441\u0441\u0438\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435  <code>.set(\"spark.jars.packages\", \"repo:package\")<\/code> \u043d\u0430 Python. \u0410, \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u041d\u0415 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 <code>spark-submit --packages repo:package<\/code> \u0438\u043b\u0438 <code>spark-submit --jars repo:package<\/code>.<\/p>\n<p>\u0418 \u0445\u043e\u0442\u044f \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>spark-submit<\/code> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0443\u0434\u0430, \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 Spark \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u0438\u0437 <code>\/opt\/entrypoint.sh<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 (\u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a) \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u043e \u043f\u0430\u0442\u0447\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442 \u043d\u043e\u0432\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043e\u0442\u043a\u0430\u0437\u0430.<\/p>\n<p>\u041a\u043e\u0440\u043e\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u043e\u0442 \u043f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<ol>\n<li>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c Java-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 <code>ivy<\/code><\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u043a\u043b\u044e\u0447\u0435 <code>-retrieve<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u043e\u0432\u044b\u0445 Java-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u044b\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u043c\u0441\u044f \u0432 Spark (\u0435\u0441\u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0448\u0430\u0431\u043b\u043e\u043d \u0442\u043e \u0444\u0430\u0439\u043b\u044b \u0437\u0430\u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044e\u0442\u0441\u044f)<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u043d\u043e\u0432\u044b\u0435 jar-\u0444\u0430\u0439\u043b\u044b \u0432 <code>$SPARK_HOME\/jars\/<\/code> \u2014 \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044f \u0443\u0436\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f, \u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0435<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c <code>extraClassPath<\/code>, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0441 Java-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043e\u0442 \u201c\u0442\u044f\u0436\u0435\u043b\u043e\u0433\u043e\u201d \u043a\u044d\u0448\u0430 <code>ivy<\/code> \u2014 \u043a\u0430\u043a \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440, \u0442\u0430\u043a \u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432 Kubernetes<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0441 \u043f\u0430\u0440\u043e\u0439 \u0432\u0430\u0436\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 <code>ivy.xml<\/code> \u0438 <code>ivysettings.xml<\/code>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0444. \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Cassandara Connector <a href=\"https:\/\/repo1.maven.org\/maven2\/com\/datastax\/spark\/spark-cassandra-connector_2.12\/3.3.0\/\" rel=\"noopener noreferrer nofollow\">\u0432 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a> \u043b\u0435\u0436\u0438\u0442 pom-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Apache Maven. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 pom-\u0444\u0430\u0439\u043b \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435<code> ivy.xml<\/code> \u0438 <code>ivysettings.xml<\/code> \u0441 \u0442\u0435\u043c \u0436\u0435 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u043b\u044e\u0431\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u043e\u0440\u043e\u043c (\u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u0440\u043c\u0438\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 pom \u0441\u0432\u043e\u0435\u0439 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 GPT). \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c.<\/p>\n<p><em>NB: \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0434\u043b\u044f Cassandara Connector \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0449\u0435 \u043f\u0430\u043a\u0435\u0442 <\/em><code><em>jnr-posix<\/em><\/code><em> \u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438.<\/em><\/p>\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 stage \u043c\u043e\u0436\u043d\u043e <s>\u043f\u043e\u0440\u0443\u0447\u0438\u0442\u044c \u0434\u0436\u0443\u043d\u0443<\/s> \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u0441\u0435\u0439 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u0440\u0430\u0437\u0435\/\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <code>java\/<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u044c xml-\u043a\u043e\u043d\u0444\u0438\u0433\u0438. \u0418 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435\u0441\u044c \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0431\u043e\u0440\u043a\u0430 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u0430\u044f.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u043b\u0438, \u0447\u0442\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043a\u0435\u043b\u0435\u0442\u0435 Dockerfile (\u0441\u043c. \u201cSpark \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0430\u201c) \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0441\u0442\u0430\u0432\u043a\u0438. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<pre><code># \u0412\u0421\u0422\u0410\u0412\u041a\u0410: \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Cassandara Connector COPY --from=cassandra_connector_builder \/opt\/spark\/cassandra \/opt\/spark\/cassandra RUN set -ex &amp;&amp; \\     # \u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0435 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f Cassandra Connector     mv -n $SPARK_HOME\/cassandra\/*.jar $SPARK_HOME\/jars\/ &amp;&amp; \\     chown -R spark:spark $SPARK_HOME\/jars\/ &amp;&amp; \\     # \u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0443\u0431\u043b\u0438, \u043e\u043d\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b     rm -rf $SPARK_HOME\/cassandra<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 multistage build, \u0442\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043a\u044d\u0448 ivy:<\/p>\n<pre><code>RUN rm -rf \/root\/.ivy2<\/code><\/pre>\n<h3>\u0424\u0438\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438<\/h3>\n<p>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435?<\/p>\n<ul>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u0437\u0430\u0431\u044b\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>chown -R spark:spark<\/code> \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043b\u0438\/\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432 <code>$SPARK_HOME\/jars\/<\/code>. \u0418 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u044b\u0445 \u043d\u043e\u0432\u044b\u0445 \u043f\u0430\u043f\u043e\u043a \u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 <code>$SPARK_HOME\/<\/code>, \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u044b\u0435 \u0431\u044b\u043b\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>\/opt\/spark\/work-dir<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u0430\u0448\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u0415\u0441\u043b\u0438 \u043d\u0443 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0446\u0435\u043b\u0438, \u0441\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0435\u0439 \u0438 \u0444\u0430\u0439\u043b\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 <code>chown -R spark:spark<\/code> \u0438 \u043f\u0440\u0430\u0432\u0430 775 \u043d\u0430 \u043f\u0430\u043f\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u0432\u0430\u0448 Dockerfile \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438:<\/p>\n<\/li>\n<\/ul>\n<pre><code>ENTRYPOINT [ \"\/opt\/entrypoint.sh\" ] USER ${spark_uid}<\/code><\/pre>\n<ul>\n<li>\n<p>\u0412 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 Spark Application \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <code>securityContext<\/code> (\u0433\u0434\u0435 185 \u044d\u0442\u043e spark_uid):<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">spec:   driver:     securityContext:       runAsUser: 185       runAsGroup: 185       fsGroup: 185   executor:     securityContext:       runAsUser: 185       runAsGroup: 185       fsGroup: 185<\/code><\/pre>\n<p>\u0421 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044f \u043e\u043f\u0443\u0449\u0443 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 Dockerfile \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c: \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u0430\u0448\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0446\u0435\u043b\u043e\u043c \u0438\u043b\u0438 \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u0435\u043c\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u0440\u0430\u0437\u0430\u043c\u0438 Spark, \u043f\u043b\u044e\u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0444\u0438\u0448\u043a\u0438, \u0447\u0442\u043e, \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0412-\u0442\u0440\u0435\u0442\u044c\u0438\u0445, \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0434\u0432\u0443\u0445 Dockerfile, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043e\u0431\u0430 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435.<\/p>\n<p>\u0410 \u043f\u043e\u0442\u043e\u043c \u044d\u0442\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c \u0438\u0437 Airflow \u0438 Spark Operator \u0432 Kubernetes, \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f.<\/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\/893782\/\"> https:\/\/habr.com\/ru\/articles\/893782\/<\/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>\u041f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Docker-\u0441\u0431\u043e\u0440\u043e\u043a \u043d\u0430 \u0431\u0430\u0437\u0435 Spark \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a Spark Kubernetes Executors \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Spark-\u0437\u0430\u0434\u0430\u0447 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 Pyspark \u0438 Cassandra Connector, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043a\u0430\u043a \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 Docker-\u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f Spark \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c \u0441\u0442\u0435\u043a\u0435 \u0438\u043b\u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u043f\u0430\u0440\u0443 Docker-\u0441\u0431\u043e\u0440\u043e\u043a: \u043e\u0434\u043d\u0443 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043b\u0435\u0433\u0430\u0441\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438. \u041d\u0438\u0436\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e\u0431 \u044d\u0442\u0430\u043f\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0438\u0445 Docker-\u0441\u0431\u043e\u0440\u043e\u043a, \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u044f\u0441\u044c \u0432 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u043e \u0445\u043e\u0434\u0443 \u0434\u0435\u043b\u0430.<\/p>\n<h3>\u041f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 Java \u0438 Spark, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443. \u0417\u0432\u0443\u0447\u0438\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f, \u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (\u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u043d\u0430\u0447\u0430\u043b\u0435), \u043f\u043e\u0442\u044f\u043d\u0435\u0442 \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0439 \u0432\u0441\u0435\u0433\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e. \u0418\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0437 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n<p>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 Spark \u043d\u0443\u0436\u043d\u043e\u0439 \u043d\u0430\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0437 <a href=\"https:\/\/archive.apache.org\/dist\/spark\/spark-3.3.2\/\" rel=\"noopener noreferrer nofollow\">Apache Archive Distribution Directory<\/a>  (\u0437\u0434\u0435\u0441\u044c Spark v3.3.2 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430). \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0441\u0430\u043c Spark \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 \u0441 OpenJDK, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u0438 \u0432\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443.<\/p>\n<p>\u0418 \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0431\u043e\u0440\u043e\u043a \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f <code>python:2.7.18-slim-buster<\/code> \u2014 \u043d\u0438\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u0435\u0440\u0441\u0438\u0439 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u0430\u0440\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439. \u041f\u0435\u0440\u0432\u0443\u044e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u201c\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u201d:<\/p>\n<pre><code class=\"bash\"># Debian GNU\/Linux 11 (bullseye) # OpenJDK Runtime Environment 18.9 (build 11.0.16+8) # Python 3.9.2 + dependencies (requirements.txt) # Scala 2.12.15 + Spark\/Pyspark 3.3.2 # Cassandra Connector 3.3.0 + dependencies (ivy.xml)<\/code><\/pre>\n<p>\u0410 \u0432\u0442\u043e\u0440\u0443\u044e, \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u201c\u043d\u0443\u0436\u043d\u043e\u0439\u201d (\u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430):<\/p>\n<pre><code># Debian GNU\/Linux 10 (buster) slim with Python 2.7.18 # OpenJDK Runtime Environment (Temurin)(build 1.8.0_422-b05) # Python 2.7.18 + dependencies (requirements.txt) # Scala 2.11 (2.11.12) + Spark\/PySpark 2.4.5 # Cassandra Connector 2.5.2 + dependencies (ivy.xml)<\/code><\/pre>\n<h3>Spark \u043a\u0430\u043a \u043e\u0441\u043d\u043e\u0432\u0430<\/h3>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u0441 \u043e\u0444. \u0441\u0431\u043e\u0440\u043a\u043e\u0439 Spark \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 <code>\/kubernetes\/dockerfiles\/spark\/Dockerfile<\/code> \u2014 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442 \u043a\u0430\u0440\u043a\u0430\u0441, \u0432\u043e\u043a\u0440\u0443\u0433 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u0441\u0431\u043e\u0440\u043a\u0430. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0435\u0431\u0435 \u044d\u0442\u043e\u0442 Dockerfile (\u0438\u0437 \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0430\u043c \u0432\u0435\u0440\u0441\u0438\u0438 Spark) \u201c\u043a\u0430\u043a \u0435\u0441\u0442\u044c\u201d. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u043d \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u043c\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a \u0432\u0435\u0440\u0441\u0438\u0438:<\/p>\n<pre><code>ARG java_image_tag=11-jre-slim  FROM openjdk:${java_image_tag}  ARG spark_uid=185  RUN set -ex &amp;&amp; \\     sed -i 's\/http:\\\/\\\/deb.\\(.*\\)\/https:\\\/\\\/deb.\\1\/g' \/etc\/apt\/sources.list &amp;&amp; \\     apt-get update &amp;&amp; \\     ln -s \/lib \/lib64 &amp;&amp; \\     apt install -y bash tini libc6 libpam-modules krb5-user libnss3 procps &amp;&amp; \\     mkdir -p \/opt\/spark &amp;&amp; \\     mkdir -p \/opt\/spark\/examples &amp;&amp; \\     mkdir -p \/opt\/spark\/work-dir &amp;&amp; \\     touch \/opt\/spark\/RELEASE &amp;&amp; \\     rm \/bin\/sh &amp;&amp; \\     ln -sv \/bin\/bash \/bin\/sh &amp;&amp; \\     echo \"auth required pam_wheel.so use_uid\" &gt;&gt; \/etc\/pam.d\/su &amp;&amp; \\     chgrp root \/etc\/passwd &amp;&amp; chmod ug+rw \/etc\/passwd &amp;&amp; \\     rm -rf \/var\/cache\/apt\/*  # \u0417\u0414\u0415\u0421\u042c \u0411\u0423\u0414\u0415\u0422 \u041d\u0410\u0428\u0410 \u0412\u0421\u0422\u0410\u0412\u041a\u0410, \u0413\u0414\u0415 \u0421\u041a\u0410\u0427\u0418\u0412\u0410\u0415\u0422\u0421\u042f \u0414\u0418\u0421\u0422\u0420\u0418\u0411\u0423\u0422\u0418\u0412 SPARK  COPY jars \/opt\/spark\/jars COPY bin \/opt\/spark\/bin COPY sbin \/opt\/spark\/sbin COPY kubernetes\/dockerfiles\/spark\/entrypoint.sh \/opt\/ COPY kubernetes\/dockerfiles\/spark\/decom.sh \/opt\/ COPY examples \/opt\/spark\/examples COPY kubernetes\/tests \/opt\/spark\/tests COPY data \/opt\/spark\/data  ENV SPARK_HOME \/opt\/spark  # \u0417\u0414\u0415\u0421\u042c \u0411\u0423\u0414\u0415\u0422 \u041d\u0410\u0428\u0410 \u0412\u0421\u0422\u0410\u0412\u041a\u0410, \u0413\u0414\u0415 \u0423\u0421\u0422\u0410\u041d\u0410\u0412\u041b\u0418\u0412\u0410\u0415\u0422\u0421\u042f CASSANDRA CONNECTOR  WORKDIR \/opt\/spark\/work-dir RUN chmod g+w \/opt\/spark\/work-dir RUN chmod a+x \/opt\/decom.sh  ENTRYPOINT [ \"\/opt\/entrypoint.sh\" ] USER ${spark_uid}<\/code><\/pre>\n<p>\u0412 \u043e\u0431\u0449\u0438\u0445 \u0447\u0435\u0440\u0442\u0430\u0445 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a \u0434\u043b\u044f Spark<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e \u044d\u0442\u0438\u043c \u043f\u0430\u043f\u043a\u0430\u043c \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0438\u0437 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043f\u043e\u043a \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0430<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 <code>\/opt\/entrypoint.sh<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u0430\u043f\u0443\u0441\u043a Spark Driver\/Executor \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c Spark \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 Kubernetes<\/p>\n<\/li>\n<li>\n<p><code>USER ${spark_uid}<\/code> \u2014 \u0437\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0438\u0437-\u043f\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <code>spark<\/code> (\u0432\u043c\u0435\u0441\u0442\u043e root)<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u0443\u0449\u0435\u0440\u0431\u0430 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430?<\/p>\n<ul>\n<li>\n<p>\u041f\u0430\u043a\u0435\u0442\u044b <code>libpam-modules<\/code> \u0438 <code>krb5-user<\/code> \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0434\u0430\/\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0447\u043a\u0443 \u043a\u043e\u043c\u0430\u043d\u0434 COPY \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u0443 <code>RUN mv \u2026 &amp;&amp; mv \u2026 &amp;&amp; mv \u2026<\/code>, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0447\u0438\u0441\u043b\u043e \u0441\u043b\u043e\u0451\u0432<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043e\u043a <code>examples, tests, data<\/code> \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0438\u0445 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u0443\u044e \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0432 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code># \u0412\u0421\u0422\u0410\u0412\u041a\u0410: \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0438 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0441 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u043c Spark \u043d\u0443\u0436\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 RUN mkdir -p \/tmp &amp;&amp; cd $_ &amp;&amp; \\ wget -nv -O spark.tgz https:\/\/archive.apache.org\/...\/spark-3.3.2.tgz &amp;&amp; \\ tar -xf spark.tgz --strip-components=1 &amp;&amp; \\ chown -R spark:spark .<\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, <s>\u043d\u043e \u043d\u0430 \u043c\u043e\u0435\u043c dialup<\/s> \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Spark \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0443 \u043e-\u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c <code>COPY spark.tgz .<\/code>, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0432 \u0441\u0442\u0430\u0432\u0448\u0438\u0439 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u043c <code>wget<\/code>.<\/p>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c, \u043d\u0430\u0448 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 Spark Kubernetes Executor \u0433\u043e\u0442\u043e\u0432, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432 \u043d\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h3>\u041f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0430\u0434\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438<\/h3>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0435\u043c \u0441\u043a\u0435\u043b\u0435\u0442 \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e Dockerfile, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 multistage build. \u0412\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u201c\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439\u201d \u0441\u0431\u043e\u0440\u043a\u0438 (\u0435\u0441\u043b\u0438 \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u0432\u0435):<\/p>\n<pre><code>### \u0421\u0422\u0410\u0414\u0418\u042f 1: \u0421\u0431\u043e\u0440\u043a\u0430 Python FROM openjdk:11-jre-slim AS python3_builder # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Python, pip, venv \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 requirements.txt  ...  ### \u0421\u0422\u0410\u0414\u0418\u042f 2: Cassandara Connector \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 FROM openjdk:11-jre-slim AS cassandra_connector_builder ...  ### \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0434\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 FROM openjdk:11-jre-slim COPY --from=python3_builder ...  # \u0412\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 Dockerfile \u0441\u043e Spark, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 ...<\/code><\/pre>\n<p>\u0418 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 Python, \u0433\u0434\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f  <code>python:2.7.18-slim-buster<\/code>, \u0430 JDK \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code>### \u0421\u0422\u0410\u0414\u0418\u042f 1: \u0421\u0431\u043e\u0440\u043a\u0430 Python FROM python:2.7.18-slim-buster AS python2_builder # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 venv \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 requirements.txt  ...  ### \u0421\u0422\u0410\u0414\u0418\u042f 2: Cassandara Connector \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 FROM openjdk:11-jre-slim AS cassandra_connector_builder ...  ### \u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0434\u0438\u044f \u0441\u0431\u043e\u0440\u043a\u0438 FROM python:2.7.18-slim-buster COPY --from=python2_builder \/opt\/venv \/opt\/venv  # \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Java \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 RUN apt-get install -y temurin-8-jdk ENV JAVA_HOME=\/usr\/lib\/jvm\/temurin-8-jdk-amd64 ENV PATH=\"$JAVA_HOME\/bin:$PATH\"  # \u0412\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 Dockerfile \u0441\u043e Spark, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 ...<\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0433\u043b\u044f\u0434\u044f \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 Dockerfile, \u0432\u044b \u0441\u043a\u0430\u0436\u0435\u0442\u0435, \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 JDK \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 stage \u0438 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u0430\u0432\u044b. \u0421\u043a\u0430\u0436\u0443 \u0431\u043e\u043b\u044c\u0448\u0435 \u2014 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0442\u0430\u043a \u0438 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0438 \u0434\u0430\u0436\u0435 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041d\u043e \u0431\u044b\u043b\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0434\u0432\u0430 \u0443\u043b\u043e\u0432\u0438\u043c\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e) \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 <s>\u043e\u0442 \u0433\u0440\u0435\u0445\u0430 \u043f\u043e\u0434\u0430\u043b\u044c\u0448\u0435<\/s> \u0432 \u0446\u0435\u043b\u044f\u0445 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c (\u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438) \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 multistage build \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 JDK \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0437.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Python<\/h3>\n<p>\u0412\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u201c\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439&#187; \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code>### \u0421\u0422\u0410\u0414\u0418\u042f 1: \u0421\u0431\u043e\u0440\u043a\u0430 Python FROM openjdk:11-jre-slim AS python3_builder  RUN apt-get update &amp;&amp; \\     apt install -y wget python3.9 python3.9-distutils libpython3.9 &amp;&amp; \\     update-alternatives --install \/usr\/bin\/python3 python3 \/usr\/bin\/python3.9 1 &amp;&amp; \\     update-alternatives --install \/usr\/bin\/python python \/usr\/bin\/python3.9 1 &amp;&amp; \\     wget https:\/\/bootstrap.pypa.io\/get-pip.py &amp;&amp; \\     python3.9 get-pip.py  COPY requirements.txt .  RUN pip install --upgrade pip &amp;&amp; \\     pip install virtualenv &amp;&amp; \\     virtualenv \/opt\/venv &amp;&amp; \\     . \/opt\/venv\/bin\/activate &amp;&amp; \\     pip install -r requirements.txt<\/code><\/pre>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0433\u043a\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439, \u0438 \u043e\u0431\u0440\u0430\u0449\u0443 \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438:<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 pip \u0447\u0435\u0440\u0435\u0437 <code>get-pip.py<\/code> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0447\u0435\u043c <code>apt install python3-pip<\/code><\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 slim-\u043e\u0431\u0440\u0430\u0437, \u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430  \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a <code>python3.9-distutils, libpython3.9<\/code> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 <s>\u043f\u0438\u0445\u0430\u0435\u0442\u0435 \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u0443 \u043a\u0443\u0447\u0443<\/s> \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435 \u043e\u0431\u0440\u0430\u0437 \u0431\u0435\u0437 multistage build, \u0442\u043e \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0434\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043a\u044d\u0448 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 pip (<code>--no-cache-dir<\/code> \u0434\u043b\u044f pip)<\/p>\n<\/li>\n<li>\n<p>\u0411\u0443\u0434\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0438\u0434\u0435\u0435\u0439 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u0443 <code>venv<\/code> \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438, \u0430 \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c:<\/p>\n<\/li>\n<\/ul>\n<pre><code>COPY --from=python3_builder \/opt\/venv \/opt\/venv SHELL [\"\/bin\/bash\", \"-c\"] RUN . \/opt\/venv\/bin\/activate<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 Docker-\u0441\u0431\u043e\u0440\u043a\u0438 \u0441\u043e \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Python, \u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e Python v2.7.18  <s>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0443\u0437\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0434\u043a\u043e\u0441\u0442\u044c\u044e<\/s> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Debian, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0432\u0437\u044f\u0442\u044c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043e\u0431\u0440\u0430\u0437 <code>python:2.7.18-slim-buster<\/code> (\u043a\u0430\u043a \u0438 \u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432\u043e 2-\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Dockerfile) \u043b\u0438\u0431\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c Python \u201c\u0441 \u043d\u0443\u043b\u044f\u201c.<\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0441\u0431\u043e\u0440\u043a\u0430 Python \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0440\u0435\u043c\u044f\u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430. \u0418 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043a\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043b\u043e\u0435\u0432 \u0432 Docker \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0432\u0441\u0435 \u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435. \u0410 \u0435\u0433\u043e \u0438 \u0442\u0430\u043a \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u201c\u0431\u0443\u0442\u044b\u043b\u043e\u0447\u043d\u043e\u0435 \u0433\u043e\u0440\u043b\u044b\u0448\u043a\u043e\u201d \u0432\u043e \u0432\u0441\u0435\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e requirements.txt, \u0442\u043e \u0432\u0430\u043c, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0434\u043b\u044f Pyspark (\u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c):<\/p>\n<pre><code>pyspark==3.3.2 py4j&gt;=0.10.9.5 grpcio&lt;1.57 grpcio-status&lt;1.57 googleapis-common-protos==1.56.4 ...<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Cassandara Connector<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u044b\u0445 Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 Docker-\u043e\u0431\u0440\u0430\u0437\u044b \u0441\u043e Spark. \u0422\u0430\u043a \u0447\u0442\u043e Cassandara Connector \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0430\u0441\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0418 \u044d\u0442\u043e\u0442 \u044d\u0442\u0430\u043f \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u0430\u043c\u044b\u043c <s>\u0432\u044b\u043c\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c<\/s> \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043a\u0432\u0435\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0439\u0442\u0438.<\/p>\n<p>\u042f \u043d\u0435 Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e-\u0442\u043e \u0443\u043f\u0443\u0441\u043a\u0430\u044e. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043f\u043e\u0441\u043b\u0435 \u0441\u0435\u0440\u0438\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043e \u0441\u0431\u043e\u0440\u043a\u043e\u0439<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-453142","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/453142","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=453142"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/453142\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=453142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=453142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=453142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}