org.apache.storm

## Class LocalCluster

- java.lang.Object
- - org.apache.storm.LocalCluster

- All Implemented Interfaces:
    AutoCloseable, Nimbus.Iface, ILocalCluster, ILocalClusterTrackedTopologyAware

      public class LocalCluster
      extends Object
      implements ILocalClusterTrackedTopologyAware, Nimbus.Iface

  A stand alone storm cluster that runs inside a single process. It is intended to be used for testing. Both internal testing for Apache Storm itself and for people building storm topologies.

  LocalCluster is an AutoCloseable so if you are using it in tests you can use a try block to be sure it is shut down.

  try (LocalCluster cluster = new LocalCluster()) { // Do some tests } // The cluster has been shut down.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LocalCluster.Builder` Simple way to configure a LocalCluster to meet your needs.
    `class` | `LocalCluster.LocalTopology` When running a topology locally, for tests etc.

    - ### Nested classes/interfaces inherited from interface org.apache.storm.ILocalCluster

      `ILocalCluster.ILocalTopology`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static KillOptions` | `KILL_NOW`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalCluster()` Create a default LocalCluster.
    `LocalCluster(String zkHost, Long zkPort)` Create a LocalCluster that connects to an existing Zookeeper instance.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate(String topologyName)` Activate a topology.
    `Supervisor` | `addSupervisor()` Add another supervisor to the topology.
    `Supervisor` | `addSupervisor(Number ports)` Add another supervisor to the topology.
    `Supervisor` | `addSupervisor(Number ports, Map<String,Object> conf, String id)` Add another supervisor to the topology.
    `Supervisor` | `addSupervisor(Number ports, String id)` Add another supervisor to the topology.
    `void` | `advanceClusterTime(int secs)` Advance the cluster time when the cluster is using SimulatedTime.
    `void` | `advanceClusterTime(int secs, int incSecs)` Advance the cluster time when the cluster is using SimulatedTime.
    `BeginDownloadResult` | `beginBlobDownload(String key)`
    `String` | `beginCreateBlob(String key, SettableBlobMeta meta)`
    `String` | `beginFileUpload()`
    `String` | `beginUpdateBlob(String key)`
    `void` | `cancelBlobUpload(String session)`
    `void` | `close()`
    `void` | `createStateInZookeeper(String key)`
    `void` | `deactivate(String topologyName)` Deactivate a topology.
    `void` | `debug(String name, String component, boolean enable, double samplingPercentage)` Enable/disable logging the tuples generated in topology via an internal EventLogger bolt.
    `void` | `deleteBlob(String key)`
    `ByteBuffer` | `downloadBlobChunk(String session)`
    `ByteBuffer` | `downloadChunk(String id)`
    `void` | `finishBlobUpload(String session)`
    `void` | `finishFileUpload(String location)`
    `ReadableBlobMeta` | `getBlobMeta(String key)`
    `int` | `getBlobReplication(String key)`
    `ClusterSummary` | `getClusterInfo()` Get cluster information.
    `IStormClusterState` | `getClusterState()` This is intended for internal testing only.
    `ComponentPageInfo` | `getComponentPageInfo(String topologyId, String componentId, String window, boolean isIncludeSys)`
    `List<ProfileRequest>` | `getComponentPendingProfileActions(String id, String componentId, ProfileAction action)`
    `Map<String,Object>` | `getDaemonConf()` Get daemon configuration.
    `NimbusSummary` | `getLeader()`
    `LogConfig` | `getLogConfig(String name)`
    `StormMetricsRegistry` | `getMetricRegistry()` Reference to metrics registry.
    `Nimbus` | `getNimbus()` Reference to nimbus.
    `String` | `getNimbusConf()`
    `List<OwnerResourceSummary>` | `getOwnerResourceSummaries(String owner)`
    `Supervisor` | `getSupervisor(String id)` Get a specific Supervisor.
    `SupervisorAssignments` | `getSupervisorAssignments(String node)` Get assigned assignments for a specific supervisor
    `SupervisorPageInfo` | `getSupervisorPageInfo(String id, String host, boolean isIncludeSys)`
    `int` | `getThriftServerPort()`
    `StormTopology` | `getTopology(String id)` Get the compiled storm topology.
    `String` | `getTopologyConf(String id)` The config of a topology as a JSON string.
    `TopologyHistoryInfo` | `getTopologyHistory(String user)`
    `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.
    `TopologyPageInfo` | `getTopologyPageInfo(String id, String window, boolean isIncludeSys)`
    `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.
    `StormTopology` | `getUserTopology(String id)` Returns the user specified topology as submitted originally.
    `boolean` | `isRemoteBlobExists(String blobKey)` Decide if the blob is removed from cluster.
    `boolean` | `isTopologyNameAllowed(String name)`
    `void` | `killSupervisor(String id)` Kill a specific supervisor.
    `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).
    `ListBlobsResult` | `listBlobs(String session)`
    `static void` | `main(String[] args)` Main entry point to running in local mode.
    `void` | `processWorkerMetrics(WorkerMetrics metrics)`
    `void` | `rebalance(String name, RebalanceOptions options)` Rebalance a topology.
    `void` | `sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat)` Send supervisor local worker heartbeat when a supervisor is unreachable
    `void` | `sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats)` Send supervisor worker heartbeats for a specific supervisor
    `void` | `setBlobMeta(String key, SettableBlobMeta meta)`
    `void` | `setLogConfig(String name, LogConfig config)`
    `void` | `setWorkerProfiler(String id, ProfileRequest profileRequest)`
    `void` | `shutdown()` Shut down the cluster.
    `LocalCluster.LocalTopology` | `submitTopology(String topologyName, Map<String,Object> conf, StormTopology topology)` Submit a topology to be run in local mode.
    `LocalCluster.LocalTopology` | `submitTopology(String topologyName, Map<String,Object> conf, TrackedTopology topology)` Submit a tracked topology to be run in local mode.
    `void` | `submitTopology(String name, String uploadedJarLocation, String jsonConf, StormTopology topology)`
    `LocalCluster.LocalTopology` | `submitTopologyWithOpts(String topologyName, Map<String,Object> conf, StormTopology topology, SubmitOptions submitOpts)` Submit a topology to be run in local mode.
    `LocalCluster.LocalTopology` | `submitTopologyWithOpts(String topologyName, Map<String,Object> conf, TrackedTopology topology, SubmitOptions submitOpts)` Submit a tracked topology to be run in local mode.
    `void` | `submitTopologyWithOpts(String name, String uploadedJarLocation, String jsonConf, StormTopology topology, SubmitOptions options)`
    `int` | `updateBlobReplication(String key, int replication)`
    `void` | `uploadBlobChunk(String session, ByteBuffer chunk)`
    `void` | `uploadChunk(String location, ByteBuffer chunk)`
    `void` | `uploadNewCredentials(String topologyName, Credentials creds)` Upload new credentials to a topology.
    `void` | `waitForIdle()` Wait for the cluster to be idle.
    `void` | `waitForIdle(long timeoutMs)` Wait for the cluster to be idle.
    `static <T> T` | `withLocalModeOverride(Callable<T> c, long ttlSec)` Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls.
    `static <T> T` | `withLocalModeOverride(Callable<T> c, long ttlSec, Map<String,Object> daemonConf)` Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### KILL_NOW

          public static final KillOptions KILL_NOW

  - ### Constructor Detail

    - #### LocalCluster

          public LocalCluster()
                       throws Exception

      Create a default LocalCluster.

      Throws:
        `Exception` - on any error

    - #### LocalCluster

          public LocalCluster(String zkHost,
                              Long zkPort)
                       throws Exception

      Create a LocalCluster that connects to an existing Zookeeper instance.

      Parameters:
        `zkHost` - the host for ZK
        `zkPort` - the port for ZK
      Throws:
        `Exception` - on any error

  - ### Method Detail

    - #### withLocalModeOverride

          public static <T> T withLocalModeOverride(Callable<T> c,
                                                    long ttlSec)
                                             throws Exception

      Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls. NOTE local mode override happens by default now unless netty is turned on for the local cluster.

      Parameters:
        `c` - the callable to run in this mode
        `ttlSec` - the number of seconds to let the cluster run after c has completed
      Returns:
        the result of calling C
      Throws:
        `Exception` - on any Exception.

    - #### withLocalModeOverride

          public static <T> T withLocalModeOverride(Callable<T> c,
                                                    long ttlSec,
                                                    Map<String,Object> daemonConf)
                                             throws Exception

      Run c with a local mode cluster overriding the NimbusClient and DRPCClient calls. NOTE local mode override happens by default now unless netty is turned on for the local cluster.

      Parameters:
        `c` - the callable to run in this mode
        `ttlSec` - the number of seconds to let the cluster run after c has completed
        `daemonConf` - configs to set for the daemon processes.
      Returns:
        the result of calling C
      Throws:
        `Exception` - on any Exception.

    - #### main

          public static void main(String[] args)
                           throws Exception

      Main entry point to running in local mode.

      Parameters:
        `args` - arguments to be run in local mode
      Throws:
        `Exception` - on any error when running.

    - #### getNimbus

          public Nimbus getNimbus()

      Reference to nimbus.

      Returns:
        Nimbus itself so you can interact with it directly, if needed.

    - #### getMetricRegistry

          public StormMetricsRegistry getMetricRegistry()

      Reference to metrics registry.

      Returns:
        The metrics registry for the local cluster.

    - #### getDaemonConf

          public Map<String,Object> getDaemonConf()

      Get daemon configuration.

      Returns:
        the base config for the daemons

    - #### submitTopology

          public LocalCluster.LocalTopology submitTopology(String topologyName,
                                                           Map<String,Object> conf,
                                                           StormTopology topology)
                                                    throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Submit a topology to be run in local mode.

      Specified by:
        `submitTopology` in interface `ILocalCluster`
      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

    - #### submitTopology

          public LocalCluster.LocalTopology submitTopology(String topologyName,
                                                           Map<String,Object> conf,
                                                           TrackedTopology topology)
                                                    throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalClusterTrackedTopologyAware`

      Submit a tracked topology to be run in local mode.

      Specified by:
        `submitTopology` in interface `ILocalClusterTrackedTopologyAware`
      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

    - #### submitTopology

          public void submitTopology(String name,
                                     String uploadedJarLocation,
                                     String jsonConf,
                                     StormTopology topology)
                              throws AlreadyAliveException,
                                     InvalidTopologyException,
                                     AuthorizationException,
                                     org.apache.storm.thrift.TException

      Specified by:
        `submitTopology` in interface `Nimbus.Iface`
      Throws:
        `AlreadyAliveException`
        `InvalidTopologyException`
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### submitTopologyWithOpts

          public LocalCluster.LocalTopology submitTopologyWithOpts(String topologyName,
                                                                   Map<String,Object> conf,
                                                                   StormTopology topology,
                                                                   SubmitOptions submitOpts)
                                                            throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Submit a topology to be run in local mode.

      Specified by:
        `submitTopologyWithOpts` in interface `ILocalCluster`
      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

    - #### submitTopologyWithOpts

          public LocalCluster.LocalTopology submitTopologyWithOpts(String topologyName,
                                                                   Map<String,Object> conf,
                                                                   TrackedTopology topology,
                                                                   SubmitOptions submitOpts)
                                                            throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalClusterTrackedTopologyAware`

      Submit a tracked topology to be run in local mode.

      Specified by:
        `submitTopologyWithOpts` in interface `ILocalClusterTrackedTopologyAware`
      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

    - #### submitTopologyWithOpts

          public void submitTopologyWithOpts(String name,
                                             String uploadedJarLocation,
                                             String jsonConf,
                                             StormTopology topology,
                                             SubmitOptions options)
                                      throws AlreadyAliveException,
                                             InvalidTopologyException,
                                             AuthorizationException,
                                             org.apache.storm.thrift.TException

      Specified by:
        `submitTopologyWithOpts` in interface `Nimbus.Iface`
      Throws:
        `AlreadyAliveException`
        `InvalidTopologyException`
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### uploadNewCredentials

          public void uploadNewCredentials(String topologyName,
                                           Credentials creds)
                                    throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Upload new credentials to a topology.

      Specified by:
        `uploadNewCredentials` in interface `Nimbus.Iface`
      Specified by:
        `uploadNewCredentials` in interface `ILocalCluster`
      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

          public void killTopology(String topologyName)
                            throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Kill a topology (if you are not using ILocalTopology).

      Specified by:
        `killTopology` in interface `Nimbus.Iface`
      Specified by:
        `killTopology` in interface `ILocalCluster`
      Parameters:
        `topologyName` - the name of the topology
      Throws:
        `org.apache.storm.thrift.TException` - on any error from nimbus

    - #### killTopologyWithOpts

          public void killTopologyWithOpts(String name,
                                           KillOptions options)
                                    throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Kill a topology (if you are not using ILocalTopology).

      Specified by:
        `killTopologyWithOpts` in interface `Nimbus.Iface`
      Specified by:
        `killTopologyWithOpts` in interface `ILocalCluster`
        `options` - for how to kill the topology
      Throws:
        `org.apache.storm.thrift.TException` - on any error from nimbus

    - #### activate

          public void activate(String topologyName)
                        throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Activate a topology.

      Specified by:
        `activate` in interface `Nimbus.Iface`
      Specified by:
        `activate` in interface `ILocalCluster`
      Parameters:
        `topologyName` - the name of the topology to activate
      Throws:
        `org.apache.storm.thrift.TException` - on any error from nimbus

    - #### deactivate

          public void deactivate(String topologyName)
                          throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Deactivate a topology.

      Specified by:
        `deactivate` in interface `Nimbus.Iface`
      Specified by:
        `deactivate` in interface `ILocalCluster`
      Parameters:
        `topologyName` - the name of the topology to deactivate
      Throws:
        `org.apache.storm.thrift.TException` - on any error from nimbus

    - #### rebalance

          public void rebalance(String name,
                                RebalanceOptions options)
                         throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Rebalance a topology.

      Specified by:
        `rebalance` in interface `Nimbus.Iface`
      Specified by:
        `rebalance` in interface `ILocalCluster`
      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

          public void shutdown()

      Description copied from interface: `ILocalCluster`

      Shut down the cluster.

      Specified by:
        `shutdown` in interface `ILocalCluster`

    - #### getTopologyConf

          public String getTopologyConf(String id)
                                 throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      The config of a topology as a JSON string.

      Specified by:
        `getTopologyConf` in interface `Nimbus.Iface`
      Specified by:
        `getTopologyConf` in interface `ILocalCluster`
      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

          public StormTopology getTopology(String id)
                                    throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Get the compiled storm topology.

      Specified by:
        `getTopology` in interface `Nimbus.Iface`
      Specified by:
        `getTopology` in interface `ILocalCluster`
      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

          public ClusterSummary getClusterInfo()
                                        throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Get cluster information.

      Specified by:
        `getClusterInfo` in interface `Nimbus.Iface`
      Specified by:
        `getClusterInfo` in interface `ILocalCluster`
      Returns:
        a summary of the current state of the cluster
      Throws:
        `org.apache.storm.thrift.TException` - on any error from nimbus

    - #### getTopologySummaries

          public List<TopologySummary> getTopologySummaries()
                                                     throws org.apache.storm.thrift.TException

      Specified by:
        `getTopologySummaries` in interface `Nimbus.Iface`
      Specified by:
        `getTopologySummaries` in interface `ILocalCluster`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologySummaryByName

          public TopologySummary getTopologySummaryByName(String name)
                                                   throws org.apache.storm.thrift.TException

      Specified by:
        `getTopologySummaryByName` in interface `Nimbus.Iface`
      Specified by:
        `getTopologySummaryByName` in interface `ILocalCluster`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologySummary

          public TopologySummary getTopologySummary(String id)
                                             throws org.apache.storm.thrift.TException

      Specified by:
        `getTopologySummary` in interface `Nimbus.Iface`
      Specified by:
        `getTopologySummary` in interface `ILocalCluster`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getTopologyInfo

          public TopologyInfo getTopologyInfo(String id)
                                       throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Get the state of a topology.

      Specified by:
        `getTopologyInfo` in interface `Nimbus.Iface`
      Specified by:
        `getTopologyInfo` in interface `ILocalCluster`
      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

          public TopologyInfo getTopologyInfoByName(String name)
                                             throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Get the state of a topology.

      Specified by:
        `getTopologyInfoByName` in interface `Nimbus.Iface`
      Specified by:
        `getTopologyInfoByName` in interface `ILocalCluster`
      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

          public TopologyInfo getTopologyInfoWithOpts(String id,
                                                      GetInfoOptions options)
                                               throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Get the state of a topology.

      Specified by:
        `getTopologyInfoWithOpts` in interface `Nimbus.Iface`
      Specified by:
        `getTopologyInfoWithOpts` in interface `ILocalCluster`
      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

          public TopologyInfo getTopologyInfoByNameWithOpts(String name,
                                                            GetInfoOptions options)
                                                     throws org.apache.storm.thrift.TException

      Description copied from interface: `ILocalCluster`

      Get the state of a topology.

      Specified by:
        `getTopologyInfoByNameWithOpts` in interface `Nimbus.Iface`
      Specified by:
        `getTopologyInfoByNameWithOpts` in interface `ILocalCluster`
      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

    - #### getThriftServerPort

          public int getThriftServerPort()

    - #### isRemoteBlobExists

          public boolean isRemoteBlobExists(String blobKey)
                                     throws AuthorizationException,
                                            org.apache.storm.thrift.TException

      Description copied from interface: `Nimbus.Iface`

      Decide if the blob is removed from cluster.

      Specified by:
        `isRemoteBlobExists` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### close

          public void close()
                     throws Exception

      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `Exception`

    - #### getSupervisor

          public Supervisor getSupervisor(String id)

      Get a specific Supervisor. This is intended mostly for internal testing.

      Parameters:
        `id` - the id of the supervisor

    - #### killSupervisor

          public void killSupervisor(String id)

      Kill a specific supervisor. This is intended mostly for internal testing.

      Parameters:
        `id` - the id of the supervisor

    - #### addSupervisor

          public Supervisor addSupervisor()
                                   throws Exception

      Add another supervisor to the topology. This is intended mostly for internal testing.

      Throws:
        `Exception`

    - #### addSupervisor

          public Supervisor addSupervisor(Number ports)
                                   throws Exception

      Add another supervisor to the topology. This is intended mostly for internal testing.

      Parameters:
        `ports` - the number of ports/slots the supervisor should have
      Throws:
        `Exception`

    - #### addSupervisor

          public Supervisor addSupervisor(Number ports,
                                          String id)
                                   throws Exception

      Add another supervisor to the topology. This is intended mostly for internal testing.

      Parameters:
        `ports` - the number of ports/slots the supervisor should have
        `id` - the id of the new supervisor, so you can find it later.
      Throws:
        `Exception`

    - #### addSupervisor

          public Supervisor addSupervisor(Number ports,
                                          Map<String,Object> conf,
                                          String id)
                                   throws Exception

      Add another supervisor to the topology. This is intended mostly for internal testing.

      Parameters:
        `ports` - the number of ports/slots the supervisor should have
        `conf` - any config values that should be added/over written in the daemon conf of the cluster.
        `id` - the id of the new supervisor, so you can find it later.
      Throws:
        `Exception`

    - #### waitForIdle

          public void waitForIdle()
                           throws InterruptedException

      Wait for the cluster to be idle. This is intended to be used with Simulated time and is for internal testing. Note that this does not wait for spout or bolt executors to be idle.

      Throws:
        `InterruptedException` - if interrupted while waiting.
        `AssertionError` - if the cluster did not come to an idle point with a timeout.

    - #### waitForIdle

          public void waitForIdle(long timeoutMs)
                           throws InterruptedException

      Wait for the cluster to be idle. This is intended to be used with Simulated time and is for internal testing. Note that this does not wait for spout or bolt executors to be idle.

      Parameters:
        `timeoutMs` - the number of ms to wait before throwing an error.
      Throws:
        `InterruptedException` - if interrupted while waiting.
        `AssertionError` - if the cluster did not come to an idle point with a timeout.

    - #### advanceClusterTime

          public void advanceClusterTime(int secs)
                                  throws InterruptedException

      Description copied from interface: `ILocalCluster`

      Advance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.

      Specified by:
        `advanceClusterTime` in interface `ILocalCluster`
      Parameters:
        `secs` - the number of seconds to advance time
      Throws:
        `InterruptedException`

    - #### advanceClusterTime

          public void advanceClusterTime(int secs,
                                         int incSecs)
                                  throws InterruptedException

      Description copied from interface: `ILocalCluster`

      Advance the cluster time when the cluster is using SimulatedTime. This is intended for internal testing only.

      Specified by:
        `advanceClusterTime` in interface `ILocalCluster`
      Parameters:
        `secs` - the number of seconds to advance time
      Throws:
        `InterruptedException`

    - #### getClusterState

          public IStormClusterState getClusterState()

      Description copied from interface: `ILocalCluster`

      This is intended for internal testing only.

      Specified by:
        `getClusterState` in interface `ILocalCluster`
      Returns:
        an internal class that holds the state of the cluster.

    - #### getTrackedId

          public String getTrackedId()

      Description copied from interface: `ILocalCluster`

      If the cluster is tracked get the id for the tracked cluster. This is intended for internal testing only.

      Specified by:
        `getTrackedId` in interface `ILocalCluster`
      Returns:
        the id of the tracked cluster

    - #### setLogConfig

          public void setLogConfig(String name,
                                   LogConfig config)
                            throws org.apache.storm.thrift.TException

      Specified by:
        `setLogConfig` in interface `Nimbus.Iface`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getLogConfig

          public LogConfig getLogConfig(String name)
                                 throws org.apache.storm.thrift.TException

      Specified by:
        `getLogConfig` in interface `Nimbus.Iface`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### debug

          public void debug(String name,
                            String component,
                            boolean enable,
                            double samplingPercentage)
                     throws NotAliveException,
                            AuthorizationException,
                            org.apache.storm.thrift.TException

      Description copied from interface: `Nimbus.Iface`

      Enable/disable logging the tuples generated in topology via an internal EventLogger bolt. The component name is optional and if null or empty, the debug flag will apply to the entire topology.

      The ‘samplingPercentage’ will limit loggging to a percentage of generated tuples.

      Specified by:
        `debug` in interface `Nimbus.Iface`
      Throws:
        `NotAliveException`
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### setWorkerProfiler

          public void setWorkerProfiler(String id,
                                        ProfileRequest profileRequest)
                                 throws org.apache.storm.thrift.TException

      Specified by:
        `setWorkerProfiler` in interface `Nimbus.Iface`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getComponentPendingProfileActions

          public List<ProfileRequest> getComponentPendingProfileActions(String id,
                                                                        String componentId,
                                                                        ProfileAction action)
                                                                 throws org.apache.storm.thrift.TException

      Specified by:
        `getComponentPendingProfileActions` in interface `Nimbus.Iface`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### beginCreateBlob

          public String beginCreateBlob(String key,
                                        SettableBlobMeta meta)
                                 throws AuthorizationException,
                                        KeyAlreadyExistsException,
                                        org.apache.storm.thrift.TException

      Specified by:
        `beginCreateBlob` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyAlreadyExistsException`
        `org.apache.storm.thrift.TException`

    - #### beginUpdateBlob

          public String beginUpdateBlob(String key)
                                 throws AuthorizationException,
                                        KeyNotFoundException,
                                        org.apache.storm.thrift.TException

      Specified by:
        `beginUpdateBlob` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyNotFoundException`
        `org.apache.storm.thrift.TException`

    - #### uploadBlobChunk

          public void uploadBlobChunk(String session,
                                      ByteBuffer chunk)
                               throws AuthorizationException,
                                      org.apache.storm.thrift.TException

      Specified by:
        `uploadBlobChunk` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### finishBlobUpload

          public void finishBlobUpload(String session)
                                throws AuthorizationException,
                                       org.apache.storm.thrift.TException

      Specified by:
        `finishBlobUpload` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### cancelBlobUpload

          public void cancelBlobUpload(String session)
                                throws AuthorizationException,
                                       org.apache.storm.thrift.TException

      Specified by:
        `cancelBlobUpload` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getBlobMeta

          public ReadableBlobMeta getBlobMeta(String key)
                                       throws AuthorizationException,
                                              KeyNotFoundException,
                                              org.apache.storm.thrift.TException

      Specified by:
        `getBlobMeta` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyNotFoundException`
        `org.apache.storm.thrift.TException`

    - #### setBlobMeta

          public void setBlobMeta(String key,
                                  SettableBlobMeta meta)
                           throws AuthorizationException,
                                  KeyNotFoundException,
                                  org.apache.storm.thrift.TException

      Specified by:
        `setBlobMeta` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyNotFoundException`
        `org.apache.storm.thrift.TException`

    - #### beginBlobDownload

          public BeginDownloadResult beginBlobDownload(String key)
                                                throws AuthorizationException,
                                                       KeyNotFoundException,
                                                       org.apache.storm.thrift.TException

      Specified by:
        `beginBlobDownload` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyNotFoundException`
        `org.apache.storm.thrift.TException`

    - #### downloadBlobChunk

          public ByteBuffer downloadBlobChunk(String session)
                                       throws AuthorizationException,
                                              org.apache.storm.thrift.TException

      Specified by:
        `downloadBlobChunk` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### deleteBlob

          public void deleteBlob(String key)
                          throws AuthorizationException,
                                 KeyNotFoundException,
                                 org.apache.storm.thrift.TException

      Specified by:
        `deleteBlob` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyNotFoundException`
        `org.apache.storm.thrift.TException`

    - #### listBlobs

          public ListBlobsResult listBlobs(String session)
                                    throws org.apache.storm.thrift.TException

      Specified by:
        `listBlobs` in interface `Nimbus.Iface`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### getBlobReplication

          public int getBlobReplication(String key)
                                 throws AuthorizationException,
                                        KeyNotFoundException,
                                        org.apache.storm.thrift.TException

      Specified by:
        `getBlobReplication` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyNotFoundException`
        `org.apache.storm.thrift.TException`

    - #### updateBlobReplication

          public int updateBlobReplication(String key,
                                           int replication)
                                    throws AuthorizationException,
                                           KeyNotFoundException,
                                           org.apache.storm.thrift.TException

      Specified by:
        `updateBlobReplication` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `KeyNotFoundException`
        `org.apache.storm.thrift.TException`

    - #### createStateInZookeeper

          public void createStateInZookeeper(String key)
                                      throws org.apache.storm.thrift.TException

      Specified by:
        `createStateInZookeeper` in interface `Nimbus.Iface`
      Throws:
        `org.apache.storm.thrift.TException`

    - #### beginFileUpload

          public String beginFileUpload()
                                 throws AuthorizationException,
                                        org.apache.storm.thrift.TException

      Specified by:
        `beginFileUpload` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### uploadChunk

          public void uploadChunk(String location,
                                  ByteBuffer chunk)
                           throws AuthorizationException,
                                  org.apache.storm.thrift.TException

      Specified by:
        `uploadChunk` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### finishFileUpload

          public void finishFileUpload(String location)
                                throws AuthorizationException,
                                       org.apache.storm.thrift.TException

      Specified by:
        `finishFileUpload` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### downloadChunk

          public ByteBuffer downloadChunk(String id)
                                   throws AuthorizationException,
                                          org.apache.storm.thrift.TException

      Specified by:
        `downloadChunk` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getNimbusConf

          public String getNimbusConf()
                               throws AuthorizationException,
                                      org.apache.storm.thrift.TException

      Specified by:
        `getNimbusConf` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getLeader

          public NimbusSummary getLeader()
                                  throws AuthorizationException,
                                         org.apache.storm.thrift.TException

      Specified by:
        `getLeader` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### isTopologyNameAllowed

          public boolean isTopologyNameAllowed(String name)
                                        throws AuthorizationException,
                                               org.apache.storm.thrift.TException

      Specified by:
        `isTopologyNameAllowed` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getTopologyPageInfo

          public TopologyPageInfo getTopologyPageInfo(String id,
                                                      String window,
                                                      boolean isIncludeSys)
                                               throws NotAliveException,
                                                      AuthorizationException,
                                                      org.apache.storm.thrift.TException

      Specified by:
        `getTopologyPageInfo` in interface `Nimbus.Iface`
      Throws:
        `NotAliveException`
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getSupervisorPageInfo

          public SupervisorPageInfo getSupervisorPageInfo(String id,
                                                          String host,
                                                          boolean isIncludeSys)
                                                   throws NotAliveException,
                                                          AuthorizationException,
                                                          org.apache.storm.thrift.TException

      Specified by:
        `getSupervisorPageInfo` in interface `Nimbus.Iface`
      Throws:
        `NotAliveException`
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getComponentPageInfo

          public ComponentPageInfo getComponentPageInfo(String topologyId,
                                                        String componentId,
                                                        String window,
                                                        boolean isIncludeSys)
                                                 throws NotAliveException,
                                                        AuthorizationException,
                                                        org.apache.storm.thrift.TException

      Specified by:
        `getComponentPageInfo` in interface `Nimbus.Iface`
      Throws:
        `NotAliveException`
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getUserTopology

          public StormTopology getUserTopology(String id)
                                        throws NotAliveException,
                                               AuthorizationException,
                                               org.apache.storm.thrift.TException

      Description copied from interface: `Nimbus.Iface`

      Returns the user specified topology as submitted originally. Compare `Nimbus.Iface.getTopology(String id)`.

      Specified by:
        `getUserTopology` in interface `Nimbus.Iface`
      Throws:
        `NotAliveException`
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getTopologyHistory

          public TopologyHistoryInfo getTopologyHistory(String user)
                                                 throws AuthorizationException,
                                                        org.apache.storm.thrift.TException

      Specified by:
        `getTopologyHistory` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getOwnerResourceSummaries

          public List<OwnerResourceSummary> getOwnerResourceSummaries(String owner)
                                                               throws AuthorizationException,
                                                                      org.apache.storm.thrift.TException

      Specified by:
        `getOwnerResourceSummaries` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### getSupervisorAssignments

          public SupervisorAssignments getSupervisorAssignments(String node)
                                                         throws AuthorizationException,
                                                                org.apache.storm.thrift.TException

      Description copied from interface: `Nimbus.Iface`

      Get assigned assignments for a specific supervisor

      Specified by:
        `getSupervisorAssignments` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### sendSupervisorWorkerHeartbeats

          public void sendSupervisorWorkerHeartbeats(SupervisorWorkerHeartbeats heartbeats)
                                              throws AuthorizationException,
                                                     org.apache.storm.thrift.TException

      Description copied from interface: `Nimbus.Iface`

      Send supervisor worker heartbeats for a specific supervisor

      Specified by:
        `sendSupervisorWorkerHeartbeats` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### sendSupervisorWorkerHeartbeat

          public void sendSupervisorWorkerHeartbeat(SupervisorWorkerHeartbeat heatbeat)
                                             throws AuthorizationException,
                                                    org.apache.storm.thrift.TException

      Description copied from interface: `Nimbus.Iface`

      Send supervisor local worker heartbeat when a supervisor is unreachable

      Specified by:
        `sendSupervisorWorkerHeartbeat` in interface `Nimbus.Iface`
      Throws:
        `AuthorizationException`
        `org.apache.storm.thrift.TException`

    - #### processWorkerMetrics

          public void processWorkerMetrics(WorkerMetrics metrics)
                                    throws org.apache.storm.thrift.TException

      Specified by:
        `processWorkerMetrics` in interface `Nimbus.Iface`
      Throws:
        `org.apache.storm.thrift.TException`

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