private static ExecutorAggregateStats thriftifyExecAggStats(String compId, String compType, Map m) { ExecutorSummary executorSummary = new ExecutorSummary(); List executor = (List) m.get(EXECUTOR_ID); executorSummary.set_executor_info(new ExecutorInfo(((Number) executor.get(0)).intValue(), ((Number) executor.get(1)).intValue())); executorSummary.set_component_id(compId); executorSummary.set_host((String) m.get(HOST)); executorSummary.set_port(getByKeyOr0(m, PORT).intValue()); int uptime = getByKeyOr0(m, ClientStatsUtil.UPTIME).intValue(); executorSummary.set_uptime_secs(uptime); ExecutorAggregateStats stats = new ExecutorAggregateStats(); stats.set_exec_summary(executorSummary); if (compType.equals(ClientStatsUtil.SPOUT)) { stats.set_stats(thriftifySpoutAggStats(m)); } else { stats.set_stats(thriftifyBoltAggStats(m)); } return stats; }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case EXEC_SUMMARY: return get_exec_summary(); case STATS: return get_stats(); } throw new java.lang.IllegalStateException(); }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof ExecutorAggregateStats) return this.equals((ExecutorAggregateStats)that); return false; }
public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case EXEC_SUMMARY: if (value == null) { unset_exec_summary(); } else { set_exec_summary((ExecutorSummary)value); } break; case STATS: if (value == null) { unset_stats(); } else { set_stats((ComponentAggregateStats)value); } break; } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case EXEC_SUMMARY: return is_set_exec_summary(); case STATS: return is_set_stats(); } throw new java.lang.IllegalStateException(); }
for (int _i558 = 0; _i558 < _list556.size; ++_i558) _elem557 = new ExecutorAggregateStats(); _elem557.read(iprot); struct.exec_stats.add(_elem557);
public void write(org.apache.storm.thrift.protocol.TProtocol oprot, ExecutorAggregateStats struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.exec_summary != null) { if (struct.is_set_exec_summary()) { oprot.writeFieldBegin(EXEC_SUMMARY_FIELD_DESC); struct.exec_summary.write(oprot); oprot.writeFieldEnd(); } } if (struct.stats != null) { if (struct.is_set_stats()) { oprot.writeFieldBegin(STATS_FIELD_DESC); struct.stats.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
struct.exec_summary = new ExecutorSummary(); struct.exec_summary.read(iprot); struct.set_exec_summary_isSet(true); } else { org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.stats = new ComponentAggregateStats(); struct.stats.read(iprot); struct.set_stats_isSet(true); } else { org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public ExecutorAggregateStats deepCopy() { return new ExecutorAggregateStats(this); }
@Override public void read(org.apache.storm.thrift.protocol.TProtocol prot, ExecutorAggregateStats struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; java.util.BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.exec_summary = new ExecutorSummary(); struct.exec_summary.read(iprot); struct.set_exec_summary_isSet(true); } if (incoming.get(1)) { struct.stats = new ComponentAggregateStats(); struct.stats.read(iprot); struct.set_stats_isSet(true); } } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { 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 int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((is_set_exec_summary()) ? 131071 : 524287); if (is_set_exec_summary()) hashCode = hashCode * 8191 + exec_summary.hashCode(); hashCode = hashCode * 8191 + ((is_set_stats()) ? 131071 : 524287); if (is_set_stats()) hashCode = hashCode * 8191 + stats.hashCode(); return hashCode; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case EXEC_SUMMARY: if (value == null) { unset_exec_summary(); } else { set_exec_summary((ExecutorSummary)value); } break; case STATS: if (value == null) { unset_stats(); } else { set_stats((ComponentAggregateStats)value); } break; } }
for (int _i524 = 0; _i524 < _list522.size; ++_i524) _elem523 = new ExecutorAggregateStats(); _elem523.read(iprot); struct.exec_stats.add(_elem523);
public void write(org.apache.thrift.protocol.TProtocol oprot, ExecutorAggregateStats struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.exec_summary != null) { if (struct.is_set_exec_summary()) { oprot.writeFieldBegin(EXEC_SUMMARY_FIELD_DESC); struct.exec_summary.write(oprot); oprot.writeFieldEnd(); } } if (struct.stats != null) { if (struct.is_set_stats()) { oprot.writeFieldBegin(STATS_FIELD_DESC); struct.stats.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
struct.exec_summary = new ExecutorSummary(); struct.exec_summary.read(iprot); struct.set_exec_summary_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.stats = new ComponentAggregateStats(); struct.stats.read(iprot); struct.set_stats_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
java.util.List<ExecutorAggregateStats> __this__exec_stats = new java.util.ArrayList<ExecutorAggregateStats>(other.exec_stats.size()); for (ExecutorAggregateStats other_element : other.exec_stats) { __this__exec_stats.add(new ExecutorAggregateStats(other_element));
@Override public void read(org.apache.thrift.protocol.TProtocol prot, ExecutorAggregateStats struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.exec_summary = new ExecutorSummary(); struct.exec_summary.read(iprot); struct.set_exec_summary_isSet(true); } if (incoming.get(1)) { struct.stats = new ComponentAggregateStats(); struct.stats.read(iprot); struct.set_stats_isSet(true); } } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { 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); } }
/** * Performs a deep copy on <i>other</i>. */ public ExecutorAggregateStats(ExecutorAggregateStats other) { if (other.is_set_exec_summary()) { this.exec_summary = new ExecutorSummary(other.exec_summary); } if (other.is_set_stats()) { this.stats = new ComponentAggregateStats(other.stats); } }