Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make compatible with Storm 0.8.1 and Clojure 1.4 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
:description "Testing utilities for storm"
:source-path "src/clj"
:java-source-path "src/jvm"
:dependencies [[org.clojure/clojure "1.2.0"]
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojure/clojure-contrib "1.2.0"]]
:dev-dependencies [[storm "0.6.0"]])
:dev-dependencies [[storm "0.8.1"]])
10 changes: 5 additions & 5 deletions src/clj/storm/test/capturing_topology.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
(:import [storm.test MultiStreamFeederSpout])
(:require [backtype.storm.daemon [common :as common]])
(:use [storm.test.persistent-tuple-capture-bolt])
(:use [clojure.contrib.def :only [defnk]])
(:use [backtype.storm util config thrift clojure testing log]))

(defnk capturing-topology
Expand Down Expand Up @@ -38,10 +37,11 @@
(.set_bolts topology
(assoc (clojurify-structure bolts)
(uuid)
(Bolt.
(into {} (for [id all-streams] [id (mk-global-grouping)]))
(serialize-component-object capturer)
(mk-plain-component-common {} nil))))
(let [input-spec (into {} (for [id all-streams]
[id (mk-global-grouping)]))]
(Bolt.
(serialize-component-object capturer)
(mk-plain-component-common input-spec {} nil)))))
(submit-local-topology
(:nimbus cluster-map) storm-name storm-conf topology)
(let [storm-id (common/get-storm-id state storm-name) ]
Expand Down
3 changes: 2 additions & 1 deletion src/clj/storm/test/visualization.clj
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
(fn [bolt-spec]
(let [ id (key bolt-spec)
bolt (val bolt-spec)
inputs (clojurify-structure (.get_inputs bolt)) ]
common (.get_common bolt)
inputs (clojurify-structure (.get_inputs common)) ]
(map
(fn [input]
(let [ from (key input)
Expand Down
4 changes: 4 additions & 0 deletions src/jvm/storm/test/DRPCExclamationTopology.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public static class ExclaimBolt implements IBasicBolt {
public void prepare(Map conf, TopologyContext context) {
}

public Map<String,Object> getComponentConfiguration() {
return null;
}

@Override
public void execute(Tuple tuple, BasicOutputCollector collector) {
String input = tuple.getString(1);
Expand Down
3 changes: 3 additions & 0 deletions src/jvm/storm/test/MultiStreamFeederSpout.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public void ack(Object msgId) {
}
}

public void activate() {}
public void deactivate() {}

public void fail(Object msgId) {
synchronized(failed) {
int curr = get(failed, _context.getStormId(), 0);
Expand Down