简体   繁体   English

集群模式下的Apache Storm

[英]apache storm in cluster mode

i used apache storm to precessing data with kafka source, but where i run storm in cluster mode he return for me this erreur : i user this commande line storm jar /path to my jar file args1 我使用apache storm来通过kafka源处理数据,但是在群集模式下运行storm时,他为我返回了这个错误:我将此命令行风暴jar / path用作我的jar文件args1

Exception in thread "main" java.lang.RuntimeException: Found multiple defaults.yaml resources. You're probably bundling the Storm jars with your topology jar.
at backtype.storm.utils.Utils.findAndReadConfigFile(Utils.java:106)
at backtype.storm.utils.Utils.readDefaultConfig(Utils.java:126)
at backtype.storm.utils.Utils.readStormConfig(Utils.java:146)
at backtype.storm.StormSubmitter.submitTopology(StormSubmitter.java:45)
at com.storm.Topologie.main(Topologie.java:48)

this my file dependencies in pom.xml: 这是我在pom.xml中的文件依赖项:

<dependencies>
       <dependency>
        <groupId>org.apache.storm</groupId>
        <artifactId>storm-core</artifactId>
        <version>0.9.5</version>
        <!-- keep storm out of the jar-with-dependencies -->
        <scope>provide</scope>
    </dependency>
          <dependency>
      <groupId>org.apache.storm</groupId>
      <artifactId>storm-kafka</artifactId>
      <version>0.10.0</version>
      <type>jar</type>
  </dependency>
  <dependency>
      <groupId>org.apache.kafka</groupId>
      <artifactId>kafka_2.9.2</artifactId>
      <version>0.8.1.1</version>
      <exclusions>
          <exclusion>
              <groupId>org.apache.zookeeper</groupId>
              <artifactId>zookeeper</artifactId>
          </exclusion>
          <exclusion>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
          </exclusion>
      </exclusions>
  </dependency>

and the last part of my pom.xml 还有我pom.xml的最后一部分

<build>
 <plugins>
   <plugin>
     <artifactId>maven-assembly-plugin</artifactId>
     <configuration>
       <descriptorRefs>
        <descriptorRef>jar-with-dependencies</descriptorRef>
       </descriptorRefs>
      <archive>
        <manifest>
         <mainClass>com.storm.Topologie</mainClass>
        </manifest>
      </archive>

     </configuration>
   <executions>
            <execution>
                <id>make-assembly</id>
                <phase>package</phase>
                <goals>
                    <goal>single</goal>
                </goals>
            </execution>
        </executions>
   </plugin>

<scope>provide</scope>

That "scope" isn't valid. 该“范围”无效。 The name is 'provided': 名称为“提供”:

<scope>provided</scope>

Is your maven job successfully running with that pom.xml? 您的maven作业是否已使用该pom.xml成功运行? Check, it's also likely that you're trying to publish the artifact (fat jar) from previously successful builds. 检查,您也很可能试图从以前成功的版本发布工件(胖罐)。 Try executing the clean goal too. 也尝试执行clean目标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM