public KillOptions deepCopy() { return new KillOptions(this); }
@Override public void killTopology(String name) throws NotAliveException, AuthorizationException, TException { killTopologyCalls.mark(); killTopologyWithOpts(name, new KillOptions()); }
public static void kill(Nimbus.Iface client, String name) throws Exception { KillOptions opts = new KillOptions(); opts.set_wait_secs(0); client.killTopologyWithOpts(name, opts); }
private static void kill(Nimbus.Iface client, String topologyName) throws Exception { KillOptions opts = new KillOptions(); opts.set_wait_secs(0); client.killTopologyWithOpts(topologyName, opts); }
public static void kill(Nimbus.Iface client, String topoName) throws Exception { KillOptions opts = new KillOptions(); opts.set_wait_secs(0); client.killTopologyWithOpts(topoName, opts); }
public static void kill(Nimbus.Iface client, String name) throws Exception { KillOptions opts = new KillOptions(); opts.set_wait_secs(0); client.killTopologyWithOpts(name, opts); }
public static void main(String[] args) throws Exception { Map<String, Object> cl = CLI.opt("w", "wait", null, CLI.AS_INT) .arg("TOPO", CLI.INTO_LIST) .parse(args); final List<String> names = (List<String>) cl.get("TOPO"); Integer wait = (Integer) cl.get("w"); final KillOptions opts = new KillOptions(); if (wait != null) { opts.set_wait_secs(wait); } NimbusClient.withConfiguredClient(new NimbusClient.WithNimbus() { @Override public void run(Nimbus.Iface nimbus) throws Exception { for (String name : names) { nimbus.killTopologyWithOpts(name, opts); LOG.info("Killed topology: {}", name); } } }); } }
@Override protected java.lang.Object tupleSchemeReadValue(org.apache.storm.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.storm.thrift.TException { _Fields setField = _Fields.findByThriftId(fieldID); if (setField != null) { switch (setField) { case KILL_OPTIONS: KillOptions kill_options; kill_options = new KillOptions(); kill_options.read(iprot); return kill_options; case REBALANCE_OPTIONS: RebalanceOptions rebalance_options; rebalance_options = new RebalanceOptions(); rebalance_options.read(iprot); return rebalance_options; default: throw new java.lang.IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { throw new org.apache.storm.thrift.protocol.TProtocolException("Couldn't find a field with field id " + fieldID); } }
/** * putTopologyKill. * @param client client * @param id id * @param waitTime waitTime * @return putTopologyKill * @throws TException TException */ public static Map<String, Object> putTopologyKill(Nimbus.Iface client, String id, String waitTime) throws TException { GetInfoOptions getInfoOptions = new GetInfoOptions(); getInfoOptions.set_num_err_choice(NumErrorsChoice.NONE); TopologyInfo topologyInfo = client.getTopologyInfoWithOpts(id, getInfoOptions); KillOptions killOptions = new KillOptions(); killOptions.set_wait_secs(Integer.parseInt(waitTime)); client.killTopologyWithOpts(topologyInfo.get_name(), killOptions); return getTopologyOpResponse(id, "kill"); }
if (field.type == KILL_OPTIONS_FIELD_DESC.type) { KillOptions kill_options; kill_options = new KillOptions(); kill_options.read(iprot); return kill_options;
KillOptions killOpts = new KillOptions(); killOpts.set_wait_secs(0); cluster.killTopologyWithOpts(topoName, killOpts);
protected void killTopology() { KillOptions ko = new KillOptions(); ko.set_wait_secs(0); stormCluster.killTopologyWithOpts(getTopologyName(), ko); try { // Actually wait for it to die. Thread.sleep(2000); } catch (InterruptedException e) { // Do nothing } }
public KillOptions deepCopy() { return new KillOptions(this); }
private KillOptions createKillOptions() { KillOptions kop = new KillOptions(); kop.set_wait_secs(stormConf.getKillWaitingSeconds()); return kop; }
@Override protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException { _Fields setField = _Fields.findByThriftId(fieldID); if (setField != null) { switch (setField) { case KILL_OPTIONS: KillOptions kill_options; kill_options = new KillOptions(); kill_options.read(iprot); return kill_options; case REBALANCE_OPTIONS: RebalanceOptions rebalance_options; rebalance_options = new RebalanceOptions(); rebalance_options.read(iprot); return rebalance_options; default: throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { throw new TProtocolException("Couldn't find a field with field id " + fieldID); } }
if (field.type == KILL_OPTIONS_FIELD_DESC.type) { KillOptions kill_options; kill_options = new KillOptions(); kill_options.read(iprot); return kill_options;
} finally { KillOptions killOpts = new KillOptions(); killOpts.set_wait_secs(0);