Last active
September 23, 2018 17:29
-
-
Save mvillarrealb/03832b4a669acd27853d86db0ba14559 to your computer and use it in GitHub Desktop.
A custom docker image based on spark-base:2.3.1 image, used to create a spark-submit containers that runs and die once they delivered the driver program to the cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/spark/bin/spark-submit \ | |
--class ${SPARK_APPLICATION_MAIN_CLASS} \ | |
--master ${SPARK_MASTER_URL} \ | |
--deploy-mode cluster \ | |
--total-executor-cores 1 \ | |
${SPARK_SUBMIT_ARGS} \ | |
${SPARK_APPLICATION_JAR_LOCATION} \ | |
${SPARK_APPLICATION_ARGS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM spark-base:2.3.1 | |
COPY spark-submit.sh / | |
ENV SPARK_MASTER_URL="spark://spark-master:7077" | |
ENV SPARK_SUBMIT_ARGS="" | |
ENV SPARK_APPLICATION_ARGS "" | |
#ENV SPARK_APPLICATION_JAR_LOCATION /opt/spark-apps/myjar.jar | |
#ENV SPARK_APPLICATION_MAIN_CLASS my.main.Application | |
CMD ["/bin/bash", "/spark-submit.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment