Skip to content

Commit 635b483

Browse files
author
Nathan Marz
committed
add rest of nimbus methods to localcluster
1 parent 1b12455 commit 635b483

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

src/clj/backtype/storm/LocalCluster.clj

+18-12
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,31 @@
1818
topology))
1919

2020
(defn -shutdown [this]
21-
(kill-local-storm-cluster (. this state))
22-
)
21+
(kill-local-storm-cluster (. this state)))
2322

2423
(defn -killTopology [this name]
25-
(.killTopology (:nimbus (. this state)) name)
26-
)
24+
(.killTopology (:nimbus (. this state)) name))
2725

2826
(defn -getTopologyConf [this id]
29-
(.getTopologyConf (:nimbus (. this state)) id)
30-
)
27+
(.getTopologyConf (:nimbus (. this state)) id))
3128

3229
(defn -getTopology [this id]
33-
(.getTopology (:nimbus (. this state)) id)
34-
)
30+
(.getTopology (:nimbus (. this state)) id))
3531

3632
(defn -getClusterInfo [this]
37-
(.getClusterInfo (:nimbus (. this state)))
38-
)
33+
(.getClusterInfo (:nimbus (. this state))))
3934

4035
(defn -getTopologyInfo [this id]
41-
(.getTopologyInfo (:nimbus (. this state)) id)
42-
)
36+
(.getTopologyInfo (:nimbus (. this state)) id))
37+
38+
(defn -killTopologyWithOpts [this name opts]
39+
(.killTopologyWithOpts (:nimbus (. this state)) name opts))
40+
41+
(defn -activate [this name]
42+
(.activate (:nimbus (. this state)) name))
43+
44+
(defn -deactivate [this name]
45+
(.deactivate (:nimbus (. this state)) name))
46+
47+
(defn -rebalance [this name opts]
48+
(.rebalance (:nimbus (. this state)) name opts))

src/jvm/backtype/storm/ILocalCluster.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33
import backtype.storm.generated.AlreadyAliveException;
44
import backtype.storm.generated.ClusterSummary;
55
import backtype.storm.generated.InvalidTopologyException;
6+
import backtype.storm.generated.KillOptions;
67
import backtype.storm.generated.NotAliveException;
8+
import backtype.storm.generated.RebalanceOptions;
79
import backtype.storm.generated.StormTopology;
810
import backtype.storm.generated.TopologyInfo;
911

1012
import java.util.Map;
1113

1214

1315
public interface ILocalCluster {
14-
void submitTopology(String topologyName, Map conf, StormTopology topology)
15-
throws AlreadyAliveException, InvalidTopologyException;
16-
void killTopology(String topologyName)
17-
throws NotAliveException;
16+
void submitTopology(String topologyName, Map conf, StormTopology topology) throws AlreadyAliveException, InvalidTopologyException;
17+
void killTopology(String topologyName) throws NotAliveException;
18+
void killTopologyWithOpts(String name, KillOptions options) throws NotAliveException;
19+
void activate(String topologyName) throws NotAliveException;
20+
void deactivate(String topologyName) throws NotAliveException;
21+
void rebalance(String name, RebalanceOptions options) throws NotAliveException;
1822
void shutdown();
1923
String getTopologyConf(String id);
2024
StormTopology getTopology(String id);

0 commit comments

Comments
 (0)