Spark: amostra Pi lança NoSuchFileException no modo cluster

Spark: amostra Pi lança NoSuchFileException no modo cluster

Eu configurei um cluster Spark 2.3.1, no entanto, tenho problemas para enviar um trabalho de amostra do SparkPi para ele:

Running Spark using the REST application submission protocol.
2018-09-06 13:45:53 INFO  RestSubmissionClient:54 - Submitting a request to launch an application in spark://10.0.15.7:7077.
2018-09-06 13:46:04 WARN  RestSubmissionClient:66 - Unable to connect to server spark://10.0.15.7:7077.
Warning: Master endpoint spark://10.0.15.7:7077 was not a REST server. Falling back to legacy submission gateway instead.
2018-09-06 13:46:04 WARN  NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2018-09-06 13:46:10 ERROR ClientEndpoint:70 - Exception from cluster was: java.nio.file.NoSuchFileException: /opt/spark/examples/jars/spark-examples_2.11-2.3.1.jar
java.nio.file.NoSuchFileException: /opt/spark/examples/jars/spark-examples_2.11-2.3.1.jar
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:526)
    at sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:253)
    at java.nio.file.Files.copy(Files.java:1274)
    at org.apache.spark.util.Utils$.org$apache$spark$util$Utils$$copyRecursive(Utils.scala:632)
    at org.apache.spark.util.Utils$.copyFile(Utils.scala:603)
    at org.apache.spark.util.Utils$.doFetchFile(Utils.scala:688)
    at org.apache.spark.util.Utils$.fetchFile(Utils.scala:485)
    at org.apache.spark.deploy.worker.DriverRunner.downloadUserJar(DriverRunner.scala:155)
    at org.apache.spark.deploy.worker.DriverRunner.prepareAndRunDriver(DriverRunner.scala:173)
    at org.apache.spark.deploy.worker.DriverRunner$$anon$1.run(DriverRunner.scala:92)

O script de envio que estou usando:

bin/spark-submit \
    --master spark://10.0.15.7:7077 \
    --deploy-mode cluster \
    --name spark-pi \
    --class org.apache.spark.examples.SparkPi \
    --conf spark.kubernetes.container.image=gcr.io/my-project/spark:spark-test \
    --conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
    --conf spark.executor.instances=3 \
    /opt/spark/examples/jars/spark-examples_2.11-2.3.1.jar 1000

Eu construí a gcr.io/my-project/spark:spark-testimagem usando o padrão

bin/docker-image-tool.sh -r gcr.io/my-project -t spark-test build push

o mesmo /opt/spark/examples/jars/spark-examples_2.11-2.3.1.jaracontece no contêiner. Confirmado:

docker run --rm -it --entrypoint "/bin/ls" gcr.io/my-project/spark:spark-test -l /opt/spark/examples/jars/

Meu cluster Spark é executado no Kubernetes. Estou usando spark://um esquema, não um novo k8s://https://esquema, então deve funcionar como um cluster normal do Spark. IP e portas são visíveis, incluindo Spark Web UI.

Não entendo onde ele tenta procurar o arquivo jar.

Tentei acrescentar path com local://, como nos exemplos do Spark: https://spark.apache.org/docs/2.3.1/running-on-kubernetes.html mas não funciona com spark://URL mestre, gera No FileSystem for scheme: localexceção.

O RBAC é configurado de acordo com o URL acima, todos os pods usam sparkconta de serviço.

Estou sem ideias.

informação relacionada