Permalink
Browse files

update to 0.7.0 API

  • Loading branch information...
nathanmarz committed Jan 29, 2012
1 parent e305803 commit 24d3e5b5f29b07c1c5e6324c83b8f791d48c22c2
View
@@ -3,6 +3,6 @@
:java-source-path "src/jvm"
:javac-options {:debug "true" :fork "true"}
:dependencies [[kestrel-thrift-java-bindings "2.2.0"]]
- :dev-dependencies [[storm "0.6.0"]]
+ :dev-dependencies [[storm "0.7.0-SNAPSHOT"]]
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]
)
@@ -2,8 +2,8 @@
import backtype.storm.spout.KestrelClient.ParseError;
import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer;
+import backtype.storm.topology.base.BaseRichSpout;
import java.io.*;
import java.util.Map;
import java.util.List;
@@ -20,7 +20,7 @@
* multiple of the number of Kestrel servers, otherwise the read load will be
* higher on some Kestrel servers than others.
*/
-public class KestrelSpout implements IRichSpout {
+public class KestrelSpout extends BaseRichSpout {
public static Logger LOG = Logger.getLogger(KestrelSpout.class);
public static final long BLACKLIST_TIME_MS = 1000 * 60;
@@ -196,10 +196,6 @@ public void fail(Object msgId) {
}
}
- public boolean isDistributed() {
- return true;
- }
-
public void declareOutputFields(OutputFieldsDeclarer declarer) {
declarer.declare(getOutputFields());
}
@@ -1,10 +1,8 @@
package backtype.storm.spout;
import backtype.storm.task.TopologyContext;
-import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer;
-import java.io.*;
-import java.util.Set;
+import backtype.storm.topology.base.BaseRichSpout;
import java.util.HashSet;
import java.util.Map;
import java.util.List;
@@ -27,7 +25,7 @@
* multiple of the number of Kestrel servers, otherwise the read load will be
* higher on some Kestrel servers than others.
*/
-public class KestrelThriftSpout implements IRichSpout {
+public class KestrelThriftSpout extends BaseRichSpout {
public static Logger LOG = Logger.getLogger(KestrelThriftSpout.class);
public static final long BLACKLIST_TIME_MS = 1000 * 60;
@@ -252,10 +250,6 @@ public void fail(Object msgId) {
}
}
- public boolean isDistributed() {
- return true;
- }
-
public void declareOutputFields(OutputFieldsDeclarer declarer) {
declarer.declare(getOutputFields());
}

0 comments on commit 24d3e5b

Please sign in to comment.