public interface ILocalCluster extends AutoCloseable
This is here mostly for backwards compatibility.
Modifier and Type | Interface and Description |
---|---|
static interface |
ILocalCluster.ILocalTopology
Close this class to kill the topology.
|
Modifier and Type | Method and Description |
---|---|
void |
activate(String topologyName)
Activate a topology.
|
void |
advanceClusterTime(int secs)
Advance the cluster time when the cluster is using SimulatedTime.
|
void |
advanceClusterTime(int secs,
int step)
Advance the cluster time when the cluster is using SimulatedTime.
|
void |
deactivate(String topologyName)
Deactivate a topology.
|
ClusterSummary |
getClusterInfo()
Get cluster information.
|
IStormClusterState |
getClusterState()
This is intended for internal testing only.
|
StormTopology |
getTopology(String id)
Get the compiled storm topology.
|
String |
getTopologyConf(String id)
The config of a topology as a JSON string.
|
TopologyInfo |
getTopologyInfo(String id)
Get the state of a topology.
|
String |
getTrackedId()
If the cluster is tracked get the id for the tracked cluster.
|
void |
killTopology(String topologyName)
Kill a topology (if you are not using ILocalTopology).
|
void |
killTopologyWithOpts(String name,
KillOptions options)
Kill a topology (if you are not using ILocalTopology).
|
void |
rebalance(String name,
RebalanceOptions options)
Rebalance a topology.
|
void |
shutdown()
Deprecated.
use
AutoCloseable.close() instead. |
ILocalCluster.ILocalTopology |
submitTopology(String topologyName,
Map<String,Object> conf,
StormTopology topology)
Submit a topology to be run in local mode.
|
ILocalCluster.ILocalTopology |
submitTopologyWithOpts(String topologyName,
Map<String,Object> conf,
StormTopology topology,
SubmitOptions submitOpts)
Submit a topology to be run in local mode.
|
void |
uploadNewCredentials(String topologyName,
Credentials creds)
Upload new credentials to a topology.
|
close
ILocalCluster.ILocalTopology submitTopology(String topologyName, Map<String,Object> conf, StormTopology topology) throws org.apache.storm.thrift.TException
Submit a topology to be run in local mode.
topologyName
- the name of the topology to useconf
- the config for the topologytopology
- the topology itself.org.apache.storm.thrift.TException
- on any error from nimbusILocalCluster.ILocalTopology submitTopologyWithOpts(String topologyName, Map<String,Object> conf, StormTopology topology, SubmitOptions submitOpts) throws org.apache.storm.thrift.TException
Submit a topology to be run in local mode.
topologyName
- the name of the topology to useconf
- the config for the topologytopology
- the topology itself.submitOpts
- options for topologyorg.apache.storm.thrift.TException
- on any error from nimbusvoid uploadNewCredentials(String topologyName, Credentials creds) throws org.apache.storm.thrift.TException
Upload new credentials to a topology.
topologyName
- the name of the topologycreds
- the new credentails for the topology.org.apache.storm.thrift.TException
- on any error from nimbusvoid killTopology(String topologyName) throws org.apache.storm.thrift.TException
Kill a topology (if you are not using ILocalTopology).
topologyName
- the name of the topologyorg.apache.storm.thrift.TException
- on any error from nimbusvoid killTopologyWithOpts(String name, KillOptions options) throws org.apache.storm.thrift.TException
Kill a topology (if you are not using ILocalTopology).
topologyName
- the name of the topologyoptions
- for how to kill the topologyorg.apache.storm.thrift.TException
- on any error from nimbusvoid activate(String topologyName) throws org.apache.storm.thrift.TException
Activate a topology.
topologyName
- the name of the topology to activateorg.apache.storm.thrift.TException
- on any error from nimbusvoid deactivate(String topologyName) throws org.apache.storm.thrift.TException
Deactivate a topology.
topologyName
- the name of the topology to deactivateorg.apache.storm.thrift.TException
- on any error from nimbusvoid rebalance(String name, RebalanceOptions options) throws org.apache.storm.thrift.TException
Rebalance a topology.
name
- the name of the topologyoptions
- options for rebalanceing the topology.org.apache.storm.thrift.TException
- on any error from nimbus@Deprecated void shutdown()
AutoCloseable.close()
instead.Shut down the cluster.
String getTopologyConf(String id) throws org.apache.storm.thrift.TException
The config of a topology as a JSON string.
id
- the id of the topology (not the name)org.apache.storm.thrift.TException
- on any error from nimbusStormTopology getTopology(String id) throws org.apache.storm.thrift.TException
Get the compiled storm topology.
id
- the id of the topology (not the name)org.apache.storm.thrift.TException
- on any error from nimbusClusterSummary getClusterInfo() throws org.apache.storm.thrift.TException
Get cluster information.
org.apache.storm.thrift.TException
- on any error from nimbusTopologyInfo getTopologyInfo(String id) throws org.apache.storm.thrift.TException
Get the state of a topology.
id
- the id of the topology (not the name)org.apache.storm.thrift.TException
- on any error from nimbusIStormClusterState getClusterState()
This is intended for internal testing only.
void advanceClusterTime(int secs) throws InterruptedException
Advance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.
secs
- the number of seconds to advance timeInterruptedException
void advanceClusterTime(int secs, int step) throws InterruptedException
Advance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.
secs
- the number of seconds to advance timesteps
- the number of steps we should take when advancing simulated timeInterruptedException
String getTrackedId()
If the cluster is tracked get the id for the tracked cluster. This is intended for internal testing only.
Copyright © 2022 The Apache Software Foundation. All rights reserved.