Interface ILocalCluster

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
ILocalClusterTrackedTopologyAware
All Known Implementing Classes:
LocalCluster

public interface ILocalCluster extends AutoCloseable
This is here mostly for backwards compatibility.
  • Method Details

    • submitTopology

      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.
      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
    • submitTopologyWithOpts

      ILocalCluster.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.
      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
    • uploadNewCredentials

      void 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
    • killTopology

      void killTopology(String topologyName) throws org.apache.storm.thrift.TException
      Kill 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
    • killTopologyWithOpts

      void 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
    • activate

      void activate(String topologyName) throws org.apache.storm.thrift.TException
      Activate a topology.
      Parameters:
      topologyName - the name of the topology to activate
      Throws:
      org.apache.storm.thrift.TException - on any error from nimbus
    • deactivate

      void deactivate(String topologyName) throws org.apache.storm.thrift.TException
      Deactivate a topology.
      Parameters:
      topologyName - the name of the topology to deactivate
      Throws:
      org.apache.storm.thrift.TException - on any error from nimbus
    • rebalance

      void rebalance(String name, RebalanceOptions options) throws org.apache.storm.thrift.TException
      Rebalance 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
    • shutdown

      @Deprecated void shutdown()
      Deprecated.
      Shut down the cluster.
    • getTopologyConf

      String getTopologyConf(String id) throws org.apache.storm.thrift.TException
      The 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
    • getTopology

      StormTopology getTopology(String id) throws org.apache.storm.thrift.TException
      Get 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
    • getClusterInfo

      ClusterSummary getClusterInfo() throws org.apache.storm.thrift.TException
      Get cluster information.
      Returns:
      a summary of the current state of the cluster
      Throws:
      org.apache.storm.thrift.TException - on any error from nimbus
    • getTopologySummaries

      List<TopologySummary> getTopologySummaries() throws org.apache.storm.thrift.TException
      Throws:
      org.apache.storm.thrift.TException
    • getTopologySummaryByName

      TopologySummary getTopologySummaryByName(String name) throws org.apache.storm.thrift.TException
      Throws:
      org.apache.storm.thrift.TException
    • getTopologySummary

      TopologySummary getTopologySummary(String id) throws org.apache.storm.thrift.TException
      Throws:
      org.apache.storm.thrift.TException
    • getTopologyInfo

      TopologyInfo getTopologyInfo(String id) throws org.apache.storm.thrift.TException
      Get 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
    • getTopologyInfoByName

      TopologyInfo getTopologyInfoByName(String name) throws org.apache.storm.thrift.TException
      Get 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
    • getTopologyInfoWithOpts

      TopologyInfo 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
    • getTopologyInfoByNameWithOpts

      TopologyInfo 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
    • getClusterState

      IStormClusterState getClusterState()
      This is intended for internal testing only.
      Returns:
      an internal class that holds the state of the cluster.
    • advanceClusterTime

      void advanceClusterTime(int secs) throws InterruptedException
      Advance 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
    • advanceClusterTime

      void advanceClusterTime(int secs, int steps) throws InterruptedException
      Advance 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
    • getTrackedId

      String 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