dongjoon-hyun commented on code in PR #36374:
URL: https://github.com/apache/spark/pull/36374#discussion_r861221701
##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/MountVolumesFeatureStep.scala:
##########
@@ -120,6 +122,20 @@ private[spark] class MountVolumesFeatureStep(conf:
KubernetesConf)
override def getAdditionalKubernetesResources(): Seq[HasMetadata] = {
additionalResources.toSeq
}
+
+ private def checkPVCClaimNameWhenMultiExecutors(claimName: String): Unit = {
+ val invalidClaimName =
+ if (!claimName.contains(PVC_ON_DEMAND) &&
!claimName.contains(ENV_EXECUTOR_ID)) true
+ else false
+
+ val executorInstances = conf.get(EXECUTOR_INSTANCES)
+ if (executorInstances.isEmpty) return
+ if (invalidClaimName && executorInstances.get > 1) {
+ throw new IllegalArgumentException("PVC ClaimName should contain " +
+ PVC_ON_DEMAND + " or " + ENV_EXECUTOR_ID +
+ " when multiple executors are required")
Review Comment:
The error message looks informative but please include **the current claim
name** in the error message too.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]