Skip to content

Commit 78adb11

Browse files
committed
[DOP-31004] Set Spark driver pod name for K8S
1 parent 4117c52 commit 78adb11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

syncmaster/worker/spark.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import logging
66
import math
7+
import socket
78
from typing import TYPE_CHECKING
89

910
from onetl.connection.kerberos_helpers import kinit_password
@@ -85,6 +86,9 @@ def get_spark_session_conf(
8586
config["spark.dynamicAllocation.maxExecutors"] = tasks # yarn
8687
config["spark.kubernetes.executor.limit.cores"] = cores_per_task # k8s
8788

89+
# https://spark.apache.org/docs/latest/running-on-kubernetes.html#client-mode-executor-pod-garbage-collection
90+
config["spark.kubernetes.driver.pod.name"] = socket.gethostname()
91+
8892
if maven_packages:
8993
log.debug("Include Maven packages: %s", maven_packages)
9094
config["spark.jars.packages"] = ",".join(maven_packages)

0 commit comments

Comments
 (0)