storm hdfs connector ... trying to write data into hdfs using storm storm hdfs connector ... trying to write data into hdfs using storm hadoop hadoop

storm hdfs connector ... trying to write data into hdfs using storm


I had same issue and after checking pom.xml in detail I realized that in dependency of storm-hdfs <version>0.1.3-SNAPSHOT</version> has scope defined as included which I think means that we have to add jar into storm jar and maven wont do it during packaging.

I changed version to what is available in maven repo and removed the scope which forced maven to download jar and include it in storm jar during build.

Here is my pom.xml for reference(with some basic details removed):

src/main/resources/ false core-site.xml hdfs-site.xml

<plugins>  <plugin>    <artifactId>maven-compiler-plugin</artifactId>    <version>3.2</version>    <configuration>      <source>1.7</source>      <target>1.7</target>    </configuration>  </plugin>  <plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-shade-plugin</artifactId>    <version>1.4</version>    <configuration>      <createDependencyReducedPom>true</createDependencyReducedPom>    </configuration>    <executions>      <execution>        <phase>package</phase>        <goals>          <goal>shade</goal>        </goals>        <configuration>          <transformers>            <transformer                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>            <transformer                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">              <mainClass>com.company.main</mainClass>            </transformer>          </transformers>        </configuration>      </execution>    </executions>  </plugin></plugins>

<dependency>  <groupId>junit</groupId>  <artifactId>junit</artifactId>  <version>3.8.1</version>  <scope>test</scope></dependency><dependency>  <groupId>org.apache.storm</groupId>  <artifactId>storm-core</artifactId>  <version>0.9.2-incubating</version>  <!-- keep storm out of the jar-with-dependencies -->  <scope>provided</scope></dependency><dependency>  <groupId>org.apache.storm</groupId>  <artifactId>storm-kafka</artifactId>  <version>0.9.2-incubating</version></dependency><dependency>  <groupId>log4j</groupId>  <artifactId>log4j</artifactId>  <version>1.2.17</version></dependency><!-- Utilities --><dependency>  <groupId>commons-collections</groupId>  <artifactId>commons-collections</artifactId>  <version>3.2.1</version></dependency><dependency>  <groupId>com.google.guava</groupId>  <artifactId>guava</artifactId>  <version>15.0</version></dependency><dependency>  <groupId>org.apache.kafka</groupId>  <artifactId>kafka_2.10</artifactId>  <version>0.8.1.1</version>  <exclusions>    <exclusion>      <groupId>javax.jms</groupId>      <artifactId>jms</artifactId>    </exclusion>    <exclusion>      <groupId>com.sun.jdmk</groupId>      <artifactId>jmxtools</artifactId>    </exclusion>    <exclusion>      <groupId>com.sun.jmx</groupId>      <artifactId>jmxri</artifactId>    </exclusion>    <exclusion>      <groupId>org.slf4j</groupId>      <artifactId>slf4j-simple</artifactId>    </exclusion>    <exclusion>      <groupId>log4j</groupId>      <artifactId>log4j</artifactId>    </exclusion>    <exclusion>      <groupId>org.apache.zookeeper</groupId>      <artifactId>zookeeper</artifactId>    </exclusion>    <exclusion>      <groupId>com.101tec</groupId>      <artifactId>zkclient</artifactId>    </exclusion>  </exclusions></dependency><!-- our cluster hadoop version --><dependency>  <groupId>org.apache.hadoop</groupId>  <artifactId>hadoop-client</artifactId>  <version>2.4.0</version>  <exclusions>    <exclusion>      <groupId>org.slf4j</groupId>      <artifactId>slf4j-log4j12</artifactId>    </exclusion>  </exclusions></dependency><!-- our cluster hadoop version --><dependency>  <groupId>org.apache.hadoop</groupId>  <artifactId>hadoop-hdfs</artifactId>  <version>2.4.0</version>  <exclusions>    <exclusion>      <groupId>org.slf4j</groupId>      <artifactId>slf4j-log4j12</artifactId>    </exclusion>  </exclusions></dependency><!-- apache hdfs-bolt related dependencies --><dependency>  <groupId>com.github.ptgoetz</groupId>  <artifactId>storm-hdfs</artifactId>  <version>0.1.2</version>  <exclusions>    <exclusion>      <groupId>org.apache.hadoop</groupId>      <artifactId>hadoop-client</artifactId>    </exclusion>    <exclusion>      <groupId>org.apache.hadoop</groupId>      <artifactId>hadoop-hdfs</artifactId>    </exclusion>  </exclusions></dependency>