For killing topology you can try this
import backtype.storm.generated.KillOptions
import backtype.storm.generated.Nimbus.Client;
import backtype.storm.utils.NimbusClient
import backtype.storm.utils.Utils
Map conf = Utils.readStormConfig();
Client client = NimbusClient.getConfiguredClient(conf).getClient();
KillOptions killOpts = new KillOptions();
//killOpts.set_wait_secs(waitSeconds); // time to wait before killing
client.killTopologyWithOpts(topology_name, killOpts); //provide topology name
To get the status of topology running
Client client = NimbusClient.getConfiguredClient(conf).getClient();
List<TopologySummary> topologyList = client.getClusterInfo.get_topologies();
// loop through the list and check if the required topology name is present in the list
// if not it's not running
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…