storm打jar包执行报错问题You're probably bundling the Storm jars with your topology jar.

在storm项目中,打好jar包,到集群环境下运行报错:

原因:

在storm-core包中有defaults.yaml这个文件,因为默认maven打包的scope是compile,所以maven打包后,本地的storm-core包也被打入的jar,由于集群环境中,也存在storm-core包,所以会出现文件defaults.yaml重复的错误。

解决办法:

1、可以在打包后删除该文件;

2、也可以设置storm-core包的scope,如下:

<dependency>

    <groupId>org.apache.storm</groupId>

    <artifactId>storm-core</artifactId>

    <version>${storm.version}</version>

    <scope>provided</scope>

</dependency>

猜你喜欢

转载自blog.csdn.net/qq_28286027/article/details/88673418
今日推荐