-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23984][K8S] Initial Python Bindings for PySpark on K8s #21092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fb5b9ed
b7b3db0
98cef8c
dc670dc
eabe4b9
8d3debb
91e2a2c
5761ee8
98cc044
678d381
bf738dc
c59068d
0344f90
306f3ed
f2fc53e
6f66d60
914ff75
d400607
72953a3
7bedeb6
1801e96
24a704e
6a6d69d
ab92913
a61d897
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,10 +67,8 @@ private[spark] case class KubernetesConf[T <: KubernetesRoleSpecificConf]( | |
| .map(str => str.split(",").toSeq) | ||
| .getOrElse(Seq.empty[String]) | ||
|
|
||
| def pyFiles(): Seq[String] = sparkConf | ||
| def pyFiles(): Option[String] = sparkConf | ||
| .get(KUBERNETES_PYSPARK_PY_FILES) | ||
| .map(str => str.split(",").toSeq) | ||
| .getOrElse(Seq.empty[String]) | ||
|
|
||
| def pySparkMainResource(): Option[String] = sparkConf | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems redundant with the driver specific spark conf's MainAppResource. Perhaps remove the need to specify this thing twice?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to parse out the MainAppResource (which I thought we should be doing only once... as such, I thought it would be cleaner to do this... |
||
| .get(KUBERNETES_PYSPARK_MAIN_APP_RESOURCE) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,7 +77,7 @@ private[spark] class BasicDriverFeatureStep( | |
| ("cpu", new QuantityBuilder(false).withAmount(limitCores).build()) | ||
| } | ||
|
|
||
| val driverContainer = new ContainerBuilder(pod.container) | ||
| val withoutArgsDriverContainer: ContainerBuilder = new ContainerBuilder(pod.container) | ||
|
||
| .withName(DRIVER_CONTAINER_NAME) | ||
| .withImage(driverContainerImage) | ||
| .withImagePullPolicy(conf.imagePullPolicy()) | ||
|
|
@@ -97,12 +97,20 @@ private[spark] class BasicDriverFeatureStep( | |
| .addToArgs(driverDockerContainer) | ||
| .addToArgs("--properties-file", SPARK_CONF_PATH) | ||
| .addToArgs("--class", conf.roleSpecificConf.mainClass) | ||
| // The user application jar is merged into the spark.jars list and managed through that | ||
| // property, so there is no need to reference it explicitly here. | ||
| .addToArgs(SparkLauncher.NO_RESOURCE) | ||
| .addToArgs(conf.roleSpecificConf.appArgs: _*) | ||
| .build() | ||
|
|
||
| val driverContainer = | ||
| if (driverDockerContainer == "driver-py") { | ||
|
||
| withoutArgsDriverContainer | ||
| .addToArgs(conf.roleSpecificConf.appArgs: _*) | ||
| .build() | ||
| } else { | ||
| // The user application jar is merged into the spark.jars list and managed through that | ||
| // property, so there is no need to reference it explicitly here. | ||
| withoutArgsDriverContainer | ||
| .addToArgs(SparkLauncher.NO_RESOURCE) | ||
| .addToArgs(conf.roleSpecificConf.appArgs: _*) | ||
| .build() | ||
| } | ||
| val driverPod = new PodBuilder(pod.pod) | ||
| .editOrNewMetadata() | ||
| .withName(driverPodName) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic appears to duplicated from YARN, would it make sense to factor this out into a common function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We chatted about this off-line and while its close its not exactly the same so we can deal with minor parts of duplication for now.