Package org.apache.storm
Interface ILocalCluster
- All Superinterfaces:
- AutoCloseable
- All Known Subinterfaces:
- ILocalClusterTrackedTopologyAware
- All Known Implementing Classes:
- LocalCluster
This is here mostly for backwards compatibility.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceClose this class to kill the topology.
- 
Method SummaryModifier and TypeMethodDescriptionvoidActivate a topology.voidadvanceClusterTime(int secs) Advance the cluster time when the cluster is using SimulatedTime.voidadvanceClusterTime(int secs, int steps) Advance the cluster time when the cluster is using SimulatedTime.voiddeactivate(String topologyName) Deactivate a topology.Get cluster information.This is intended for internal testing only.getTopology(String id) Get the compiled storm topology.The config of a topology as a JSON string.Get the state of a topology.getTopologyInfoByName(String name) Get the state of a topology.getTopologyInfoByNameWithOpts(String name, GetInfoOptions options) Get the state of a topology.getTopologyInfoWithOpts(String id, GetInfoOptions options) Get the state of a topology.If the cluster is tracked get the id for the tracked cluster.voidkillTopology(String topologyName) Kill a topology (if you are not using ILocalTopology).voidkillTopologyWithOpts(String topologyName, KillOptions options) Kill a topology (if you are not using ILocalTopology).voidrebalance(String name, RebalanceOptions options) Rebalance a topology.voidshutdown()Deprecated.submitTopology(String topologyName, Map<String, Object> conf, StormTopology topology) Submit a topology to be run in local mode.submitTopologyWithOpts(String topologyName, Map<String, Object> conf, StormTopology topology, SubmitOptions submitOpts) Submit a topology to be run in local mode.voiduploadNewCredentials(String topologyName, Credentials creds) Upload new credentials to a topology.Methods inherited from interface java.lang.AutoCloseableclose
- 
Method Details- 
submitTopologyILocalCluster.ILocalTopology submitTopology(String topologyName, Map<String, Object> conf, StormTopology topology) throws org.apache.storm.thrift.TExceptionSubmit a topology to be run in local mode.- Parameters:
- topologyName- the name of the topology to use
- conf- the config for the topology
- topology- the topology itself.
- Returns:
- an AutoCloseable that will kill the topology.
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
submitTopologyWithOptsILocalCluster.ILocalTopology submitTopologyWithOpts(String topologyName, Map<String, Object> conf, StormTopology topology, SubmitOptions submitOpts) throws org.apache.storm.thrift.TExceptionSubmit a topology to be run in local mode.- Parameters:
- topologyName- the name of the topology to use
- conf- the config for the topology
- topology- the topology itself.
- submitOpts- options for topology
- Returns:
- an AutoCloseable that will kill the topology.
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
uploadNewCredentialsvoid uploadNewCredentials(String topologyName, Credentials creds) throws org.apache.storm.thrift.TException Upload new credentials to a topology.- Parameters:
- topologyName- the name of the topology
- creds- the new credentails for the topology.
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
killTopologyKill a topology (if you are not using ILocalTopology).- Parameters:
- topologyName- the name of the topology
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
killTopologyWithOptsvoid killTopologyWithOpts(String topologyName, KillOptions options) throws org.apache.storm.thrift.TException Kill a topology (if you are not using ILocalTopology).- Parameters:
- topologyName- the name of the topology
- options- for how to kill the topology
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
activateActivate a topology.- Parameters:
- topologyName- the name of the topology to activate
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
deactivateDeactivate a topology.- Parameters:
- topologyName- the name of the topology to deactivate
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
rebalanceRebalance a topology.- Parameters:
- name- the name of the topology
- options- options for rebalanceing the topology.
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
shutdownDeprecated.useAutoCloseable.close()instead.Shut down the cluster.
- 
getTopologyConfThe config of a topology as a JSON string.- Parameters:
- id- the id of the topology (not the name)
- Returns:
- The config of a topology as a JSON string
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
getTopologyGet the compiled storm topology.- Parameters:
- id- the id of the topology (not the name)
- Returns:
- the compiled storm topology
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
getClusterInfoGet cluster information.- Returns:
- a summary of the current state of the cluster
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
getTopologySummaries- Throws:
- org.apache.storm.thrift.TException
 
- 
getTopologySummaryByName- Throws:
- org.apache.storm.thrift.TException
 
- 
getTopologySummary- Throws:
- org.apache.storm.thrift.TException
 
- 
getTopologyInfoGet the state of a topology.- Parameters:
- id- the id of the topology (not the name)
- Returns:
- the state of a topology
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
getTopologyInfoByNameGet the state of a topology.- Parameters:
- name- the name of the topology (not the id)
- Returns:
- the state of a topology
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
getTopologyInfoWithOptsTopologyInfo getTopologyInfoWithOpts(String id, GetInfoOptions options) throws org.apache.storm.thrift.TException Get the state of a topology.- Parameters:
- id- the id of the topology (not the name)
- options- This is to choose number of Error(s) in TopologyInfo.
- Returns:
- the state of a topology
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
getTopologyInfoByNameWithOptsTopologyInfo getTopologyInfoByNameWithOpts(String name, GetInfoOptions options) throws org.apache.storm.thrift.TException Get the state of a topology.- Parameters:
- name- the name of the topology (not the id)
- options- This is GetInfoOptions to choose Error(s) in on TopologyInfo.
- Returns:
- the state of a topology
- Throws:
- org.apache.storm.thrift.TException- on any error from nimbus
 
- 
getClusterStateIStormClusterState getClusterState()This is intended for internal testing only.- Returns:
- an internal class that holds the state of the cluster.
 
- 
advanceClusterTimeAdvance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.- Parameters:
- secs- the number of seconds to advance time
- Throws:
- InterruptedException
 
- 
advanceClusterTimeAdvance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.- Parameters:
- secs- the number of seconds to advance time
- steps- the number of steps we should take when advancing simulated time
- Throws:
- InterruptedException
 
- 
getTrackedIdString getTrackedId()If the cluster is tracked get the id for the tracked cluster. This is intended for internal testing only.- Returns:
- the id of the tracked cluster
 
 
- 
AutoCloseable.close()instead.