Skip to content

Commit

Permalink
update to 0.7.0 API
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Marz committed Jan 29, 2012
1 parent e305803 commit 24d3e5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
:java-source-path "src/jvm" :java-source-path "src/jvm"
:javac-options {:debug "true" :fork "true"} :javac-options {:debug "true" :fork "true"}
:dependencies [[kestrel-thrift-java-bindings "2.2.0"]] :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"] :jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]
) )
8 changes: 2 additions & 6 deletions src/jvm/backtype/storm/spout/KestrelSpout.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@


import backtype.storm.spout.KestrelClient.ParseError; import backtype.storm.spout.KestrelClient.ParseError;
import backtype.storm.task.TopologyContext; import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer; import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.topology.base.BaseRichSpout;
import java.io.*; import java.io.*;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
Expand All @@ -20,7 +20,7 @@
* multiple of the number of Kestrel servers, otherwise the read load will be * multiple of the number of Kestrel servers, otherwise the read load will be
* higher on some Kestrel servers than others. * 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 Logger LOG = Logger.getLogger(KestrelSpout.class);


public static final long BLACKLIST_TIME_MS = 1000 * 60; public static final long BLACKLIST_TIME_MS = 1000 * 60;
Expand Down Expand Up @@ -196,10 +196,6 @@ public void fail(Object msgId) {
} }
} }


public boolean isDistributed() {
return true;
}

public void declareOutputFields(OutputFieldsDeclarer declarer) { public void declareOutputFields(OutputFieldsDeclarer declarer) {
declarer.declare(getOutputFields()); declarer.declare(getOutputFields());
} }
Expand Down
10 changes: 2 additions & 8 deletions src/jvm/backtype/storm/spout/KestrelThriftSpout.java
Original file line number Original file line Diff line number Diff line change
@@ -1,10 +1,8 @@
package backtype.storm.spout; package backtype.storm.spout;


import backtype.storm.task.TopologyContext; import backtype.storm.task.TopologyContext;
import backtype.storm.topology.IRichSpout;
import backtype.storm.topology.OutputFieldsDeclarer; import backtype.storm.topology.OutputFieldsDeclarer;
import java.io.*; import backtype.storm.topology.base.BaseRichSpout;
import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
Expand All @@ -27,7 +25,7 @@
* multiple of the number of Kestrel servers, otherwise the read load will be * multiple of the number of Kestrel servers, otherwise the read load will be
* higher on some Kestrel servers than others. * 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 Logger LOG = Logger.getLogger(KestrelThriftSpout.class);


public static final long BLACKLIST_TIME_MS = 1000 * 60; public static final long BLACKLIST_TIME_MS = 1000 * 60;
Expand Down Expand Up @@ -252,10 +250,6 @@ public void fail(Object msgId) {
} }
} }


public boolean isDistributed() {
return true;
}

public void declareOutputFields(OutputFieldsDeclarer declarer) { public void declareOutputFields(OutputFieldsDeclarer declarer) {
declarer.declare(getOutputFields()); declarer.declare(getOutputFields());
} }
Expand Down

0 comments on commit 24d3e5b

Please sign in to comment.