dongjoon-hyun commented on a change in pull request #35786:
URL: https://github.com/apache/spark/pull/35786#discussion_r826491605
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/VolcanoFeatureStep.scala
##########
@@ -41,7 +42,15 @@ private[spark] class VolcanoFeatureStep extends
KubernetesDriverCustomFeatureCon
override def getAdditionalPreKubernetesResources(): Seq[HasMetadata] = {
val client = new DefaultVolcanoClient
- val template = kubernetesConf.getOption(POD_GROUP_TEMPLATE_FILE_KEY)
+
+ // Currently only driver/job-level PodGroup is supported
+ val template = if (kubernetesConf.isInstanceOf[KubernetesDriverConf]) {
+ kubernetesConf.getOption(POD_GROUP_TEMPLATE_FILE_KEY)
+ } else {
+ throw new
SparkException("VolcanoFeatureStep#getAdditionalPreKubernetesResources() is " +
+ "not supported for executor.")
+ }
+
val pg = template.map(client.podGroups.load(_).get).getOrElse(new
PodGroup())
Review comment:
If you want to throw exception, why we don't protect this, @Yikun ?
--
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]