Reputation: 630
I'm writing a Wordcount on storm with input from kafka. While I'm doing project on IDEA, I found maven failed to download every class I needed(actually most of the classes). the pom.xml is
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>stormkafka_wordcount</groupId>
<artifactId>stormkafka_wordcount</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.building.sourceEncoding>UTF-8</project.building.sourceEncoding>
<java.version>1.7</java.version>
<kafka.version>0.10.1.0</kafka.version>
<storm.version>1.0.2</storm.version>
<scala.version>2.11</scala.version>
<hadoop.version>2.7.3</hadoop.version>
<hbase.version>1.2.3</hbase.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm</artifactId>
<version>${storm.version}</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>${storm.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_${scala.version}</artifactId>
<version>0.10.1.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-kafka</artifactId>
<version>${storm.version}</version>
</dependency>
</dependencies>
</project>
Everything should be downloaded successfully with no error in this pom.xml. While in my java.class, it still say backtype
not found, storm
not found.
import storm.kafka.StringScheme;
import storm.kafka.ZkHosts;
import backtype.storm.Config;
import backtype.storm.LocalCluster;
import backtype.storm.StormSubmitter;
I do not use Virtual Machine and everything is installed directly in my OS X Yosemite 10.10.5. I have ran Hadoop before using IDEA. Everything is fine. So the maven should be installed properly I thought.
Thank you!
Upvotes: 0
Views: 840
Reputation: 2121
After storm 1.0, backtype.storm
changed to org.apache.storm
.
Try to replace all the backtype.storm
to org.apache.storm
.
like
import storm.kafka.StringScheme;
import storm.kafka.ZkHosts;
import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.StormSubmitter;
Upvotes: 2