viirya commented on a change in pull request #32564:
URL: https://github.com/apache/spark/pull/32564#discussion_r633252620
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
##########
@@ -70,6 +70,15 @@ private[spark] object Config extends Logging {
.booleanConf
.createWithDefault(false)
+ val KUBERNETES_DRIVER_REUSE_PVC =
+ ConfigBuilder("spark.kubernetes.driver.reusePersistentVolumeClaim")
+ .doc("If true, driver pod tries to reuse driver-owned on-demand
persistent volume claims " +
Review comment:
Do we need "driver" in the config name? We reuse executor PVCs, right?
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
##########
@@ -70,6 +70,15 @@ private[spark] object Config extends Logging {
.booleanConf
.createWithDefault(false)
+ val KUBERNETES_DRIVER_REUSE_PVC =
+ ConfigBuilder("spark.kubernetes.driver.reusePersistentVolumeClaim")
+ .doc("If true, driver pod tries to reuse driver-owned on-demand
persistent volume claims " +
+ "of the deleted executor pods. This can be useful to reduce executor
pod creation delay. " +
+ s"This requires ${KUBERNETES_DRIVER_OWN_PVC.key}=true.")
Review comment:
Should we add more description? For example, like the description, the
PVC of removed executors may not be returned immediately, so it is possibly new
PVC will still be created.
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/ExecutorPodsAllocator.scala
##########
@@ -125,6 +125,14 @@ private[spark] class ExecutorPodsAllocator(
newlyCreatedExecutors --= k8sKnownExecIds
schedulerKnownNewlyCreatedExecs --= k8sKnownExecIds
+ // Although we are going to delete some executors due to timeout in this
function,
+ // it takes undefined time before the actual deletion. Hence, we should
collect all PVCs
+ // in use at the beginning. False positive is okay in this context in
order to be safe.
Review comment:
Does it mean the PVCs here include both in-use and not in-use (from
removed executors)?
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
##########
@@ -70,6 +70,15 @@ private[spark] object Config extends Logging {
.booleanConf
.createWithDefault(false)
+ val KUBERNETES_DRIVER_REUSE_PVC =
+ ConfigBuilder("spark.kubernetes.driver.reusePersistentVolumeClaim")
+ .doc("If true, driver pod tries to reuse driver-owned on-demand
persistent volume claims " +
+ "of the deleted executor pods. This can be useful to reduce executor
pod creation delay. " +
+ s"This requires ${KUBERNETES_DRIVER_OWN_PVC.key}=true.")
Review comment:
At least I think it is better to let the users know, the PVC of removed
executor might not be reuse for all cases (e.g., shown in the PR description).
Otherwise, it might be confusing, e.g. "why I set the reuse config, but the PVC
is not reused...", etc..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]