【发布时间】:2021-01-11 12:11:46
【问题描述】:
我正在尝试将 Storm 拓扑部署到本地独立集群。我将包含指向我的项目Github repo 的链接,以便您查看我的代码...
我有一个在本地模式下运行的simple Storm topology,我有一个tweaked to deploy 到一个Dockerized 集群(simple configuration 基于recommended instructions)。
但是,当我尝试让它运行时,我得到了这个错误:
Exception in thread "main" java.lang.NoClassDefFoundError: backtype/storm/topology/IRichSpout
从this question 看来,我只需要在构建topology.jar 时将storm-core 作为依赖项包含在我的Maven 项目中。
所以我将adjusted my pom.xml 文件(我没有使用Eclipse 或任何IDE,我只是从命令行运行Maven)包含storm-core 作为依赖项,并包含maven-assembly-plugin 来打包jar-with-dependencies。但是现在当我尝试运行集群时,我收到一条错误消息:
...
java.io.IOException: Found multiple defaults.yaml resources. You're probably bundling the Storm jars with your topology jar
...
那么我究竟应该将哪些内容作为捆绑依赖项包含在内?我需要在pom.xml 中添加/删除哪些代码行才能使其正常工作?
【问题讨论】:
标签: java docker maven jar apache-storm