首页 > 解决方案 > 驱动程序吊舱保持运行

问题描述

我使用以下命令在集群模式下在 Kubernetes 上运行 Spark 3.1.1:

command:
  - /opt/spark/bin/spark-submit
  - --deploy-mode
  - cluster
  - --name
  - "my_job_name"
  - --master
  - k8s://https://kubernetes.default.svc.cluster.local
  - --class
  - $(CLASS)
  - --conf
  - spark.kubernetes.namespace=my-namespace
  - --conf
  - spark.kubernetes.authenticate.driver.serviceAccountName=my-driver-sa
  - --conf
  - spark.kubernetes.driver.limit.cores=$(DRIVER_LIMIT_CORES)
  - --conf
  - spark.executor.instances=$(EXECUTOR_INSTANCES)
  - --conf
  - spark.executor.memory=$(EXECUTOR_MEMORY)
  - --conf
  - spark.executor.cores=$(EXECUTOR_CORES)
  - --conf
  - spark.kubernetes.executor.limit.cores=$(EXECUTOR_CORES)
  - --conf
  - spark.kubernetes.container.image=$(CONTAINER_REGISTRY)/$(IMAGE_REPOSITORY):$(TAG)
  - --conf
  - spark.jars.ivy=/tmp/.ivy
  - --conf
  - spark.eventLog.enabled=true
  - --conf
  - spark.eventLog.dir=$(EVENT_LOG_DIR)
  - --conf
  - spark.eventLog.rolling.enabled=true
  - --conf
  - spark.hadoop.fs.s3a.aws.credentials.provider=$(CREDS_PROVIDER)
  - --conf
  - spark.hadoop.fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem
  - local://$(APPLICATION_JAR)
  - -s
  - $(APP_ARG_1)
  - -d
  - $(APP_ARG_2)

一切似乎都正常,驱动程序 pod 正在启动,执行程序也在启动,做一些工作,终止,我看到驱动程序中的最后一个日志:

21/05/24 11:29:46 INFO SparkContext: Successfully stopped SparkContext

我的问题是驱动程序保持运行状态并且在工作完成后没有终止。

我错过了什么?

标签: scalaapache-sparkkubernetes

解决方案


推荐阅读