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
StormTopology._Fields
metaDataMap
Constructor and Description |
---|
LocalTopology(String topoName,
StormTopology topo) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
add_to_dependency_artifacts, add_to_dependency_jars, add_to_worker_hooks, clear, compareTo, deepCopy, equals, equals, fieldForId, get_bolts_size, get_bolts, get_component_to_shared_memory_size, get_component_to_shared_memory, get_dependency_artifacts_iterator, get_dependency_artifacts_size, get_dependency_artifacts, get_dependency_jars_iterator, get_dependency_jars_size, get_dependency_jars, get_jdk_version, get_shared_memory_size, get_shared_memory, get_spouts_size, get_spouts, get_state_spouts_size, get_state_spouts, get_storm_version, get_worker_hooks_iterator, get_worker_hooks_size, get_worker_hooks, getFieldValue, hashCode, is_set_bolts, is_set_component_to_shared_memory, is_set_dependency_artifacts, is_set_dependency_jars, is_set_jdk_version, is_set_shared_memory, is_set_spouts, is_set_state_spouts, is_set_storm_version, is_set_worker_hooks, isSet, put_to_bolts, put_to_component_to_shared_memory, put_to_shared_memory, put_to_spouts, put_to_state_spouts, read, set_bolts_isSet, set_bolts, set_component_to_shared_memory_isSet, set_component_to_shared_memory, set_dependency_artifacts_isSet, set_dependency_artifacts, set_dependency_jars_isSet, set_dependency_jars, set_jdk_version_isSet, set_jdk_version, set_shared_memory_isSet, set_shared_memory, set_spouts_isSet, set_spouts, set_state_spouts_isSet, set_state_spouts, set_storm_version_isSet, set_storm_version, set_worker_hooks_isSet, set_worker_hooks, setFieldValue, toString, unset_bolts, unset_component_to_shared_memory, unset_dependency_artifacts, unset_dependency_jars, unset_jdk_version, unset_shared_memory, unset_spouts, unset_state_spouts, unset_storm_version, unset_worker_hooks, validate, write
public LocalTopology(String topoName, StormTopology topo)
public void close() throws org.apache.storm.thrift.TException
close
in interface AutoCloseable
org.apache.storm.thrift.TException
Copyright © 2022 The Apache Software Foundation. All rights reserved.