Search in sources :

Example 11 with KillOptions

use of org.apache.storm.generated.KillOptions in project storm by apache.

the class Helper method killAndShutdownCluster.

public static void killAndShutdownCluster(LocalCluster cluster, String topoName) throws Exception {
    KillOptions opts = new KillOptions();
    opts.set_wait_secs(0);
    cluster.killTopologyWithOpts(topoName, opts);
    cluster.shutdown();
}
Also used : KillOptions(org.apache.storm.generated.KillOptions)

Example 12 with KillOptions

use of org.apache.storm.generated.KillOptions in project storm by apache.

the class StormCluster method killSilently.

public void killSilently(String topologyName) {
    try {
        client.killTopologyWithOpts(topologyName, new KillOptions());
        log.info("Topology killed: " + topologyName);
    } catch (Throwable e) {
        log.warn("Couldn't kill topology: " + topologyName + " Exception: " + ExceptionUtils.getFullStackTrace(e));
    }
}
Also used : KillOptions(org.apache.storm.generated.KillOptions)

Example 13 with KillOptions

use of org.apache.storm.generated.KillOptions in project metron by apache.

the class FluxTopologyComponent method killTopology.

protected void killTopology() {
    KillOptions ko = new KillOptions();
    ko.set_wait_secs(0);
    stormCluster.killTopologyWithOpts(topologyName, ko);
    try {
        // Actually wait for it to die.
        Thread.sleep(2000);
    } catch (InterruptedException e) {
    // Do nothing
    }
}
Also used : KillOptions(org.apache.storm.generated.KillOptions)

Example 14 with KillOptions

use of org.apache.storm.generated.KillOptions in project storm by apache.

the class FastWordCountTopology method kill.

public static void kill(Nimbus.Iface client, String name) throws Exception {
    KillOptions opts = new KillOptions();
    opts.set_wait_secs(0);
    client.killTopologyWithOpts(name, opts);
}
Also used : KillOptions(org.apache.storm.generated.KillOptions)

Example 15 with KillOptions

use of org.apache.storm.generated.KillOptions in project storm by apache.

the class Nimbus method killTopology.

@Override
public void killTopology(String name) throws NotAliveException, AuthorizationException, TException {
    killTopologyCalls.mark();
    killTopologyWithOpts(name, new KillOptions());
}
Also used : KillOptions(org.apache.storm.generated.KillOptions)

Aggregations

KillOptions (org.apache.storm.generated.KillOptions)15 List (java.util.List)2 TException (org.apache.storm.thrift.TException)2 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 Predicate (java.util.function.Predicate)1 Collectors (java.util.stream.Collectors)1 IStormClusterState (org.apache.storm.cluster.IStormClusterState)1 Bolt (org.apache.storm.generated.Bolt)1 GetInfoOptions (org.apache.storm.generated.GetInfoOptions)1 GlobalStreamId (org.apache.storm.generated.GlobalStreamId)1 Grouping (org.apache.storm.generated.Grouping)1 Nimbus (org.apache.storm.generated.Nimbus)1 SpoutSpec (org.apache.storm.generated.SpoutSpec)1