无法使用 Spark 提交找到 akka 配置
Unable to find akka Configurations with Spark Submit
我构建了一个 fat jar,我正在尝试 运行 在 EMR 或本地通过 spark-submit 对其进行提交。这是命令:
spark-submit \
--deploy-mode client \
--class com.stash.data.omni.source.Runner myJar.jar \
<arguments>
我不断收到与 akka 配置相关的错误:
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.version'
似乎 jar 根本找不到 akka 的 reference.conf
s。有人处理过这个吗?我可以 运行 它无需在我的本地机器上提交 spark-submit 。
我认为问题在于将其所有依赖项捆绑到一个 jar 中,这会导致 Akka 出现问题,如 documentation:
中所述
Akka’s configuration approach relies heavily on the notion of every
module/jar having its own reference.conf file. All of these will be
discovered by the configuration and loaded. Unfortunately this also
means that if you put/merge multiple jars into the same jar, you need
to merge all the reference.conf files as well: otherwise all defaults
will be lost.
您可以按照此 documentation 打包您的应用程序和进程以合并 reference.conf
资源,而 bundling.It 讨论使用 sbt、maven 和 gradle 进行打包。
如果有帮助请告诉我!!
这是我的合并策略。我一网打尽 case _ => MergeStrategy.first
。我将其更改为 case x => MergeStrategy.defaultMergeStrategy(x)
并且有效。
我构建了一个 fat jar,我正在尝试 运行 在 EMR 或本地通过 spark-submit 对其进行提交。这是命令:
spark-submit \
--deploy-mode client \
--class com.stash.data.omni.source.Runner myJar.jar \
<arguments>
我不断收到与 akka 配置相关的错误:
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.version'
似乎 jar 根本找不到 akka 的 reference.conf
s。有人处理过这个吗?我可以 运行 它无需在我的本地机器上提交 spark-submit 。
我认为问题在于将其所有依赖项捆绑到一个 jar 中,这会导致 Akka 出现问题,如 documentation:
中所述Akka’s configuration approach relies heavily on the notion of every module/jar having its own reference.conf file. All of these will be discovered by the configuration and loaded. Unfortunately this also means that if you put/merge multiple jars into the same jar, you need to merge all the reference.conf files as well: otherwise all defaults will be lost.
您可以按照此 documentation 打包您的应用程序和进程以合并 reference.conf
资源,而 bundling.It 讨论使用 sbt、maven 和 gradle 进行打包。
如果有帮助请告诉我!!
这是我的合并策略。我一网打尽 case _ => MergeStrategy.first
。我将其更改为 case x => MergeStrategy.defaultMergeStrategy(x)
并且有效。