Thanks Chris for your guidance.Your maven commands have worked really.
I have been able to build the source and generate the binary distribution
as well using below steps.
>mvn -Denforcer.skip=true -DrecompileMode=all -Pkubernetes -Pvolcano
-Pscala-2.12 -DskipTests clean package
>dev/./make-distribution.sh -Pkubernetes -Denforcer.skip=true
-DrecompileMode=all -Pkubernetes -Pvolcano -Pscala-2.12 -DskipTests
>docker build -t spark3.3.2_gnana_volcano_scheduler_snapshot
-f kubernetes/dockerfiles/spark/Dockerfile .
>docker push spark3.3.2_gnana_volcano_scheduler_snapshot:latest
spark_3.3.2/bin/spark-submit \
--verbose \
--class com.demo.spark.SpringBootStarter \
--master k8s://https://$KUBERNETES_MASTER_IP:443 \
--deploy-mode cluster \
--name sparkSampleApp2 \
--conf spark.kubernetes.namespace=default \
--conf spark.network.timeout=300 \
--conf spark.executor.instances=1 \
--conf spark.kubernetes.scheduler.name=volcano \
--conf
spark.kubernetes.scheduler.volcano.podGroupTemplateFile=/home/gnana_kumar123/spark/volcano_spark_podgroup_template_low_priority.yaml
\
--conf
spark.kubernetes.driver.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep
\
--conf
spark.kubernetes.executor.pod.featureSteps=org.apache.spark.deploy.k8s.features.VolcanoFeatureStep
\
But unfortunately, when I run the Spark-Submit to run spark job in
Kubernetes Cluster, it says class not found exception.
Please find the exception from Spark-Submit.
Using Spark's default log4j profile:
org/apache/spark/log4j-defaults.properties
22/11/20 12:40:52 INFO SparkKubernetesClientFactory: Auto-configuring K8S
client using current context from users K8S config file
Exception in thread "main" java.lang.ClassNotFoundException:
org.apache.spark.deploy.k8s.features.VolcanoFeatureStep
So,I have extracted the jar from dist/jars and I have verified that
Spark-kubernetes jar has the VolcanoFeatureStep.class but I'm not sure if
it is really packed within docker image.
Thanks
Gnana
On Sat, Nov 19, 2022 at 12:27 AM Chris Nauroth wrote:
> Hello Gnana,
>
> I'm bringing this thread back to the user@ list for the benefit of anyone
> else who might want to try this feature.
>
> Running this from the root of the source tree should give you a working
> full build with Kubernetes and the experimental Volcano feature, using
> Scala 2.12:
>
> build/mvn -Pkubernetes -Pvolcano -Pscala-2.12 -DskipTests clean package
>
> If you want to use Scala 2.13, it would be this:
>
> dev/change-scala-version.sh 2.13
> build/mvn -Pkubernetes -Pvolcano -Pscala-2.13 -DskipTests clean package
>
> I don't expect you'd need to replace all jars in your deployment. However,
> in addition to spark-kubernetes.jar, I expect you'll need to get the
> Volcano client classes onto the classpath. Those are in
> volcano-client-5.12.2.jar and volcano-model-v1beta1-5.12.2.jar.
>
> I haven't tested this new feature myself, so I don't know if there are
> other steps you'll hit after this. Speaking just in terms of what the build
> does though, this should be sufficient.
>
> I hope this helps.
>
> Chris Nauroth
>
>
> On Thu, Nov 17, 2022 at 11:32 PM Gnana Kumar
> wrote:
>
>> I have maven built the spark-kubernetes jar (
>> spark-kubernetes_2.12-3.3.2-SNAPSHOT ) but when I build parent spark
>> directory , the build fails.
>>
>> mvn clean install -Denforcer.skip=true -Pvolcano -DskipTests
>> -Dcheckstyle.skip
>>
>> On Fri, Nov 18, 2022 at 12:47 PM Gnana Kumar
>> wrote:
>>
>>> Also please confirm if I have to use the SNAPSHOT version of all Spark
>>> jars for Volcano scheduling or only kubernete jar
>>> (spark-kubernetes_2.12-3.3.2-SNAPSHOT.jar) is alone enough to perform
>>> scheduling.
>>>
>>> Thanks
>>> Gnana
>>>
>>> On Fri, Nov 18, 2022 at 10:27 AM Gnana Kumar
>>> wrote:
>>>
Hi Chris,
Thanks for the clarification.
I have tried the below steps but getting below error. Please help me to
resolve this error and I would need the Volcano feature available in my
Spark-Kubernetes Jar.
>git clone https://github.com/apache/spark.git -b branch-3.3
>cd spark
>mvn clean install -Denforcer.skip=true -Pvolcano -DskipTests
[INFO]
[INFO] Reactor Summary for Spark Project Parent POM 3.3.2-SNAPSHOT:
[INFO]
[INFO] Spark Project Parent POM ... SUCCESS
[02:02 min]
[INFO] Spark Project Tags . FAILURE [
16.548 s]
[INFO] Spark Project Sketch ... SKIPPED
[INFO] Spark Project Local DB . SKIPPED
[INFO] Spark Project Networking ... SKIPPED
[INFO] Spark Project Shuffle Streaming Service SKIPPED
[INFO] Spark Project Unsafe