TGetSnapshotResult.java
/**
* Autogenerated by Thrift Compiler (0.16.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"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TGetSnapshotResult implements org.apache.thrift.TBase<TGetSnapshotResult, TGetSnapshotResult._Fields>, java.io.Serializable, Cloneable, Comparable<TGetSnapshotResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetSnapshotResult");
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField JOB_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("job_info", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField MASTER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("master_address", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.protocol.TField COMPRESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("compressed", org.apache.thrift.protocol.TType.BOOL, (short)5);
private static final org.apache.thrift.protocol.TField EXPIRED_AT_FIELD_DESC = new org.apache.thrift.protocol.TField("expiredAt", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField COMMIT_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("commit_seq", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TGetSnapshotResultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TGetSnapshotResultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer job_info; // optional
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress master_address; // optional
public boolean compressed; // optional
public long expiredAt; // optional
public long commit_seq; // 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 {
STATUS((short)1, "status"),
META((short)2, "meta"),
JOB_INFO((short)3, "job_info"),
MASTER_ADDRESS((short)4, "master_address"),
COMPRESSED((short)5, "compressed"),
EXPIRED_AT((short)6, "expiredAt"),
COMMIT_SEQ((short)7, "commit_seq");
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: // STATUS
return STATUS;
case 2: // META
return META;
case 3: // JOB_INFO
return JOB_INFO;
case 4: // MASTER_ADDRESS
return MASTER_ADDRESS;
case 5: // COMPRESSED
return COMPRESSED;
case 6: // EXPIRED_AT
return EXPIRED_AT;
case 7: // COMMIT_SEQ
return COMMIT_SEQ;
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;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __COMPRESSED_ISSET_ID = 0;
private static final int __EXPIREDAT_ISSET_ID = 1;
private static final int __COMMIT_SEQ_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.STATUS,_Fields.META,_Fields.JOB_INFO,_Fields.MASTER_ADDRESS,_Fields.COMPRESSED,_Fields.EXPIRED_AT,_Fields.COMMIT_SEQ};
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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TStatus.class)));
tmpMap.put(_Fields.META, new org.apache.thrift.meta_data.FieldMetaData("meta", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.JOB_INFO, new org.apache.thrift.meta_data.FieldMetaData("job_info", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.MASTER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("master_address", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TNetworkAddress.class)));
tmpMap.put(_Fields.COMPRESSED, new org.apache.thrift.meta_data.FieldMetaData("compressed", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.EXPIRED_AT, new org.apache.thrift.meta_data.FieldMetaData("expiredAt", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COMMIT_SEQ, new org.apache.thrift.meta_data.FieldMetaData("commit_seq", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetSnapshotResult.class, metaDataMap);
}
public TGetSnapshotResult() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TGetSnapshotResult(TGetSnapshotResult other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStatus()) {
this.status = new org.apache.doris.thrift.TStatus(other.status);
}
if (other.isSetMeta()) {
this.meta = org.apache.thrift.TBaseHelper.copyBinary(other.meta);
}
if (other.isSetJobInfo()) {
this.job_info = org.apache.thrift.TBaseHelper.copyBinary(other.job_info);
}
if (other.isSetMasterAddress()) {
this.master_address = new org.apache.doris.thrift.TNetworkAddress(other.master_address);
}
this.compressed = other.compressed;
this.expiredAt = other.expiredAt;
this.commit_seq = other.commit_seq;
}
public TGetSnapshotResult deepCopy() {
return new TGetSnapshotResult(this);
}
@Override
public void clear() {
this.status = null;
this.meta = null;
this.job_info = null;
this.master_address = null;
setCompressedIsSet(false);
this.compressed = false;
setExpiredAtIsSet(false);
this.expiredAt = 0;
setCommitSeqIsSet(false);
this.commit_seq = 0;
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TStatus getStatus() {
return this.status;
}
public TGetSnapshotResult setStatus(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status) {
this.status = status;
return this;
}
public void unsetStatus() {
this.status = null;
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
return this.status != null;
}
public void setStatusIsSet(boolean value) {
if (!value) {
this.status = null;
}
}
public byte[] getMeta() {
setMeta(org.apache.thrift.TBaseHelper.rightSize(meta));
return meta == null ? null : meta.array();
}
public java.nio.ByteBuffer bufferForMeta() {
return org.apache.thrift.TBaseHelper.copyBinary(meta);
}
public TGetSnapshotResult setMeta(byte[] meta) {
this.meta = meta == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(meta.clone());
return this;
}
public TGetSnapshotResult setMeta(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta) {
this.meta = org.apache.thrift.TBaseHelper.copyBinary(meta);
return this;
}
public void unsetMeta() {
this.meta = null;
}
/** Returns true if field meta is set (has been assigned a value) and false otherwise */
public boolean isSetMeta() {
return this.meta != null;
}
public void setMetaIsSet(boolean value) {
if (!value) {
this.meta = null;
}
}
public byte[] getJobInfo() {
setJobInfo(org.apache.thrift.TBaseHelper.rightSize(job_info));
return job_info == null ? null : job_info.array();
}
public java.nio.ByteBuffer bufferForJobInfo() {
return org.apache.thrift.TBaseHelper.copyBinary(job_info);
}
public TGetSnapshotResult setJobInfo(byte[] job_info) {
this.job_info = job_info == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(job_info.clone());
return this;
}
public TGetSnapshotResult setJobInfo(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer job_info) {
this.job_info = org.apache.thrift.TBaseHelper.copyBinary(job_info);
return this;
}
public void unsetJobInfo() {
this.job_info = null;
}
/** Returns true if field job_info is set (has been assigned a value) and false otherwise */
public boolean isSetJobInfo() {
return this.job_info != null;
}
public void setJobInfoIsSet(boolean value) {
if (!value) {
this.job_info = null;
}
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TNetworkAddress getMasterAddress() {
return this.master_address;
}
public TGetSnapshotResult setMasterAddress(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress master_address) {
this.master_address = master_address;
return this;
}
public void unsetMasterAddress() {
this.master_address = null;
}
/** Returns true if field master_address is set (has been assigned a value) and false otherwise */
public boolean isSetMasterAddress() {
return this.master_address != null;
}
public void setMasterAddressIsSet(boolean value) {
if (!value) {
this.master_address = null;
}
}
public boolean isCompressed() {
return this.compressed;
}
public TGetSnapshotResult setCompressed(boolean compressed) {
this.compressed = compressed;
setCompressedIsSet(true);
return this;
}
public void unsetCompressed() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSED_ISSET_ID);
}
/** Returns true if field compressed is set (has been assigned a value) and false otherwise */
public boolean isSetCompressed() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSED_ISSET_ID);
}
public void setCompressedIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSED_ISSET_ID, value);
}
public long getExpiredAt() {
return this.expiredAt;
}
public TGetSnapshotResult setExpiredAt(long expiredAt) {
this.expiredAt = expiredAt;
setExpiredAtIsSet(true);
return this;
}
public void unsetExpiredAt() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIREDAT_ISSET_ID);
}
/** Returns true if field expiredAt is set (has been assigned a value) and false otherwise */
public boolean isSetExpiredAt() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIREDAT_ISSET_ID);
}
public void setExpiredAtIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIREDAT_ISSET_ID, value);
}
public long getCommitSeq() {
return this.commit_seq;
}
public TGetSnapshotResult setCommitSeq(long commit_seq) {
this.commit_seq = commit_seq;
setCommitSeqIsSet(true);
return this;
}
public void unsetCommitSeq() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMMIT_SEQ_ISSET_ID);
}
/** Returns true if field commit_seq is set (has been assigned a value) and false otherwise */
public boolean isSetCommitSeq() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMMIT_SEQ_ISSET_ID);
}
public void setCommitSeqIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMMIT_SEQ_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((org.apache.doris.thrift.TStatus)value);
}
break;
case META:
if (value == null) {
unsetMeta();
} else {
if (value instanceof byte[]) {
setMeta((byte[])value);
} else {
setMeta((java.nio.ByteBuffer)value);
}
}
break;
case JOB_INFO:
if (value == null) {
unsetJobInfo();
} else {
if (value instanceof byte[]) {
setJobInfo((byte[])value);
} else {
setJobInfo((java.nio.ByteBuffer)value);
}
}
break;
case MASTER_ADDRESS:
if (value == null) {
unsetMasterAddress();
} else {
setMasterAddress((org.apache.doris.thrift.TNetworkAddress)value);
}
break;
case COMPRESSED:
if (value == null) {
unsetCompressed();
} else {
setCompressed((java.lang.Boolean)value);
}
break;
case EXPIRED_AT:
if (value == null) {
unsetExpiredAt();
} else {
setExpiredAt((java.lang.Long)value);
}
break;
case COMMIT_SEQ:
if (value == null) {
unsetCommitSeq();
} else {
setCommitSeq((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return getStatus();
case META:
return getMeta();
case JOB_INFO:
return getJobInfo();
case MASTER_ADDRESS:
return getMasterAddress();
case COMPRESSED:
return isCompressed();
case EXPIRED_AT:
return getExpiredAt();
case COMMIT_SEQ:
return getCommitSeq();
}
throw new java.lang.IllegalStateException();
}
/** 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 STATUS:
return isSetStatus();
case META:
return isSetMeta();
case JOB_INFO:
return isSetJobInfo();
case MASTER_ADDRESS:
return isSetMasterAddress();
case COMPRESSED:
return isSetCompressed();
case EXPIRED_AT:
return isSetExpiredAt();
case COMMIT_SEQ:
return isSetCommitSeq();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TGetSnapshotResult)
return this.equals((TGetSnapshotResult)that);
return false;
}
public boolean equals(TGetSnapshotResult that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_status = true && this.isSetStatus();
boolean that_present_status = true && that.isSetStatus();
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status))
return false;
if (!this.status.equals(that.status))
return false;
}
boolean this_present_meta = true && this.isSetMeta();
boolean that_present_meta = true && that.isSetMeta();
if (this_present_meta || that_present_meta) {
if (!(this_present_meta && that_present_meta))
return false;
if (!this.meta.equals(that.meta))
return false;
}
boolean this_present_job_info = true && this.isSetJobInfo();
boolean that_present_job_info = true && that.isSetJobInfo();
if (this_present_job_info || that_present_job_info) {
if (!(this_present_job_info && that_present_job_info))
return false;
if (!this.job_info.equals(that.job_info))
return false;
}
boolean this_present_master_address = true && this.isSetMasterAddress();
boolean that_present_master_address = true && that.isSetMasterAddress();
if (this_present_master_address || that_present_master_address) {
if (!(this_present_master_address && that_present_master_address))
return false;
if (!this.master_address.equals(that.master_address))
return false;
}
boolean this_present_compressed = true && this.isSetCompressed();
boolean that_present_compressed = true && that.isSetCompressed();
if (this_present_compressed || that_present_compressed) {
if (!(this_present_compressed && that_present_compressed))
return false;
if (this.compressed != that.compressed)
return false;
}
boolean this_present_expiredAt = true && this.isSetExpiredAt();
boolean that_present_expiredAt = true && that.isSetExpiredAt();
if (this_present_expiredAt || that_present_expiredAt) {
if (!(this_present_expiredAt && that_present_expiredAt))
return false;
if (this.expiredAt != that.expiredAt)
return false;
}
boolean this_present_commit_seq = true && this.isSetCommitSeq();
boolean that_present_commit_seq = true && that.isSetCommitSeq();
if (this_present_commit_seq || that_present_commit_seq) {
if (!(this_present_commit_seq && that_present_commit_seq))
return false;
if (this.commit_seq != that.commit_seq)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
if (isSetStatus())
hashCode = hashCode * 8191 + status.hashCode();
hashCode = hashCode * 8191 + ((isSetMeta()) ? 131071 : 524287);
if (isSetMeta())
hashCode = hashCode * 8191 + meta.hashCode();
hashCode = hashCode * 8191 + ((isSetJobInfo()) ? 131071 : 524287);
if (isSetJobInfo())
hashCode = hashCode * 8191 + job_info.hashCode();
hashCode = hashCode * 8191 + ((isSetMasterAddress()) ? 131071 : 524287);
if (isSetMasterAddress())
hashCode = hashCode * 8191 + master_address.hashCode();
hashCode = hashCode * 8191 + ((isSetCompressed()) ? 131071 : 524287);
if (isSetCompressed())
hashCode = hashCode * 8191 + ((compressed) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetExpiredAt()) ? 131071 : 524287);
if (isSetExpiredAt())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expiredAt);
hashCode = hashCode * 8191 + ((isSetCommitSeq()) ? 131071 : 524287);
if (isSetCommitSeq())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(commit_seq);
return hashCode;
}
@Override
public int compareTo(TGetSnapshotResult other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMeta(), other.isSetMeta());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMeta()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.meta, other.meta);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetJobInfo(), other.isSetJobInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetJobInfo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job_info, other.job_info);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMasterAddress(), other.isSetMasterAddress());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMasterAddress()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.master_address, other.master_address);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCompressed(), other.isSetCompressed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCompressed()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compressed, other.compressed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetExpiredAt(), other.isSetExpiredAt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExpiredAt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expiredAt, other.expiredAt);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCommitSeq(), other.isSetCommitSeq());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCommitSeq()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commit_seq, other.commit_seq);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
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("TGetSnapshotResult(");
boolean first = true;
if (isSetStatus()) {
sb.append("status:");
if (this.status == null) {
sb.append("null");
} else {
sb.append(this.status);
}
first = false;
}
if (isSetMeta()) {
if (!first) sb.append(", ");
sb.append("meta:");
if (this.meta == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.meta, sb);
}
first = false;
}
if (isSetJobInfo()) {
if (!first) sb.append(", ");
sb.append("job_info:");
if (this.job_info == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.job_info, sb);
}
first = false;
}
if (isSetMasterAddress()) {
if (!first) sb.append(", ");
sb.append("master_address:");
if (this.master_address == null) {
sb.append("null");
} else {
sb.append(this.master_address);
}
first = false;
}
if (isSetCompressed()) {
if (!first) sb.append(", ");
sb.append("compressed:");
sb.append(this.compressed);
first = false;
}
if (isSetExpiredAt()) {
if (!first) sb.append(", ");
sb.append("expiredAt:");
sb.append(this.expiredAt);
first = false;
}
if (isSetCommitSeq()) {
if (!first) sb.append(", ");
sb.append("commit_seq:");
sb.append(this.commit_seq);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (status != null) {
status.validate();
}
if (master_address != null) {
master_address.validate();
}
}
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 TGetSnapshotResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetSnapshotResultStandardScheme getScheme() {
return new TGetSnapshotResultStandardScheme();
}
}
private static class TGetSnapshotResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetSnapshotResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetSnapshotResult struct) throws org.apache.thrift.TException {
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: // STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.status = new org.apache.doris.thrift.TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // META
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.meta = iprot.readBinary();
struct.setMetaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // JOB_INFO
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.job_info = iprot.readBinary();
struct.setJobInfoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // MASTER_ADDRESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.master_address = new org.apache.doris.thrift.TNetworkAddress();
struct.master_address.read(iprot);
struct.setMasterAddressIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // COMPRESSED
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.compressed = iprot.readBool();
struct.setCompressedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // EXPIRED_AT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.expiredAt = iprot.readI64();
struct.setExpiredAtIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // COMMIT_SEQ
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.commit_seq = iprot.readI64();
struct.setCommitSeqIsSet(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
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetSnapshotResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.status != null) {
if (struct.isSetStatus()) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
struct.status.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.meta != null) {
if (struct.isSetMeta()) {
oprot.writeFieldBegin(META_FIELD_DESC);
oprot.writeBinary(struct.meta);
oprot.writeFieldEnd();
}
}
if (struct.job_info != null) {
if (struct.isSetJobInfo()) {
oprot.writeFieldBegin(JOB_INFO_FIELD_DESC);
oprot.writeBinary(struct.job_info);
oprot.writeFieldEnd();
}
}
if (struct.master_address != null) {
if (struct.isSetMasterAddress()) {
oprot.writeFieldBegin(MASTER_ADDRESS_FIELD_DESC);
struct.master_address.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.isSetCompressed()) {
oprot.writeFieldBegin(COMPRESSED_FIELD_DESC);
oprot.writeBool(struct.compressed);
oprot.writeFieldEnd();
}
if (struct.isSetExpiredAt()) {
oprot.writeFieldBegin(EXPIRED_AT_FIELD_DESC);
oprot.writeI64(struct.expiredAt);
oprot.writeFieldEnd();
}
if (struct.isSetCommitSeq()) {
oprot.writeFieldBegin(COMMIT_SEQ_FIELD_DESC);
oprot.writeI64(struct.commit_seq);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetSnapshotResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetSnapshotResultTupleScheme getScheme() {
return new TGetSnapshotResultTupleScheme();
}
}
private static class TGetSnapshotResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetSnapshotResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetSnapshotResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetStatus()) {
optionals.set(0);
}
if (struct.isSetMeta()) {
optionals.set(1);
}
if (struct.isSetJobInfo()) {
optionals.set(2);
}
if (struct.isSetMasterAddress()) {
optionals.set(3);
}
if (struct.isSetCompressed()) {
optionals.set(4);
}
if (struct.isSetExpiredAt()) {
optionals.set(5);
}
if (struct.isSetCommitSeq()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetStatus()) {
struct.status.write(oprot);
}
if (struct.isSetMeta()) {
oprot.writeBinary(struct.meta);
}
if (struct.isSetJobInfo()) {
oprot.writeBinary(struct.job_info);
}
if (struct.isSetMasterAddress()) {
struct.master_address.write(oprot);
}
if (struct.isSetCompressed()) {
oprot.writeBool(struct.compressed);
}
if (struct.isSetExpiredAt()) {
oprot.writeI64(struct.expiredAt);
}
if (struct.isSetCommitSeq()) {
oprot.writeI64(struct.commit_seq);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetSnapshotResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.status = new org.apache.doris.thrift.TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
}
if (incoming.get(1)) {
struct.meta = iprot.readBinary();
struct.setMetaIsSet(true);
}
if (incoming.get(2)) {
struct.job_info = iprot.readBinary();
struct.setJobInfoIsSet(true);
}
if (incoming.get(3)) {
struct.master_address = new org.apache.doris.thrift.TNetworkAddress();
struct.master_address.read(iprot);
struct.setMasterAddressIsSet(true);
}
if (incoming.get(4)) {
struct.compressed = iprot.readBool();
struct.setCompressedIsSet(true);
}
if (incoming.get(5)) {
struct.expiredAt = iprot.readI64();
struct.setExpiredAtIsSet(true);
}
if (incoming.get(6)) {
struct.commit_seq = iprot.readI64();
struct.setCommitSeqIsSet(true);
}
}
}
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();
}
}