Skip to content
This repository has been archived by the owner on Apr 13, 2018. It is now read-only.

Update to support new namespace for Storm 1.0.0 #31

Closed
wants to merge 2 commits into from
Closed

Update to support new namespace for Storm 1.0.0 #31

wants to merge 2 commits into from

Conversation

ChristophePretty
Copy link

Hi,

Since release 1.0.0 of Storm, the namespace changed from backtype.storm to org.apache.storm.
This patch update all the imports to support the new namespace.

Regards,
Christophe

@christiangda
Copy link

Hi Christopher, thanks for your jobs, it help me a lot. I improve other things:

1.- I updated to the last version of dependencies

    <properties>
        <aws-java-sdk.version>1.10.74</aws-java-sdk.version>
        <storm.version>1.0.0</storm.version>
        <curator-framework.version>1.3.3</curator-framework.version>
        <guava.version>19.0</guava.version>
        <commons-lang3.version>3.4</commons-lang3.version>
    </properties>

But when I try to compile it using

 mvn clean validate compile test package

and I gave the following error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project kinesis-storm-spout: Compilation failure
[ERROR] /home/christian/Git/kinesis-storm-spout/src/main/java/com/amazonaws/services/kinesis/stormspout/state/zookeeper/ZookeeperShardState.java:[68,11] exception java.io.IOException is never thrown in body of corresponding try statement

2.- To fix that I changed the following

git diff origin/master -- /home/christian/Git/kinesis-storm-spout/src/main/java/com/amazonaws/services/kinesis/stormspout/state/zookeeper/ZookeeperShardState.java

diff --git a/src/main/java/com/amazonaws/services/kinesis/stormspout/state/zookeeper/ZookeeperShardState.java b/src/main/java/com/amazonaws/services/kinesis/stormspout/state/zookeeper/ZookeeperShardState.java
index 1b4a72f..a42f0c2 100644
--- a/src/main/java/com/amazonaws/services/kinesis/stormspout/state/zookeeper/ZookeeperShardState.java
+++ b/src/main/java/com/amazonaws/services/kinesis/stormspout/state/zookeeper/ZookeeperShardState.java
@@ -64,11 +64,11 @@ class ZookeeperShardState {
         try {
             zk = CuratorFrameworkFactory.newClient(config.getZookeeperConnectionString(),
                     new ExponentialBackoffRetry(BASE_SLEEP_TIME_MS, MAX_NUM_RETRIES));
-        } catch (IOException e) {
+           zk.start();
+        } catch (Exception e) {
             LOG.error("Could not connect to ZooKeeper", e);
             throw new KinesisSpoutException(e);
         }
-        zk.start();
     }

     /**

Maybe you could include this changes in your pull request.

@ChristophePretty
Copy link
Author

Thanks for the update. I am not compiling this project with maven so I missed this.
I have to close this pull request and create a new one as I wanted to link it to a different branch in my repo and github does not provide this possibility.
Please have a look at: #32

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants