TIBCOSoftware / snappy-on-k8s

An Integrated and collaborative cloud environment for building and running Spark applications on PKS/Kubernetes
81 stars 29 forks source link

Examples in README is not working #19

Closed qshao-pivotal closed 6 years ago

qshao-pivotal commented 6 years ago

Have to convert from spark.kubernetes.driver.docker.image to spark.kubernetes.driver.container.image, same as executor's param.

bin/spark-submit --master k8s://https://35.196.34.10:8443 \
--deploy-mode cluster \
--name spark-pi \
--class org.apache.spark.examples.SparkPi \
--conf spark.kubernetes.namespace=spark \
--conf spark.executor.instances=1 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.container.image=snappydatainc/spark-driver:v2.2.0-kubernetes-0.5.1 \
--conf spark.kubernetes.executor.container.image=snappydatainc/spark-executor:v2.2.0-kubernetes-0.5.1 \
local:///opt/spark/examples/jars/spark-examples_2.11-2.2.0-k8s-0.5.0.jar

Still got error after modification, driver log:

++ id -u
+ myuid=0
++ id -g
+ mygid=0
++ getent passwd 0
+ uidentry=root:x:0:0:root:/root:/bin/ash
+ '[' -z root:x:0:0:root:/root:/bin/ash ']'
+ /sbin/tini -s -- driver
[FATAL tini (11)] exec driver failed: No such file or directory
dshirish commented 6 years ago

The images are based on spark-on-k8s 2.2 repo. Are you using Spark 2.3? Version 2.2 has spark.kubernetes.driver.docker.image This appears to be changed to spark.kubernetes.driver.container.image in 2.3. The example works using 2.2 build.

qshao-pivotal commented 6 years ago

Got it. Thanks!