TLanceIndexJobReport.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 TLanceIndexJobReport implements org.apache.thrift.TBase<TLanceIndexJobReport, TLanceIndexJobReport._Fields>, java.io.Serializable, Cloneable, Comparable<TLanceIndexJobReport> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TLanceIndexJobReport");
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 RESULT_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("result_code", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField COMPLETION_REASON_FIELD_DESC = new org.apache.thrift.protocol.TField("completion_reason", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField SANITIZED_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("sanitized_message", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField EXTERNAL_METADATA_ADVANCED_FIELD_DESC = new org.apache.thrift.protocol.TField("external_metadata_advanced", org.apache.thrift.protocol.TType.BOOL, (short)8);
private static final org.apache.thrift.protocol.TField TERMINATION_PROOF_FIELD_DESC = new org.apache.thrift.protocol.TField("termination_proof", org.apache.thrift.protocol.TType.I32, (short)9);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TLanceIndexJobReportStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TLanceIndexJobReportTupleSchemeFactory();
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 TLanceIndexJobResultCode
*/
public @org.apache.thrift.annotation.Nullable TLanceIndexJobResultCode result_code; // required
/**
*
* @see TLanceIndexCompletionReason
*/
public @org.apache.thrift.annotation.Nullable TLanceIndexCompletionReason completion_reason; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String sanitized_message; // optional
public boolean external_metadata_advanced; // optional
/**
*
* @see TLanceIndexTerminationProof
*/
public @org.apache.thrift.annotation.Nullable TLanceIndexTerminationProof termination_proof; // optional
/** 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 TLanceIndexJobResultCode
*/
RESULT_CODE((short)5, "result_code"),
/**
*
* @see TLanceIndexCompletionReason
*/
COMPLETION_REASON((short)6, "completion_reason"),
SANITIZED_MESSAGE((short)7, "sanitized_message"),
EXTERNAL_METADATA_ADVANCED((short)8, "external_metadata_advanced"),
/**
*
* @see TLanceIndexTerminationProof
*/
TERMINATION_PROOF((short)9, "termination_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: // RESULT_CODE
return RESULT_CODE;
case 6: // COMPLETION_REASON
return COMPLETION_REASON;
case 7: // SANITIZED_MESSAGE
return SANITIZED_MESSAGE;
case 8: // EXTERNAL_METADATA_ADVANCED
return EXTERNAL_METADATA_ADVANCED;
case 9: // TERMINATION_PROOF
return TERMINATION_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 static final int __EXTERNAL_METADATA_ADVANCED_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields[] optionals = {_Fields.COMPLETION_REASON,_Fields.SANITIZED_MESSAGE,_Fields.EXTERNAL_METADATA_ADVANCED,_Fields.TERMINATION_PROOF};
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.RESULT_CODE, new org.apache.thrift.meta_data.FieldMetaData("result_code", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TLanceIndexJobResultCode.class)));
tmpMap.put(_Fields.COMPLETION_REASON, new org.apache.thrift.meta_data.FieldMetaData("completion_reason", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TLanceIndexCompletionReason.class)));
tmpMap.put(_Fields.SANITIZED_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("sanitized_message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.EXTERNAL_METADATA_ADVANCED, new org.apache.thrift.meta_data.FieldMetaData("external_metadata_advanced", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.TERMINATION_PROOF, new org.apache.thrift.meta_data.FieldMetaData("termination_proof", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TLanceIndexJobReport.class, metaDataMap);
}
public TLanceIndexJobReport() {
}
public TLanceIndexJobReport(
long job_id,
long dispatch_revision,
java.lang.String invocation_id,
long be_process_epoch,
TLanceIndexJobResultCode result_code)
{
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.result_code = result_code;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TLanceIndexJobReport(TLanceIndexJobReport 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.isSetResultCode()) {
this.result_code = other.result_code;
}
if (other.isSetCompletionReason()) {
this.completion_reason = other.completion_reason;
}
if (other.isSetSanitizedMessage()) {
this.sanitized_message = other.sanitized_message;
}
this.external_metadata_advanced = other.external_metadata_advanced;
if (other.isSetTerminationProof()) {
this.termination_proof = other.termination_proof;
}
}
@Override
public TLanceIndexJobReport deepCopy() {
return new TLanceIndexJobReport(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.result_code = null;
this.completion_reason = null;
this.sanitized_message = null;
setExternalMetadataAdvancedIsSet(false);
this.external_metadata_advanced = false;
this.termination_proof = null;
}
public long getJobId() {
return this.job_id;
}
public TLanceIndexJobReport 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 TLanceIndexJobReport 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 TLanceIndexJobReport 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 TLanceIndexJobReport 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 TLanceIndexJobResultCode
*/
@org.apache.thrift.annotation.Nullable
public TLanceIndexJobResultCode getResultCode() {
return this.result_code;
}
/**
*
* @see TLanceIndexJobResultCode
*/
public TLanceIndexJobReport setResultCode(@org.apache.thrift.annotation.Nullable TLanceIndexJobResultCode result_code) {
this.result_code = result_code;
return this;
}
public void unsetResultCode() {
this.result_code = null;
}
/** Returns true if field result_code is set (has been assigned a value) and false otherwise */
public boolean isSetResultCode() {
return this.result_code != null;
}
public void setResultCodeIsSet(boolean value) {
if (!value) {
this.result_code = null;
}
}
/**
*
* @see TLanceIndexCompletionReason
*/
@org.apache.thrift.annotation.Nullable
public TLanceIndexCompletionReason getCompletionReason() {
return this.completion_reason;
}
/**
*
* @see TLanceIndexCompletionReason
*/
public TLanceIndexJobReport setCompletionReason(@org.apache.thrift.annotation.Nullable TLanceIndexCompletionReason completion_reason) {
this.completion_reason = completion_reason;
return this;
}
public void unsetCompletionReason() {
this.completion_reason = null;
}
/** Returns true if field completion_reason is set (has been assigned a value) and false otherwise */
public boolean isSetCompletionReason() {
return this.completion_reason != null;
}
public void setCompletionReasonIsSet(boolean value) {
if (!value) {
this.completion_reason = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSanitizedMessage() {
return this.sanitized_message;
}
public TLanceIndexJobReport setSanitizedMessage(@org.apache.thrift.annotation.Nullable java.lang.String sanitized_message) {
this.sanitized_message = sanitized_message;
return this;
}
public void unsetSanitizedMessage() {
this.sanitized_message = null;
}
/** Returns true if field sanitized_message is set (has been assigned a value) and false otherwise */
public boolean isSetSanitizedMessage() {
return this.sanitized_message != null;
}
public void setSanitizedMessageIsSet(boolean value) {
if (!value) {
this.sanitized_message = null;
}
}
public boolean isExternalMetadataAdvanced() {
return this.external_metadata_advanced;
}
public TLanceIndexJobReport setExternalMetadataAdvanced(boolean external_metadata_advanced) {
this.external_metadata_advanced = external_metadata_advanced;
setExternalMetadataAdvancedIsSet(true);
return this;
}
public void unsetExternalMetadataAdvanced() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXTERNAL_METADATA_ADVANCED_ISSET_ID);
}
/** Returns true if field external_metadata_advanced is set (has been assigned a value) and false otherwise */
public boolean isSetExternalMetadataAdvanced() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXTERNAL_METADATA_ADVANCED_ISSET_ID);
}
public void setExternalMetadataAdvancedIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXTERNAL_METADATA_ADVANCED_ISSET_ID, value);
}
/**
*
* @see TLanceIndexTerminationProof
*/
@org.apache.thrift.annotation.Nullable
public TLanceIndexTerminationProof getTerminationProof() {
return this.termination_proof;
}
/**
*
* @see TLanceIndexTerminationProof
*/
public TLanceIndexJobReport setTerminationProof(@org.apache.thrift.annotation.Nullable TLanceIndexTerminationProof termination_proof) {
this.termination_proof = termination_proof;
return this;
}
public void unsetTerminationProof() {
this.termination_proof = null;
}
/** Returns true if field termination_proof is set (has been assigned a value) and false otherwise */
public boolean isSetTerminationProof() {
return this.termination_proof != null;
}
public void setTerminationProofIsSet(boolean value) {
if (!value) {
this.termination_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 RESULT_CODE:
if (value == null) {
unsetResultCode();
} else {
setResultCode((TLanceIndexJobResultCode)value);
}
break;
case COMPLETION_REASON:
if (value == null) {
unsetCompletionReason();
} else {
setCompletionReason((TLanceIndexCompletionReason)value);
}
break;
case SANITIZED_MESSAGE:
if (value == null) {
unsetSanitizedMessage();
} else {
setSanitizedMessage((java.lang.String)value);
}
break;
case EXTERNAL_METADATA_ADVANCED:
if (value == null) {
unsetExternalMetadataAdvanced();
} else {
setExternalMetadataAdvanced((java.lang.Boolean)value);
}
break;
case TERMINATION_PROOF:
if (value == null) {
unsetTerminationProof();
} else {
setTerminationProof((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 RESULT_CODE:
return getResultCode();
case COMPLETION_REASON:
return getCompletionReason();
case SANITIZED_MESSAGE:
return getSanitizedMessage();
case EXTERNAL_METADATA_ADVANCED:
return isExternalMetadataAdvanced();
case TERMINATION_PROOF:
return getTerminationProof();
}
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 RESULT_CODE:
return isSetResultCode();
case COMPLETION_REASON:
return isSetCompletionReason();
case SANITIZED_MESSAGE:
return isSetSanitizedMessage();
case EXTERNAL_METADATA_ADVANCED:
return isSetExternalMetadataAdvanced();
case TERMINATION_PROOF:
return isSetTerminationProof();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TLanceIndexJobReport)
return this.equals((TLanceIndexJobReport)that);
return false;
}
public boolean equals(TLanceIndexJobReport 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_result_code = true && this.isSetResultCode();
boolean that_present_result_code = true && that.isSetResultCode();
if (this_present_result_code || that_present_result_code) {
if (!(this_present_result_code && that_present_result_code))
return false;
if (!this.result_code.equals(that.result_code))
return false;
}
boolean this_present_completion_reason = true && this.isSetCompletionReason();
boolean that_present_completion_reason = true && that.isSetCompletionReason();
if (this_present_completion_reason || that_present_completion_reason) {
if (!(this_present_completion_reason && that_present_completion_reason))
return false;
if (!this.completion_reason.equals(that.completion_reason))
return false;
}
boolean this_present_sanitized_message = true && this.isSetSanitizedMessage();
boolean that_present_sanitized_message = true && that.isSetSanitizedMessage();
if (this_present_sanitized_message || that_present_sanitized_message) {
if (!(this_present_sanitized_message && that_present_sanitized_message))
return false;
if (!this.sanitized_message.equals(that.sanitized_message))
return false;
}
boolean this_present_external_metadata_advanced = true && this.isSetExternalMetadataAdvanced();
boolean that_present_external_metadata_advanced = true && that.isSetExternalMetadataAdvanced();
if (this_present_external_metadata_advanced || that_present_external_metadata_advanced) {
if (!(this_present_external_metadata_advanced && that_present_external_metadata_advanced))
return false;
if (this.external_metadata_advanced != that.external_metadata_advanced)
return false;
}
boolean this_present_termination_proof = true && this.isSetTerminationProof();
boolean that_present_termination_proof = true && that.isSetTerminationProof();
if (this_present_termination_proof || that_present_termination_proof) {
if (!(this_present_termination_proof && that_present_termination_proof))
return false;
if (!this.termination_proof.equals(that.termination_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 + ((isSetResultCode()) ? 131071 : 524287);
if (isSetResultCode())
hashCode = hashCode * 8191 + result_code.getValue();
hashCode = hashCode * 8191 + ((isSetCompletionReason()) ? 131071 : 524287);
if (isSetCompletionReason())
hashCode = hashCode * 8191 + completion_reason.getValue();
hashCode = hashCode * 8191 + ((isSetSanitizedMessage()) ? 131071 : 524287);
if (isSetSanitizedMessage())
hashCode = hashCode * 8191 + sanitized_message.hashCode();
hashCode = hashCode * 8191 + ((isSetExternalMetadataAdvanced()) ? 131071 : 524287);
if (isSetExternalMetadataAdvanced())
hashCode = hashCode * 8191 + ((external_metadata_advanced) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetTerminationProof()) ? 131071 : 524287);
if (isSetTerminationProof())
hashCode = hashCode * 8191 + termination_proof.getValue();
return hashCode;
}
@Override
public int compareTo(TLanceIndexJobReport 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(isSetResultCode(), other.isSetResultCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResultCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result_code, other.result_code);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCompletionReason(), other.isSetCompletionReason());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCompletionReason()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.completion_reason, other.completion_reason);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSanitizedMessage(), other.isSetSanitizedMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSanitizedMessage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sanitized_message, other.sanitized_message);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetExternalMetadataAdvanced(), other.isSetExternalMetadataAdvanced());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExternalMetadataAdvanced()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.external_metadata_advanced, other.external_metadata_advanced);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTerminationProof(), other.isSetTerminationProof());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTerminationProof()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.termination_proof, other.termination_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("TLanceIndexJobReport(");
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("result_code:");
if (this.result_code == null) {
sb.append("null");
} else {
sb.append(this.result_code);
}
first = false;
if (isSetCompletionReason()) {
if (!first) sb.append(", ");
sb.append("completion_reason:");
if (this.completion_reason == null) {
sb.append("null");
} else {
sb.append(this.completion_reason);
}
first = false;
}
if (isSetSanitizedMessage()) {
if (!first) sb.append(", ");
sb.append("sanitized_message:");
if (this.sanitized_message == null) {
sb.append("null");
} else {
sb.append(this.sanitized_message);
}
first = false;
}
if (isSetExternalMetadataAdvanced()) {
if (!first) sb.append(", ");
sb.append("external_metadata_advanced:");
sb.append(this.external_metadata_advanced);
first = false;
}
if (isSetTerminationProof()) {
if (!first) sb.append(", ");
sb.append("termination_proof:");
if (this.termination_proof == null) {
sb.append("null");
} else {
sb.append(this.termination_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 (result_code == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'result_code' 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 TLanceIndexJobReportStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexJobReportStandardScheme getScheme() {
return new TLanceIndexJobReportStandardScheme();
}
}
private static class TLanceIndexJobReportStandardScheme extends org.apache.thrift.scheme.StandardScheme<TLanceIndexJobReport> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TLanceIndexJobReport 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: // RESULT_CODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.result_code = org.apache.doris.thrift.TLanceIndexJobResultCode.findByValue(iprot.readI32());
struct.setResultCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // COMPLETION_REASON
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.completion_reason = org.apache.doris.thrift.TLanceIndexCompletionReason.findByValue(iprot.readI32());
struct.setCompletionReasonIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // SANITIZED_MESSAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sanitized_message = iprot.readString();
struct.setSanitizedMessageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // EXTERNAL_METADATA_ADVANCED
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.external_metadata_advanced = iprot.readBool();
struct.setExternalMetadataAdvancedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // TERMINATION_PROOF
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.termination_proof = org.apache.doris.thrift.TLanceIndexTerminationProof.findByValue(iprot.readI32());
struct.setTerminationProofIsSet(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, TLanceIndexJobReport 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.result_code != null) {
oprot.writeFieldBegin(RESULT_CODE_FIELD_DESC);
oprot.writeI32(struct.result_code.getValue());
oprot.writeFieldEnd();
}
if (struct.completion_reason != null) {
if (struct.isSetCompletionReason()) {
oprot.writeFieldBegin(COMPLETION_REASON_FIELD_DESC);
oprot.writeI32(struct.completion_reason.getValue());
oprot.writeFieldEnd();
}
}
if (struct.sanitized_message != null) {
if (struct.isSetSanitizedMessage()) {
oprot.writeFieldBegin(SANITIZED_MESSAGE_FIELD_DESC);
oprot.writeString(struct.sanitized_message);
oprot.writeFieldEnd();
}
}
if (struct.isSetExternalMetadataAdvanced()) {
oprot.writeFieldBegin(EXTERNAL_METADATA_ADVANCED_FIELD_DESC);
oprot.writeBool(struct.external_metadata_advanced);
oprot.writeFieldEnd();
}
if (struct.termination_proof != null) {
if (struct.isSetTerminationProof()) {
oprot.writeFieldBegin(TERMINATION_PROOF_FIELD_DESC);
oprot.writeI32(struct.termination_proof.getValue());
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TLanceIndexJobReportTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TLanceIndexJobReportTupleScheme getScheme() {
return new TLanceIndexJobReportTupleScheme();
}
}
private static class TLanceIndexJobReportTupleScheme extends org.apache.thrift.scheme.TupleScheme<TLanceIndexJobReport> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TLanceIndexJobReport 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.result_code.getValue());
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetCompletionReason()) {
optionals.set(0);
}
if (struct.isSetSanitizedMessage()) {
optionals.set(1);
}
if (struct.isSetExternalMetadataAdvanced()) {
optionals.set(2);
}
if (struct.isSetTerminationProof()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetCompletionReason()) {
oprot.writeI32(struct.completion_reason.getValue());
}
if (struct.isSetSanitizedMessage()) {
oprot.writeString(struct.sanitized_message);
}
if (struct.isSetExternalMetadataAdvanced()) {
oprot.writeBool(struct.external_metadata_advanced);
}
if (struct.isSetTerminationProof()) {
oprot.writeI32(struct.termination_proof.getValue());
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TLanceIndexJobReport 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.result_code = org.apache.doris.thrift.TLanceIndexJobResultCode.findByValue(iprot.readI32());
struct.setResultCodeIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.completion_reason = org.apache.doris.thrift.TLanceIndexCompletionReason.findByValue(iprot.readI32());
struct.setCompletionReasonIsSet(true);
}
if (incoming.get(1)) {
struct.sanitized_message = iprot.readString();
struct.setSanitizedMessageIsSet(true);
}
if (incoming.get(2)) {
struct.external_metadata_advanced = iprot.readBool();
struct.setExternalMetadataAdvancedIsSet(true);
}
if (incoming.get(3)) {
struct.termination_proof = org.apache.doris.thrift.TLanceIndexTerminationProof.findByValue(iprot.readI32());
struct.setTerminationProofIsSet(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();
}
}