public ExecutorStats deepCopy() { return new ExecutorStats(this); }
/** * Performs a deep copy on <i>other</i>. */ public ClusterWorkerHeartbeat(ClusterWorkerHeartbeat other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_storm_id()) { this.storm_id = other.storm_id; } if (other.is_set_executor_stats()) { java.util.Map<ExecutorInfo,ExecutorStats> __this__executor_stats = new java.util.HashMap<ExecutorInfo,ExecutorStats>(other.executor_stats.size()); for (java.util.Map.Entry<ExecutorInfo, ExecutorStats> other_element : other.executor_stats.entrySet()) { ExecutorInfo other_element_key = other_element.getKey(); ExecutorStats other_element_value = other_element.getValue(); ExecutorInfo __this__executor_stats_copy_key = new ExecutorInfo(other_element_key); ExecutorStats __this__executor_stats_copy_value = new ExecutorStats(other_element_value); __this__executor_stats.put(__this__executor_stats_copy_key, __this__executor_stats_copy_value); } this.executor_stats = __this__executor_stats; } this.time_secs = other.time_secs; this.uptime_secs = other.uptime_secs; }
/** * Convert Executor stats to thrift data structure. * @param stats the stats in the form of a map. * @return teh thrift structure for the stats. */ public static ExecutorStats thriftifyExecutorStats(Map stats) { ExecutorStats ret = new ExecutorStats(); ExecutorSpecificStats specificStats = thriftifySpecificStats(stats); ret.set_specific(specificStats); ret.set_emitted(ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, EMITTED), TO_STRING, TO_STRING)); ret.set_transferred(ClientStatsUtil.windowSetConverter(ClientStatsUtil.getMapByKey(stats, TRANSFERRED), TO_STRING, TO_STRING)); ret.set_rate(((Number) stats.get(RATE)).doubleValue()); return ret; }
/** * Performs a deep copy on <i>other</i>. */ public ExecutorSummary(ExecutorSummary other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_executor_info()) { this.executor_info = new ExecutorInfo(other.executor_info); } if (other.is_set_component_id()) { this.component_id = other.component_id; } if (other.is_set_host()) { this.host = other.host; } this.port = other.port; this.uptime_secs = other.uptime_secs; if (other.is_set_stats()) { this.stats = new ExecutorStats(other.stats); } }
@Override public void read(org.apache.storm.thrift.protocol.TProtocol prot, ClusterWorkerHeartbeat struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; struct.storm_id = iprot.readString(); struct.set_storm_id_isSet(true); { org.apache.storm.thrift.protocol.TMap _map778 = new org.apache.storm.thrift.protocol.TMap(org.apache.storm.thrift.protocol.TType.STRUCT, org.apache.storm.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.executor_stats = new java.util.HashMap<ExecutorInfo,ExecutorStats>(2*_map778.size); ExecutorInfo _key779; ExecutorStats _val780; for (int _i781 = 0; _i781 < _map778.size; ++_i781) { _key779 = new ExecutorInfo(); _key779.read(iprot); _val780 = new ExecutorStats(); _val780.read(iprot); struct.executor_stats.put(_key779, _val780); } } struct.set_executor_stats_isSet(true); struct.time_secs = iprot.readI32(); struct.set_time_secs_isSet(true); struct.uptime_secs = iprot.readI32(); struct.set_uptime_secs_isSet(true); } }
@Override public void read(org.apache.storm.thrift.protocol.TProtocol prot, ExecutorSummary struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; struct.executor_info = new ExecutorInfo(); struct.executor_info.read(iprot); struct.set_executor_info_isSet(true); struct.component_id = iprot.readString(); struct.set_component_id_isSet(true); struct.host = iprot.readString(); struct.set_host_isSet(true); struct.port = iprot.readI32(); struct.set_port_isSet(true); struct.uptime_secs = iprot.readI32(); struct.set_uptime_secs_isSet(true); java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.stats = new ExecutorStats(); struct.stats.read(iprot); struct.set_stats_isSet(true); } } }
@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; } }
_val774 = new ExecutorStats(); _val774.read(iprot); struct.executor_stats.put(_key773, _val774);
@Override public ExecutorStats renderStats() { ExecutorStats ret = new ExecutorStats(); // common stats ret.set_emitted(valueStat(getEmitted())); ret.set_transferred(valueStat(getTransferred())); ret.set_rate(this.rate); // bolt stats BoltStats boltStats = new BoltStats( ClientStatsUtil.windowSetConverter(valueStat(getAcked()), ClientStatsUtil.TO_GSID, ClientStatsUtil.IDENTITY), ClientStatsUtil.windowSetConverter(valueStat(getFailed()), ClientStatsUtil.TO_GSID, ClientStatsUtil.IDENTITY), ClientStatsUtil.windowSetConverter(valueStat(processLatencyStats), ClientStatsUtil.TO_GSID, ClientStatsUtil.IDENTITY), ClientStatsUtil.windowSetConverter(valueStat(executedStats), ClientStatsUtil.TO_GSID, ClientStatsUtil.IDENTITY), ClientStatsUtil.windowSetConverter(valueStat(executeLatencyStats), ClientStatsUtil.TO_GSID, ClientStatsUtil.IDENTITY)); ret.set_specific(ExecutorSpecificStats.bolt(boltStats)); return ret; } }
case 7: // STATS if (schemeField.type == org.apache.storm.thrift.protocol.TType.STRUCT) { struct.stats = new ExecutorStats(); struct.stats.read(iprot); struct.set_stats_isSet(true);
public ExecutorStats deepCopy() { return new ExecutorStats(this); }
/** * Performs a deep copy on <i>other</i>. */ public ClusterWorkerHeartbeat(ClusterWorkerHeartbeat other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_storm_id()) { this.storm_id = other.storm_id; } if (other.is_set_executor_stats()) { Map<ExecutorInfo,ExecutorStats> __this__executor_stats = new HashMap<ExecutorInfo,ExecutorStats>(other.executor_stats.size()); for (Map.Entry<ExecutorInfo, ExecutorStats> other_element : other.executor_stats.entrySet()) { ExecutorInfo other_element_key = other_element.getKey(); ExecutorStats other_element_value = other_element.getValue(); ExecutorInfo __this__executor_stats_copy_key = new ExecutorInfo(other_element_key); ExecutorStats __this__executor_stats_copy_value = new ExecutorStats(other_element_value); __this__executor_stats.put(__this__executor_stats_copy_key, __this__executor_stats_copy_value); } this.executor_stats = __this__executor_stats; } this.time_secs = other.time_secs; this.uptime_secs = other.uptime_secs; }
/** * Performs a deep copy on <i>other</i>. */ public ExecutorSummary(ExecutorSummary other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_executor_info()) { this.executor_info = new ExecutorInfo(other.executor_info); } if (other.is_set_component_id()) { this.component_id = other.component_id; } if (other.is_set_host()) { this.host = other.host; } this.port = other.port; this.uptime_secs = other.uptime_secs; if (other.is_set_stats()) { this.stats = new ExecutorStats(other.stats); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ClusterWorkerHeartbeat struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.storm_id = iprot.readString(); struct.set_storm_id_isSet(true); { org.apache.thrift.protocol.TMap _map700 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.executor_stats = new HashMap<ExecutorInfo,ExecutorStats>(2*_map700.size); ExecutorInfo _key701; ExecutorStats _val702; for (int _i703 = 0; _i703 < _map700.size; ++_i703) { _key701 = new ExecutorInfo(); _key701.read(iprot); _val702 = new ExecutorStats(); _val702.read(iprot); struct.executor_stats.put(_key701, _val702); } } struct.set_executor_stats_isSet(true); struct.time_secs = iprot.readI32(); struct.set_time_secs_isSet(true); struct.uptime_secs = iprot.readI32(); struct.set_uptime_secs_isSet(true); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorSummary struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.executor_info = new ExecutorInfo(); struct.executor_info.read(iprot); struct.set_executor_info_isSet(true); struct.component_id = iprot.readString(); struct.set_component_id_isSet(true); struct.host = iprot.readString(); struct.set_host_isSet(true); struct.port = iprot.readI32(); struct.set_port_isSet(true); struct.uptime_secs = iprot.readI32(); struct.set_uptime_secs_isSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.stats = new ExecutorStats(); struct.stats.read(iprot); struct.set_stats_isSet(true); } } }
_val696 = new ExecutorStats(); _val696.read(iprot); struct.executor_stats.put(_key695, _val696);
case 7: // STATS if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.stats = new ExecutorStats(); struct.stats.read(iprot); struct.set_stats_isSet(true);