Skip to content
This repository
Browse code

Merge remote branch 'origin/master' into thrift2

Conflicts:
	project.clj
  • Loading branch information...
commit 4c350a78385aa8ebadd36d34545cdd06ebe7676d 2 parents 60b36cd + 24486aa
authored November 01, 2011
4  README.markdown
Source Rendered
... ...
@@ -1,4 +1,6 @@
1  
-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. 
  1
+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.
  2
+
  3
+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.
2 4
 
3 5
 ## Spout usage
4 6
 
2  project.clj
@@ -2,6 +2,6 @@
2 2
   :java-source-path "src/jvm"
3 3
   :javac-options {:debug "true" :fork "true"}
4 4
   :dependencies [[kestrel-thrift-java-bindings "1.0.0-SNAPSHOT"]]
5  
-  :dev-dependencies [[storm "0.5.0"]]
  5
+  :dev-dependencies [[storm "0.5.4"]]
6 6
   :jvm-opts ["-Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib"]
7 7
 )
31  src/jvm/backtype/storm/drpc/KestrelAdder.java
... ...
@@ -1,31 +0,0 @@
1  
-package backtype.storm.drpc;
2  
-
3  
-import backtype.storm.spout.KestrelClient;
4  
-import java.io.IOException;
5  
-import java.util.HashMap;
6  
-import java.util.Map;
7  
-import org.json.simple.JSONValue;
8  
-
9  
-
10  
-public class KestrelAdder implements SpoutAdder {
11  
-    KestrelClient _client;
12  
-
13  
-    public KestrelAdder(String host, String port) {
14  
-        try {
15  
-            _client = new KestrelClient(host, Integer.parseInt(port));
16  
-        } catch (IOException e) {
17  
-            throw new RuntimeException(e);
18  
-        }
19  
-    }
20  
-
21  
-    public void add(String function, String jsonArgs, String returnInfo) {
22  
-        Map val = new HashMap();
23  
-        val.put("args", jsonArgs);
24  
-        val.put("return", returnInfo);
25  
-        try {
26  
-            _client.queue(function, JSONValue.toJSONString(val));
27  
-        } catch (Exception e) {
28  
-            throw new RuntimeException(e);
29  
-        }
30  
-    }
31  
-}

0 notes on commit 4c350a7

Please sign in to comment.
Something went wrong with that request. Please try again.