Class LocalCluster.LocalTopology

java.lang.Object
org.apache.storm.generated.StormTopology
org.apache.storm.LocalCluster.LocalTopology
All Implemented Interfaces:
Serializable, AutoCloseable, Cloneable, Comparable<StormTopology>, ILocalCluster.ILocalTopology, org.apache.storm.thrift.TBase<StormTopology,StormTopology._Fields>, org.apache.storm.thrift.TSerializable
Enclosing class:
LocalCluster

public class LocalCluster.LocalTopology extends StormTopology implements ILocalCluster.ILocalTopology
When running a topology locally, for tests etc. It is helpful to be sure that the topology is dead before the test exits. This is an AutoCloseable topology that not only gives you access to the compiled StormTopology but also will kill the topology when it closes. try (LocalTopology testTopo = cluster.submitTopology("testing", ...)) { // Run Some test } // The topology has been killed
See Also:
  • Constructor Details

  • Method Details

    • close

      public void close() throws org.apache.storm.thrift.TException
      Specified by:
      close in interface AutoCloseable
      Throws:
      org.apache.storm.thrift.TException