ME
Size: a a a
ME
ME
ME
OI
GT
export PYTHONPATH=/usr/local/bin/
export PYSPARK_PYTHON=python
export SPARK_HOME=/usr/local/airflow/spark
export JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/jdk8u252-b09/
export PATH=$SPARK_HOME/bin:$JAVA_HOME/bin:$PATH
export HOST_IP=$(ifconfig | grep 'inet 10.' | awk '{print $2}')
spark-submit \
--master k8s://master.aaa.abbb:8443 \
--conf spark.kubernetes.container.image=my-registry/spark/3.0.0/spark-py:latest \
--conf spark.kubernetes.authenticate.caCertFile=cert.crt \
--conf spark.kubernetes.authenticate.serviceAccountName=spark \
--conf spark.kubernetes.authenticate.oauthToken=$TOKEN \
--conf spark.kubernetes.namespace=my_namespace \
--conf spark.kubernetes.executor.limit.cores=0.2 \
--conf spark.kubernetes.executor.request.cores=0.2 \
--conf spark.executor.cores=1 \
--conf spark.executor.memory=600M \
--conf spark.executor.instances=20 \
--conf spark.kubernetes.memoryOverheadFactor=0.9 \
--conf spark.hadoop.fs.s3a.endpoint=https://s3.endpoint \
--conf spark.hadoop.fs.s3a.access.key=s3-key \
--conf spark.hadoop.fs.s3a.secret.key=s3-password \
--conf spark.hadoop.fs.s3a.path.style.access=true \
--conf spark.hadoop.fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem \
--conf spark.sql.codegen.wholeStage=false \
--conf spark.kubernetes.pyspark.pythonVersion=3 \
--conf spark.kubernetes.file.upload.path=s3a://some/path\
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
--conf spark.kubernetes.authenticate.driver.oauthToken=$TOKEN \
--conf spark.kubernetes.authenticate.submission.oauthToken=$TOKEN \
--conf spark.kubernetes.driver.limit.cores=1 \
--conf spark.driver.memory=4g \
--conf spark.kubernetes.namespace=my_namespace \
--files /location/of/my/schema.json \
--jars /usr/local/airflow/spark/jars/hadoop-aws-3.2.1.jar,/usr/local/airflow/spark/jars/httpclient-4.5.6.jar,/usr/local/airflow/spark/jars/joda-time-2.10.5.jar,/usr/local/airflow/spark/jars/spark-hive_2.12-3.0.0.jar \
--name my-job-name \
--deploy-mode cluster \
some_spark_job.py \
--table_name my-target-table \
--topic my-kafka-topic-name \
--dag_id 1111
OI
ME
N
N
N
N
ME
T
T
ME
GT
T
ME
ME
OI