jar - 如何在 dcos spark run 中传递 jar 文件(来自 Artifactory)?
问题描述
我正在尝试在 DC/OS 平台上运行 spark 流作业,但我遇到了 kafka 包的问题。当我尝试使用以下--jars
模式包含 Kafka 库及其依赖项(从 Maven 下载的 jar 文件,添加到工件并从那里读取)时:
dcos spark run --submit-args"--jars https://../../../spark-streaming 2.11-2.2.1.jar --conf spark.executor.memory=2g --py-files=https://../../../libs.zip,https://../../../test.py etc"
似乎 file libs.zip
, test.py 被正确读取,但.jar
file 被省略。
知道为什么吗?这类问题有什么解决方法吗?
提前感谢您的帮助!
解决方案
I'm not sure why the dcos spark submit
command doesn't support --jar
option, but you can use the spark.mesos.uris
property to download artifacts to the working directory of a Spark driver and executor.
I'm not sure how your Python-based Spark job is going to use JARs, but you may need setting the spark.executor.extraClassPath
and spark.driver.extraClassPath
configuration property as well.
推荐阅读
- atom-editor - Atom.io - 单击树中的文件时,为什么不再切换到该文件?
- haskell - 我第一次设置 Haskell 开发环境的经验是常见的还是一次性的?
- python - tensorflow 2.0 模型预测和调用方法不一致。调用方法因 InvalidArgumentError 而失败
- angular - 安装 @type/vis 和 vis 后定义 DataView 时发生冲突
- c++ - 为什么我不能在 std::enable_if 中使用 std::is_same?
- r - for 循环迭代字符值
- javascript - discord.js-commando TypeError: this.fetchUser 不是一个函数
- java - 通过代理服务器连接到数据库休眠、JDBC
- python - 在 pandas 中创建 n 个行的副本
- python-3.x - 如果将 Firebase 广告和分析添加到 buildozer.spec 并请求广告,Kivy Buildozer APK 会崩溃