public void write(org.apache.thrift.protocol.TProtocol oprot, WorkerSummary struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(PORT_FIELD_DESC); oprot.writeI32(struct.port); oprot.writeFieldEnd(); oprot.writeFieldBegin(UPTIME_FIELD_DESC); oprot.writeI32(struct.uptime); oprot.writeFieldEnd(); if (struct.topology != null) { oprot.writeFieldBegin(TOPOLOGY_FIELD_DESC); oprot.writeString(struct.topology); oprot.writeFieldEnd(); } if (struct.tasks != null) { oprot.writeFieldBegin(TASKS_FIELD_DESC); { oprot.writeListBegin( new org.apache.thrift.protocol.TList( org.apache.thrift.protocol.TType.STRUCT, struct.tasks.size())); for (TaskComponent _iter101 : struct.tasks) { _iter101.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, WorkerSummary struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.port); oprot.writeI32(struct.uptime); oprot.writeString(struct.topology); { oprot.writeI32(struct.tasks.size()); for (TaskComponent _iter102 : struct.tasks) { _iter102.write(oprot); } } }