public interface ILocalCluster extends AutoCloseable
| 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.
|
TopologyInfo |
getTopologyInfoByName(String name)
Get the state of a topology.
|
TopologyInfo |
getTopologyInfoByNameWithOpts(String name,
GetInfoOptions options)
Get the state of a topology.
|
TopologyInfo |
getTopologyInfoWithOpts(String id,
GetInfoOptions options)
Get the state of a topology.
|
List<TopologySummary> |
getTopologySummaries() |
TopologySummary |
getTopologySummary(String id) |
TopologySummary |
getTopologySummaryByName(String name) |
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.
|
closeILocalCluster.ILocalTopology submitTopology(String topologyName, Map<String,Object> conf, StormTopology topology) throws org.apache.storm.thrift.TException
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
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
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
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
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
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
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
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.String getTopologyConf(String id) throws org.apache.storm.thrift.TException
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
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
org.apache.storm.thrift.TException - on any error from nimbusList<TopologySummary> getTopologySummaries() throws org.apache.storm.thrift.TException
org.apache.storm.thrift.TExceptionTopologySummary getTopologySummaryByName(String name) throws org.apache.storm.thrift.TException
org.apache.storm.thrift.TExceptionTopologySummary getTopologySummary(String id) throws org.apache.storm.thrift.TException
org.apache.storm.thrift.TExceptionTopologyInfo getTopologyInfo(String id) throws org.apache.storm.thrift.TException
id - the id of the topology (not the name)org.apache.storm.thrift.TException - on any error from nimbusTopologyInfo getTopologyInfoByName(String name) throws org.apache.storm.thrift.TException
name - the name of the topology (not the id)org.apache.storm.thrift.TException - on any error from nimbusTopologyInfo getTopologyInfoWithOpts(String id, GetInfoOptions options) throws org.apache.storm.thrift.TException
id - the id of the topology (not the name)options - This is to choose number of Error(s) in TopologyInfo.org.apache.storm.thrift.TException - on any error from nimbusTopologyInfo getTopologyInfoByNameWithOpts(String name, GetInfoOptions options) throws org.apache.storm.thrift.TException
name - the name of the topology (not the id)options - This is GetInfoOptions to choose Error(s) in on TopologyInfo.org.apache.storm.thrift.TException - on any error from nimbusIStormClusterState getClusterState()
void advanceClusterTime(int secs)
throws InterruptedException
secs - the number of seconds to advance timeInterruptedExceptionvoid advanceClusterTime(int secs,
int step)
throws InterruptedException
secs - the number of seconds to advance timesteps - the number of steps we should take when advancing simulated timeInterruptedExceptionString getTrackedId()
Copyright © 2023 The Apache Software Foundation. All rights reserved.