首页 > 解决方案 > 通过 livy 提交存储在 github 中的文件以触发 spark

问题描述

我正在尝试通过 livy 运行火花工作。我正在创建一个活跃的批处理会话,我需要文件参数是一个 github URI(类似这样 - https://raw.githubusercontent.com/repo/branch/path/to/file/filename?token=asdasdasd)(如果回购是私有的,将包括令牌)

LivyBatch.create(url = <livy_server_url>,
                 file = <>
                 args = <args>,
                 spark_conf = <pyspark_config>)

当我尝试这样做时,我收到以下错误消息:WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Exception in thread "main" org.apache.spark.SparkException: Failed to get main class in JAR with error 'null'. Please specify one with --class.

当我提供file参数作为aws s3路径时,我能够成功运行相同的代码。

标签: githubpysparklivy

解决方案


推荐阅读