org.apache.storm

## 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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `ILocalCluster.ILocalTopology` Close this class to kill the topology.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    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.

    - ### Methods inherited from interface java.lang.AutoCloseable

      `close`

- - ### Method Detail

    - #### 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 name,
                                    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. use `AutoCloseable.close()` instead.

      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

    - #### 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

    - #### 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 step)
                           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

Copyright © 2019 The Apache Software Foundation. All rights reserved.