public SpoutStats deepCopy() { return new SpoutStats(this); }
@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 BOLT: BoltStats bolt; bolt = new BoltStats(); bolt.read(iprot); return bolt; case SPOUT: SpoutStats spout; spout = new SpoutStats(); spout.read(iprot); return spout; 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); } }
if (field.type == SPOUT_FIELD_DESC.type) { SpoutStats spout; spout = new SpoutStats(); spout.read(iprot); return spout;
@Override public ExecutorStats renderStats() { ExecutorStats ret = new ExecutorStats(); // common fields ret.set_emitted(valueStat(getEmitted())); ret.set_transferred(valueStat(getTransferred())); ret.set_rate(this.rate); // spout stats SpoutStats spoutStats = new SpoutStats( valueStat(getAcked()), valueStat(getFailed()), valueStat(completeLatencyStats)); ret.set_specific(ExecutorSpecificStats.spout(spoutStats)); return ret; } }
private static ExecutorSpecificStats thriftifySpecificStats(Map stats) { ExecutorSpecificStats specificStats = new ExecutorSpecificStats(); String compType = (String) stats.get(TYPE); if (ClientStatsUtil.BOLT.equals(compType)) { BoltStats boltStats = new BoltStats(); boltStats.set_acked( ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, ACKED), ClientStatsUtil.TO_GSID, TO_STRING)); boltStats.set_executed( ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, EXECUTED), ClientStatsUtil.TO_GSID, TO_STRING)); boltStats.set_execute_ms_avg( ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, EXEC_LATENCIES), ClientStatsUtil.TO_GSID, TO_STRING)); boltStats.set_failed( ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, FAILED), ClientStatsUtil.TO_GSID, TO_STRING)); boltStats.set_process_ms_avg( ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, PROC_LATENCIES), ClientStatsUtil.TO_GSID, TO_STRING)); specificStats.set_bolt(boltStats); } else { SpoutStats spoutStats = new SpoutStats(); spoutStats.set_acked(ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, ACKED), TO_STRING, TO_STRING)); spoutStats.set_failed(ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, FAILED), TO_STRING, TO_STRING)); spoutStats.set_complete_ms_avg( ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, COMP_LATENCIES), TO_STRING, TO_STRING)); specificStats.set_spout(spoutStats); } return specificStats; }
public SpoutStats deepCopy() { return new SpoutStats(this); }
@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 BOLT: BoltStats bolt; bolt = new BoltStats(); bolt.read(iprot); return bolt; case SPOUT: SpoutStats spout; spout = new SpoutStats(); spout.read(iprot); return spout; 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 == SPOUT_FIELD_DESC.type) { SpoutStats spout; spout = new SpoutStats(); spout.read(iprot); return spout;