public void write(org.apache.thrift.protocol.TProtocol oprot, SupervisorSummary struct) throws org.apache.thrift.TException { struct.validate();
struct.validate();
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_supervisor()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'supervisor' is unset! Struct:" + toString()); } if (!is_set_workers()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'workers' is unset! Struct:" + toString()); } if (!is_set_workerMetric()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'workerMetric' is unset! Struct:" + toString()); } // check for sub-struct validity if (supervisor != null) { supervisor.validate(); } }
public void write(org.apache.thrift7.protocol.TProtocol oprot) throws org.apache.thrift7.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.host != null) { oprot.writeFieldBegin(HOST_FIELD_DESC); oprot.writeString(this.host); oprot.writeFieldEnd(); } oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC); oprot.writeI32(this.uptime_secs); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_WORKERS_FIELD_DESC); oprot.writeI32(this.num_workers); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_USED_WORKERS_FIELD_DESC); oprot.writeI32(this.num_used_workers); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_supervisor()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'supervisor' is unset! Struct:" + toString()); } if (!is_set_workers()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'workers' is unset! Struct:" + toString()); } if (!is_set_workerMetric()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'workerMetric' is unset! Struct:" + toString()); } // check for sub-struct validity if (supervisor != null) { supervisor.validate(); } }
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.host != null) { oprot.writeFieldBegin(HOST_FIELD_DESC); oprot.writeString(this.host); oprot.writeFieldEnd(); } oprot.writeFieldBegin(UPTIME_SECS_FIELD_DESC); oprot.writeI32(this.uptime_secs); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_WORKERS_FIELD_DESC); oprot.writeI32(this.num_workers); oprot.writeFieldEnd(); oprot.writeFieldBegin(NUM_USED_WORKERS_FIELD_DESC); oprot.writeI32(this.num_used_workers); oprot.writeFieldEnd(); if (this.supervisor_id != null) { oprot.writeFieldBegin(SUPERVISOR_ID_FIELD_DESC); oprot.writeString(this.supervisor_id); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, SupervisorSummary struct) throws org.apache.thrift.TException { struct.validate();