Kubernetes上客户端模式下的Apache Spark:执行器Pod无法从Driver Pod复制应用程序jar

时间:2019-04-16 09:02:26

标签: apache-spark kubernetes

环境: 斯巴达克:2.4.0 Kubernetes:1.14

查询:应用程序jar是否需要既是Driver映像又是Executor映像的一部分?

调用点(来自Java代码): sparkLaunch =新的SparkLauncher()

                              .setMaster(LINUX_MASTER) 
                            .setAppResource(LINUX_APP_RESOURCE) 
                            .setConf("spark.app.name",APP_NAME) 
                            .setMainClass(MAIN_CLASS) 
                            .setConf("spark.executor.instances",EXECUTOR_COUNT) 
                            .setConf("spark.kubernetes.container.image",CONTAINER_IMAGE) 
                            .setConf("spark.kubernetes.driver.pod.name",DRIVER_POD_NAME) 
                            .setConf("spark.kubernetes.container.image.pullSecrets",REGISTRY_SECRET) 
                            .setConf("spark.kubernetes.authenticate.driver.serviceAccountName",SERVICE_ACCOUNT_NAME) 
                            .setConf("spark.driver.host", SERVICE_NAME + "." + NAMESPACE + ".svc.cluster.local") 
                                    .setConf("spark.driver.port", DRIVER_PORT) 
                            .setDeployMode("client") 
                            ; 

场景: 我正在尝试在客户端模式下的K8s上运行Spark。当我将应用程序jar映像同时放在驱动程序和执行程序中时,程序会被罚款。

但是,如果仅将应用程序jar放在驱动程序映像中,则会出现以下错误:

2019-04-16 06:36:44 INFO执行程序:54-正在获取文件:/opt/spark/examples/jars/reno-spark-codebase-0.1.0.jar,带有时间戳1555396592768 2019-04-16 06:36:44信息实用工具:54-将/opt/spark/examples/jars/reno-spark-codebase-0.1.0.jar复制到/ var / data / spark-d24c8fbc-4fe7-4968- 9310-f891a097d1e7 / spark-31ba5cbb-3132-408c-991a-795 2019-04-16 06:36:44错误执行器:91-任务0.1在阶段0.0(TID 2)中发生异常 java.nio.file.NoSuchFileException:/opt/spark/examples/jars/reno-spark-codebase-0.1.0.jar         在java.base / sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)         在java.base / sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)         在java.base / sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)         在java.base / sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:548)         在java.base / sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:254)         在java.base / java.nio.file.Files.copy(Files.java:1294)         位于org.apache.spark.util.Utils $ .org $ apache $ spark $ util $ Utils $$ copyRecursive(Utils.scala:664)         在org.apache.spark.util.Utils $ .copyFile(Utils.scala:635)         在org.apache.spark.util.Utils $ .doFetchFile(Utils.scala:719)         在org.apache.spark.util.Utils $ .fetchFile(Utils.scala:496)         在org.apache.spark.executor.Executor $$ anonfun $ org $ apache $ spark $ executor $ Executor $$ updateDependencies $ 5.apply(Executor.scala:805)         在org.apache.spark.executor.Executor $$ anonfun $ org $ apache $ spark $ executor $ Executor $$ updateDependencies $ 5.apply(Executor.scala:797)         在scala.collection.TraversableLike $ WithFilter $$ anonfun $ foreach $ 1.apply(TraversableLike.scala:733)         在scala.collection.mutable.HashMap $$ anonfun $ foreach $ 1.apply(HashMap.scala:130)         在scala.collection.mutable.HashMap $$ anonfun $ foreach $ 1.apply(HashMap.scala:130)         在scala.collection.mutable.HashTable $ class.foreachEntry(HashTable.scala:236)         在scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)         在scala.collection.mutable.HashMap.foreach(HashMap.scala:130)         在scala.collection.TraversableLike $ WithFilter.foreach(TraversableLike.scala:732)         在org.apache.spark.executor.Executor.org $ apache $ spark $ executor $ Executor $$ updateDependencies(Executor.scala:797)         在org.apache.spark.executor.Executor $ TaskRunner.run(Executor.scala:369)         在java.base / java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)         在java.base / java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:628)         在java.base / java.lang.Thread.run(Thread.java:834)

0 个答案:

没有答案