Permalink
Browse files

Merge remote branch 'origin/master' into thrift2

Conflicts:
	project.clj
  • Loading branch information...
Jason Jackson
Jason Jackson committed Nov 1, 2011
2 parents 60b36cd + 24486aa commit 4c350a78385aa8ebadd36d34545cdd06ebe7676d
Showing with 4 additions and 33 deletions.
  1. +3 −1 README.markdown
  2. +1 −1 project.clj
  3. +0 −31 src/jvm/backtype/storm/drpc/KestrelAdder.java
View
@@ -1,4 +1,6 @@
-Library to use Kestrel as a spout from within Storm. It also has an adapter to allow a DRPC server to enqueue DRPC requests to Kestrel.
+Library to use Kestrel as a spout from within Storm. It also has an adapter to allow a DRPC server to enqueue DRPC requests to Kestrel.
+
+To use this spout, you need to use [this fork](https://github.com/nathanmarz/kestrel) of Kestrel. This library requires out-of-order acking to be exposed via Kestrel's memcached API. This is not exposed in Kestrel's master repo, but it is exposed in our fork. We hope to have this functionality rolled into master soon.
## Spout usage
View
@@ -2,6 +2,6 @@
:java-source-path "src/jvm"
:javac-options {:debug "true" :fork "true"}
:dependencies [[kestrel-thrift-java-bindings "1.0.0-SNAPSHOT"]]
- :dev-dependencies [[storm "0.5.0"]]
+ :dev-dependencies [[storm "0.5.4"]]
:jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]
)
@@ -1,31 +0,0 @@
-package backtype.storm.drpc;
-
-import backtype.storm.spout.KestrelClient;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import org.json.simple.JSONValue;
-
-
-public class KestrelAdder implements SpoutAdder {
- KestrelClient _client;
-
- public KestrelAdder(String host, String port) {
- try {
- _client = new KestrelClient(host, Integer.parseInt(port));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- public void add(String function, String jsonArgs, String returnInfo) {
- Map val = new HashMap();
- val.put("args", jsonArgs);
- val.put("return", returnInfo);
- try {
- _client.queue(function, JSONValue.toJSONString(val));
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}

0 comments on commit 4c350a7

Please sign in to comment.