TLanceIndexJobTerminationReport.java
/**
* Autogenerated by Thrift Compiler (0.24.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class TLanceIndexJobTerminationReport implements org.apache.thrift.TBase<TLanceIndexJobTerminationReport, TLanceIndexJobTerminationReport._Fields>, java.io.Serializable, Cloneable, Comparable<TLanceIndexJobTerminationReport> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TLanceIndexJobTerminationReport");
private static final org.apache.thrift.protocol.TField JOB_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("job_id", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField DISPATCH_REVISION_FIELD_DESC = new org.apache.thrift.protocol.TField("dispatch_revision", org.apache.thrift.protocol.TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField INVOCATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("invocation_id", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField BE_PROCESS_EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("be_process_epoch", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField PROOF_FIELD_DESC = new org.apache.thrift.protocol.TField("proof", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TLanceIndexJobTerminationReportStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TLanceIndexJobTerminationReportTupleSchemeFactory();
public long job_id; // required
public long dispatch_revision; // required
public @org.apache.thrift.annotation.Nullable java.lang.String invocation_id; // required
public long be_process_epoch; // required
/**
*
* @see TLanceIndexTerminationProof
*/
public @org.apache.thrift.annotation.Nullable TLanceIndexTerminationProof proof; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
JOB_ID((short)1, "job_id"),
DISPATCH_REVISION((short)2, "dispatch_revision"),
INVOCATION_ID((short)3, "invocation_id"),
BE_PROCESS_EPOCH((short)4, "be_process_epoch"),
/**
*
* @see TLanceIndexTerminationProof
*/
PROOF((short)5, "proof");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // JOB_ID
return JOB_ID;
case 2: // DISPATCH_REVISION
return DISPATCH_REVISION;
case 3: // INVOCATION_ID
return INVOCATION_ID;
case 4: // BE_PROCESS_EPOCH
return BE_PROCESS_EPOCH;
case 5: // PROOF
return PROOF;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __JOB_ID_ISSET_ID = 0;
private static final int __DISPATCH_REVISION_ISSET_ID = 1;
private static final int __BE_PROCESS_EPOCH_ISSET_ID = 2;
private byte __isset_bitfield = 0;
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.JOB_ID, new org.apache.thrift.meta_data.FieldMetaData("job_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.DISPATCH_REVISION, new org.apache.thrift.meta_data.FieldMetaData("dispatch_revision", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.INVOCATION_ID, new org.apache.thrift.meta_data.FieldMetaData("invocation_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.BE_PROCESS_EPOCH, new org.apache.thrift.meta_data.FieldMetaData("be_process_epoch", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PROOF, new org.apache.thrift.meta_data.FieldMetaData("proof", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TLanceIndexTerminationProof.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TLanceIndexJobTerminationReport.class, metaDataMap);
}
public TLanceIndexJobTerminationReport() {
}
public TLanceIndexJobTerminationReport(
long job_id,
long dispatch_revision,
java.lang.String invocation_id,
long be_process_epoch,
TLanceIndexTerminationProof proof)
{
this();
this.job_id = job_id;
setJobIdIsSet(true);
this.dispatch_revision = dispatch_revision;
setDispatchRevisionIsSet(true);
this.invocation_id = invocation_id;
this.be_process_epoch = be_process_epoch;
setBeProcessEpochIsSet(true);
this.proof = proof;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TLanceIndexJobTerminationReport(TLanceIndexJobTerminationReport other) {
__isset_bitfield = other.__isset_bitfield;
this.job_id = other.job_id;
this.dispatch_revision = other.dispatch_revision;
if (other.isSetInvocationId()) {
this.invocation_id = other.invocation_id;
}
this.be_process_epoch = other.be_process_epoch;
if (other.isSetProof()) {
this.proof = other.proof;
}
}
@Override
public TLanceIndexJobTerminationReport deepCopy() {
return new TLanceIndexJobTerminationReport(this);
}
@Override
public void clear() {
setJobIdIsSet(false);
this.job_id = 0;
setDispatchRevisionIsSet(false);
this.dispatch_revision = 0;
this.invocation_id = null;
setBeProcessEpochIsSet(false);
this.be_process_epoch = 0;
this.proof = null;
}
public long getJobId() {
return this.job_id;
}
public TLanceIndexJobTerminationReport setJobId(long job_id) {
this.job_id = job_id;
setJobIdIsSet(true);
return this;
}
public void unsetJobId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __JOB_ID_ISSET_ID);
}
/** Returns true if field job_id is set (has been assigned a value) and false otherwise */
public boolean isSetJobId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __JOB_ID_ISSET_ID);
}
public void setJobIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __JOB_ID_ISSET_ID, value);
}
public long getDispatchRevision() {
return this.dispatch_revision;
}
public TLanceIndexJobTerminationReport setDispatchRevision(long dispatch_revision) {
this.dispatch_revision = dispatch_revision;
setDispatchRevisionIsSet(true);
return this;
}
public void unsetDispatchRevision() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DISPATCH_REVISION_ISSET_ID);
}
/** Returns true if field dispatch_revision is set (has been assigned a value) and false otherwise */
public boolean isSetDispatchRevision() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DISPATCH_REVISION_ISSET_ID);
}
public void setDispatchRevisionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DISPATCH_REVISION_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getInvocationId() {
return this.invocation_id;
}
public TLanceIndexJobTerminationReport setInvocationId(@org.apache.thrift.annotation.Nullable java.lang.String invocation_id) {
this.invocation_id = invocation_id;
return this;
}
public void unsetInvocationId() {
this.invocation_id = null;
}
/** Returns true if field invocation_id is set (has been assigned a value) and false otherwise */
public boolean isSetInvocationId() {
return this.invocation_id != null;
}
public void setInvocationIdIsSet(boolean value) {
if (!value) {
this.invocation_id = null;
}
}
public long getBeProcessEpoch() {
return this.be_process_epoch;
}
public TLanceIndexJobTerminationReport setBeProcessEpoch(long be_process_epoch) {
this.be_process_epoch = be_process_epoch;
setBeProcessEpochIsSet(true);
return this;
}
public void unsetBeProcessEpoch() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BE_PROCESS_EPOCH_ISSET_ID);
}
/** Returns true if field be_process_epoch is set (has been assigned a value) and false otherwise */
public boolean isSetBeProcessEpoch() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BE_PROCESS_EPOCH_ISSET_ID);
}
public void setBeProcessEpochIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BE_PROCESS_EPOCH_ISSET_ID, value);
}
/**
*
* @see TLanceIndexTerminationProof
*/
@org.apache.thrift.annotation.Nullable
public TLanceIndexTerminationProof getProof() {
return this.proof;
}
/**
*
* @see TLanceIndexTerminationProof
*/
public TLanceIndexJobTerminationReport setProof(@org.apache.thrift.annotation.Nullable TLanceIndexTerminationProof proof) {
this.proof = proof;
return this;
}
public void unsetProof() {
this.proof = null;
}
/** Returns true if field proof is set (has been assigned a value) and false otherwise */
public boolean isSetProof() {
return this.proof != null;
}
public void setProofIsSet(boolean value) {
if (!value) {
this.proof = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case JOB_ID:
if (value == null) {
unsetJobId();
} else {
setJobId((java.lang.Long)value);
}
break;
case DISPATCH_REVISION:
if (value == null) {
unsetDispatchRevision();
} else {
setDispatchRevision((java.lang.Long)value);
}
break;
case INVOCATION_ID:
if (value == null) {
unsetInvocationId();
} else {
setInvocationId((java.lang.String)value);
}
break;
case BE_PROCESS_EPOCH:
if (value == null) {
unsetBeProcessEpoch();
} else {
setBeProcessEpoch((java.lang.Long)value);
}
break;
case PROOF:
if (value == null) {
unsetProof();
} else {
setProof((TLanceIndexTerminationProof)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case JOB_ID:
return getJobId();
case DISPATCH_REVISION:
return getDispatchRevision();
case INVOCATION_ID:
return getInvocationId();
case BE_PROCESS_EPOCH:
return getBeProcessEpoch();
case PROOF:
return getProof();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case JOB_ID:
return isSetJobId();
case DISPATCH_REVISION:
return isSetDispatchRevision();
case INVOCATION_ID:
return isSetInvocationId();
case BE_PROCESS_EPOCH:
return isSetBeProcessEpoch();
case PROOF:
return isSetProof();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TLanceIndexJobTerminationReport)
return this.equals((TLanceIndexJobTerminationReport)that);
return false;
}
public boolean equals(TLanceIndexJobTerminationReport that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_job_id = true;
boolean that_present_job_id = true;
if (this_present_job_id || that_present_job_id) {
if (!(this_present_job_id && that_present_job_id))
return false;
if (this.job_id != that.job_id)
return false;
}
boolean this_present_dispatch_revision = true;
boolean that_present_dispatch_revision = true;
if (this_present_dispatch_revision || that_present_dispatch_revision) {
if (!(this_present_dispatch_revision && that_present_dispatch_revision))
return false;
if (this.dispatch_revision != that.dispatch_revision)
return false;
}
boolean this_present_invocation_id = true && this.isSetInvocationId();
boolean that_present_invocation_id = true && that.isSetInvocationId();
if (this_present_invocation_id || that_present_invocation_id) {
if (!(this_present_invocation_id && that_present_invocation_id))
return false;
if (!this.invocation_id.equals(that.invocation_id))
return false;
}
boolean this_present_be_process_epoch = true;
boolean that_present_be_process_epoch = true;
if (this_present_be_process_epoch || that_present_be_process_epoch) {
if (!(this_present_be_process_epoch && that_present_be_process_epoch))
return false;
if (this.be_process_epoch != that.be_process_epoch)
return false;
}
boolean this_present_proof = true && this.isSetProof();
boolean that_present_proof = true && that.isSetProof();
if (this_present_proof || that_present_proof) {
if (!(this_present_proof && that_present_proof))
return false;
if (!this.proof.equals(that.proof))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(job_id);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(dispatch_revision);
hashCode = hashCode * 8191 + ((isSetInvocationId()) ? 131071 : 524287);
if (isSetInvocationId())
hashCode = hashCode * 8191 + invocation_id.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(be_process_epoch);
hashCode = hashCode * 8191 + ((isSetProof()) ? 131071 : 524287);
if (isSetProof())
hashCode = hashCode * 8191 + proof.getValue();
return hashCode;
}
@Override
public int compareTo(TLanceIndexJobTerminationReport other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetJobId(), other.isSetJobId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetJobId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job_id, other.job_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDispatchRevision(), other.isSetDispatchRevision());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDispatchRevision()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dispatch_revision, other.dispatch_revision);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetInvocationId(), other.isSetInvocationId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInvocationId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invocation_id, other.invocation_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBeProcessEpoch(), other.isSetBeProcessEpoch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBeProcessEpoch()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.be_process_epoch, other.be_process_epoch);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetProof(), other.isSetProof());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProof()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.proof, other.proof);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TLanceIndexJobTerminationReport(");
boolean first = true;
sb.append("job_id:");
sb.append(this.job_id);
first = false;
if (!first) sb.append(", ");
sb.append("dispatch_revision:");
sb.append(this.dispatch_revision);
first = false;
if (!first) sb.append(", ");
sb.append("invocation_id:");
if (this.invocation_id == null) {
sb.append("null");
} else {
sb.append(this.invocation_id);
}
first = false;
if (!first) sb.append(", ");
sb.append("be_process_epoch:");
sb.append(this.be_process_epoch);
first = false;
if (!first) sb.append(", ");
sb.append("proof:");
if (this.proof == null) {
sb.append("null");
} else {
sb.append(this.proof);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'job_id' because it's a primitive and you chose the non-beans generator.
// alas, we cannot check 'dispatch_revision' because it's a primitive and you chose the non-beans generator.
if (invocation_id == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'invocation_id' was not present! Struct: " + toString());
}
// alas, we cannot check 'be_process_epoch' because it's a primitive and you chose the non-beans generator.
if (proof == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'proof' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
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);
}
}
private static class TLanceIndexJobTerminationReportStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexJobTerminationReportStandardScheme getScheme() {
return new TLanceIndexJobTerminationReportStandardScheme();
}
}
private static class TLanceIndexJobTerminationReportStandardScheme extends org.apache.thrift.scheme.StandardScheme<TLanceIndexJobTerminationReport> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TLanceIndexJobTerminationReport struct) throws org.apache.thrift.TException {
iprot.incrementRecursionDepth();
try {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // JOB_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.job_id = iprot.readI64();
struct.setJobIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DISPATCH_REVISION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.dispatch_revision = iprot.readI64();
struct.setDispatchRevisionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INVOCATION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.invocation_id = iprot.readString();
struct.setInvocationIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // BE_PROCESS_EPOCH
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.be_process_epoch = iprot.readI64();
struct.setBeProcessEpochIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // PROOF
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.proof = org.apache.doris.thrift.TLanceIndexTerminationProof.findByValue(iprot.readI32());
struct.setProofIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!struct.isSetJobId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'job_id' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetDispatchRevision()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'dispatch_revision' was not found in serialized data! Struct: " + toString());
}
if (!struct.isSetBeProcessEpoch()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'be_process_epoch' was not found in serialized data! Struct: " + toString());
}
struct.validate();
} finally {
iprot.decrementRecursionDepth();
}
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, TLanceIndexJobTerminationReport struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(JOB_ID_FIELD_DESC);
oprot.writeI64(struct.job_id);
oprot.writeFieldEnd();
oprot.writeFieldBegin(DISPATCH_REVISION_FIELD_DESC);
oprot.writeI64(struct.dispatch_revision);
oprot.writeFieldEnd();
if (struct.invocation_id != null) {
oprot.writeFieldBegin(INVOCATION_ID_FIELD_DESC);
oprot.writeString(struct.invocation_id);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(BE_PROCESS_EPOCH_FIELD_DESC);
oprot.writeI64(struct.be_process_epoch);
oprot.writeFieldEnd();
if (struct.proof != null) {
oprot.writeFieldBegin(PROOF_FIELD_DESC);
oprot.writeI32(struct.proof.getValue());
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TLanceIndexJobTerminationReportTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexJobTerminationReportTupleScheme getScheme() {
return new TLanceIndexJobTerminationReportTupleScheme();
}
}
private static class TLanceIndexJobTerminationReportTupleScheme extends org.apache.thrift.scheme.TupleScheme<TLanceIndexJobTerminationReport> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TLanceIndexJobTerminationReport struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.job_id);
oprot.writeI64(struct.dispatch_revision);
oprot.writeString(struct.invocation_id);
oprot.writeI64(struct.be_process_epoch);
oprot.writeI32(struct.proof.getValue());
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TLanceIndexJobTerminationReport struct) throws org.apache.thrift.TException {
prot.incrementRecursionDepth();
try {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.job_id = iprot.readI64();
struct.setJobIdIsSet(true);
struct.dispatch_revision = iprot.readI64();
struct.setDispatchRevisionIsSet(true);
struct.invocation_id = iprot.readString();
struct.setInvocationIdIsSet(true);
struct.be_process_epoch = iprot.readI64();
struct.setBeProcessEpochIsSet(true);
struct.proof = org.apache.doris.thrift.TLanceIndexTerminationProof.findByValue(iprot.readI32());
struct.setProofIsSet(true);
} finally {
prot.decrementRecursionDepth();
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}