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 java.lang.Object getFieldValue(_Fields field) { switch (field) { case WAIT_SECS: return get_wait_secs(); } throw new java.lang.IllegalStateException(); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((is_set_wait_secs()) ? 131071 : 524287); if (is_set_wait_secs()) hashCode = hashCode * 8191 + wait_secs; return hashCode; }
public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case WAIT_SECS: if (value == null) { unset_wait_secs(); } else { set_wait_secs((java.lang.Integer)value); } break; } }
@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); } }
public KillOptions deepCopy() { return new KillOptions(this); }
@Override public void killTopologyWithOpts(final String topoName, final KillOptions options) throws NotAliveException, AuthorizationException, TException { killTopologyWithOptsCalls.mark(); assertTopoActive(topoName, true); try { Map<String, Object> topoConf = tryReadTopoConfFromName(topoName); topoConf = Utils.merge(conf, topoConf); final String operation = "killTopology"; checkAuthorization(topoName, topoConf, operation); Integer waitAmount = null; if (options.is_set_wait_secs()) { waitAmount = options.get_wait_secs(); } transitionName(topoName, TopologyActions.KILL, waitAmount, true); notifyTopologyActionListener(topoName, operation); addTopoToHistoryLog((String) topoConf.get(Config.STORM_ID), topoConf); } catch (Exception e) { LOG.warn("Kill topology exception. (topology name='{}')", topoName, e); if (e instanceof TException) { throw (TException) e; } throw new RuntimeException(e); } }
public void write(org.apache.storm.thrift.protocol.TProtocol oprot, KillOptions struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.is_set_wait_secs()) { oprot.writeFieldBegin(WAIT_SECS_FIELD_DESC); oprot.writeI32(struct.wait_secs); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.storm.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof KillOptions) return this.equals((KillOptions)that); return false; }
if (field.type == KILL_OPTIONS_FIELD_DESC.type) { KillOptions kill_options; kill_options = new KillOptions(); kill_options.read(iprot); return kill_options; } else {
@Override public void killTopology(String name) throws NotAliveException, AuthorizationException, TException { killTopologyCalls.mark(); killTopologyWithOpts(name, new KillOptions()); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case WAIT_SECS: if (value == null) { unset_wait_secs(); } else { set_wait_secs((Integer)value); } break; } }
public void write(org.apache.thrift.protocol.TProtocol oprot, KillOptions struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.is_set_wait_secs()) { oprot.writeFieldBegin(WAIT_SECS_FIELD_DESC); oprot.writeI32(struct.wait_secs); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof KillOptions) return this.equals((KillOptions)that); return false; }
public static void kill(Nimbus.Iface client, String topoName) throws Exception { KillOptions opts = new KillOptions(); opts.set_wait_secs(0); client.killTopologyWithOpts(topoName, opts); }
@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); } }
public KillOptions deepCopy() { return new KillOptions(this); }
public boolean equals(KillOptions that) { if (that == null) return false; if (this == that) return true; boolean this_present_wait_secs = true && this.is_set_wait_secs(); boolean that_present_wait_secs = true && that.is_set_wait_secs(); if (this_present_wait_secs || that_present_wait_secs) { if (!(this_present_wait_secs && that_present_wait_secs)) return false; if (this.wait_secs != that.wait_secs) return false; } return true; }