TRemoteTabletSnapshot.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 TRemoteTabletSnapshot implements org.apache.thrift.TBase<TRemoteTabletSnapshot, TRemoteTabletSnapshot._Fields>, java.io.Serializable, Cloneable, Comparable<TRemoteTabletSnapshot> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRemoteTabletSnapshot");
private static final org.apache.thrift.protocol.TField LOCAL_TABLET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("local_tablet_id", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField LOCAL_SNAPSHOT_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("local_snapshot_path", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField REMOTE_TABLET_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_tablet_id", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField REMOTE_BE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_be_id", org.apache.thrift.protocol.TType.I64, (short)4);
private static final org.apache.thrift.protocol.TField REMOTE_BE_ADDR_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_be_addr", org.apache.thrift.protocol.TType.STRUCT, (short)5);
private static final org.apache.thrift.protocol.TField REMOTE_SNAPSHOT_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_snapshot_path", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField REMOTE_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_token", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TRemoteTabletSnapshotStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TRemoteTabletSnapshotTupleSchemeFactory();
public long local_tablet_id; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String local_snapshot_path; // optional
public long remote_tablet_id; // optional
public long remote_be_id; // optional
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress remote_be_addr; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String remote_snapshot_path; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String remote_token; // 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 {
LOCAL_TABLET_ID((short)1, "local_tablet_id"),
LOCAL_SNAPSHOT_PATH((short)2, "local_snapshot_path"),
REMOTE_TABLET_ID((short)3, "remote_tablet_id"),
REMOTE_BE_ID((short)4, "remote_be_id"),
REMOTE_BE_ADDR((short)5, "remote_be_addr"),
REMOTE_SNAPSHOT_PATH((short)6, "remote_snapshot_path"),
REMOTE_TOKEN((short)7, "remote_token");
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: // LOCAL_TABLET_ID
return LOCAL_TABLET_ID;
case 2: // LOCAL_SNAPSHOT_PATH
return LOCAL_SNAPSHOT_PATH;
case 3: // REMOTE_TABLET_ID
return REMOTE_TABLET_ID;
case 4: // REMOTE_BE_ID
return REMOTE_BE_ID;
case 5: // REMOTE_BE_ADDR
return REMOTE_BE_ADDR;
case 6: // REMOTE_SNAPSHOT_PATH
return REMOTE_SNAPSHOT_PATH;
case 7: // REMOTE_TOKEN
return REMOTE_TOKEN;
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 __LOCAL_TABLET_ID_ISSET_ID = 0;
private static final int __REMOTE_TABLET_ID_ISSET_ID = 1;
private static final int __REMOTE_BE_ID_ISSET_ID = 2;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.LOCAL_TABLET_ID,_Fields.LOCAL_SNAPSHOT_PATH,_Fields.REMOTE_TABLET_ID,_Fields.REMOTE_BE_ID,_Fields.REMOTE_BE_ADDR,_Fields.REMOTE_SNAPSHOT_PATH,_Fields.REMOTE_TOKEN};
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.LOCAL_TABLET_ID, new org.apache.thrift.meta_data.FieldMetaData("local_tablet_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LOCAL_SNAPSHOT_PATH, new org.apache.thrift.meta_data.FieldMetaData("local_snapshot_path", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REMOTE_TABLET_ID, new org.apache.thrift.meta_data.FieldMetaData("remote_tablet_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.REMOTE_BE_ID, new org.apache.thrift.meta_data.FieldMetaData("remote_be_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.REMOTE_BE_ADDR, new org.apache.thrift.meta_data.FieldMetaData("remote_be_addr", 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.REMOTE_SNAPSHOT_PATH, new org.apache.thrift.meta_data.FieldMetaData("remote_snapshot_path", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REMOTE_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("remote_token", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRemoteTabletSnapshot.class, metaDataMap);
}
public TRemoteTabletSnapshot() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TRemoteTabletSnapshot(TRemoteTabletSnapshot other) {
__isset_bitfield = other.__isset_bitfield;
this.local_tablet_id = other.local_tablet_id;
if (other.isSetLocalSnapshotPath()) {
this.local_snapshot_path = other.local_snapshot_path;
}
this.remote_tablet_id = other.remote_tablet_id;
this.remote_be_id = other.remote_be_id;
if (other.isSetRemoteBeAddr()) {
this.remote_be_addr = new org.apache.doris.thrift.TNetworkAddress(other.remote_be_addr);
}
if (other.isSetRemoteSnapshotPath()) {
this.remote_snapshot_path = other.remote_snapshot_path;
}
if (other.isSetRemoteToken()) {
this.remote_token = other.remote_token;
}
}
public TRemoteTabletSnapshot deepCopy() {
return new TRemoteTabletSnapshot(this);
}
@Override
public void clear() {
setLocalTabletIdIsSet(false);
this.local_tablet_id = 0;
this.local_snapshot_path = null;
setRemoteTabletIdIsSet(false);
this.remote_tablet_id = 0;
setRemoteBeIdIsSet(false);
this.remote_be_id = 0;
this.remote_be_addr = null;
this.remote_snapshot_path = null;
this.remote_token = null;
}
public long getLocalTabletId() {
return this.local_tablet_id;
}
public TRemoteTabletSnapshot setLocalTabletId(long local_tablet_id) {
this.local_tablet_id = local_tablet_id;
setLocalTabletIdIsSet(true);
return this;
}
public void unsetLocalTabletId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LOCAL_TABLET_ID_ISSET_ID);
}
/** Returns true if field local_tablet_id is set (has been assigned a value) and false otherwise */
public boolean isSetLocalTabletId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LOCAL_TABLET_ID_ISSET_ID);
}
public void setLocalTabletIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LOCAL_TABLET_ID_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getLocalSnapshotPath() {
return this.local_snapshot_path;
}
public TRemoteTabletSnapshot setLocalSnapshotPath(@org.apache.thrift.annotation.Nullable java.lang.String local_snapshot_path) {
this.local_snapshot_path = local_snapshot_path;
return this;
}
public void unsetLocalSnapshotPath() {
this.local_snapshot_path = null;
}
/** Returns true if field local_snapshot_path is set (has been assigned a value) and false otherwise */
public boolean isSetLocalSnapshotPath() {
return this.local_snapshot_path != null;
}
public void setLocalSnapshotPathIsSet(boolean value) {
if (!value) {
this.local_snapshot_path = null;
}
}
public long getRemoteTabletId() {
return this.remote_tablet_id;
}
public TRemoteTabletSnapshot setRemoteTabletId(long remote_tablet_id) {
this.remote_tablet_id = remote_tablet_id;
setRemoteTabletIdIsSet(true);
return this;
}
public void unsetRemoteTabletId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REMOTE_TABLET_ID_ISSET_ID);
}
/** Returns true if field remote_tablet_id is set (has been assigned a value) and false otherwise */
public boolean isSetRemoteTabletId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REMOTE_TABLET_ID_ISSET_ID);
}
public void setRemoteTabletIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REMOTE_TABLET_ID_ISSET_ID, value);
}
public long getRemoteBeId() {
return this.remote_be_id;
}
public TRemoteTabletSnapshot setRemoteBeId(long remote_be_id) {
this.remote_be_id = remote_be_id;
setRemoteBeIdIsSet(true);
return this;
}
public void unsetRemoteBeId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __REMOTE_BE_ID_ISSET_ID);
}
/** Returns true if field remote_be_id is set (has been assigned a value) and false otherwise */
public boolean isSetRemoteBeId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __REMOTE_BE_ID_ISSET_ID);
}
public void setRemoteBeIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __REMOTE_BE_ID_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TNetworkAddress getRemoteBeAddr() {
return this.remote_be_addr;
}
public TRemoteTabletSnapshot setRemoteBeAddr(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNetworkAddress remote_be_addr) {
this.remote_be_addr = remote_be_addr;
return this;
}
public void unsetRemoteBeAddr() {
this.remote_be_addr = null;
}
/** Returns true if field remote_be_addr is set (has been assigned a value) and false otherwise */
public boolean isSetRemoteBeAddr() {
return this.remote_be_addr != null;
}
public void setRemoteBeAddrIsSet(boolean value) {
if (!value) {
this.remote_be_addr = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getRemoteSnapshotPath() {
return this.remote_snapshot_path;
}
public TRemoteTabletSnapshot setRemoteSnapshotPath(@org.apache.thrift.annotation.Nullable java.lang.String remote_snapshot_path) {
this.remote_snapshot_path = remote_snapshot_path;
return this;
}
public void unsetRemoteSnapshotPath() {
this.remote_snapshot_path = null;
}
/** Returns true if field remote_snapshot_path is set (has been assigned a value) and false otherwise */
public boolean isSetRemoteSnapshotPath() {
return this.remote_snapshot_path != null;
}
public void setRemoteSnapshotPathIsSet(boolean value) {
if (!value) {
this.remote_snapshot_path = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getRemoteToken() {
return this.remote_token;
}
public TRemoteTabletSnapshot setRemoteToken(@org.apache.thrift.annotation.Nullable java.lang.String remote_token) {
this.remote_token = remote_token;
return this;
}
public void unsetRemoteToken() {
this.remote_token = null;
}
/** Returns true if field remote_token is set (has been assigned a value) and false otherwise */
public boolean isSetRemoteToken() {
return this.remote_token != null;
}
public void setRemoteTokenIsSet(boolean value) {
if (!value) {
this.remote_token = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LOCAL_TABLET_ID:
if (value == null) {
unsetLocalTabletId();
} else {
setLocalTabletId((java.lang.Long)value);
}
break;
case LOCAL_SNAPSHOT_PATH:
if (value == null) {
unsetLocalSnapshotPath();
} else {
setLocalSnapshotPath((java.lang.String)value);
}
break;
case REMOTE_TABLET_ID:
if (value == null) {
unsetRemoteTabletId();
} else {
setRemoteTabletId((java.lang.Long)value);
}
break;
case REMOTE_BE_ID:
if (value == null) {
unsetRemoteBeId();
} else {
setRemoteBeId((java.lang.Long)value);
}
break;
case REMOTE_BE_ADDR:
if (value == null) {
unsetRemoteBeAddr();
} else {
setRemoteBeAddr((org.apache.doris.thrift.TNetworkAddress)value);
}
break;
case REMOTE_SNAPSHOT_PATH:
if (value == null) {
unsetRemoteSnapshotPath();
} else {
setRemoteSnapshotPath((java.lang.String)value);
}
break;
case REMOTE_TOKEN:
if (value == null) {
unsetRemoteToken();
} else {
setRemoteToken((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LOCAL_TABLET_ID:
return getLocalTabletId();
case LOCAL_SNAPSHOT_PATH:
return getLocalSnapshotPath();
case REMOTE_TABLET_ID:
return getRemoteTabletId();
case REMOTE_BE_ID:
return getRemoteBeId();
case REMOTE_BE_ADDR:
return getRemoteBeAddr();
case REMOTE_SNAPSHOT_PATH:
return getRemoteSnapshotPath();
case REMOTE_TOKEN:
return getRemoteToken();
}
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 LOCAL_TABLET_ID:
return isSetLocalTabletId();
case LOCAL_SNAPSHOT_PATH:
return isSetLocalSnapshotPath();
case REMOTE_TABLET_ID:
return isSetRemoteTabletId();
case REMOTE_BE_ID:
return isSetRemoteBeId();
case REMOTE_BE_ADDR:
return isSetRemoteBeAddr();
case REMOTE_SNAPSHOT_PATH:
return isSetRemoteSnapshotPath();
case REMOTE_TOKEN:
return isSetRemoteToken();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TRemoteTabletSnapshot)
return this.equals((TRemoteTabletSnapshot)that);
return false;
}
public boolean equals(TRemoteTabletSnapshot that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_local_tablet_id = true && this.isSetLocalTabletId();
boolean that_present_local_tablet_id = true && that.isSetLocalTabletId();
if (this_present_local_tablet_id || that_present_local_tablet_id) {
if (!(this_present_local_tablet_id && that_present_local_tablet_id))
return false;
if (this.local_tablet_id != that.local_tablet_id)
return false;
}
boolean this_present_local_snapshot_path = true && this.isSetLocalSnapshotPath();
boolean that_present_local_snapshot_path = true && that.isSetLocalSnapshotPath();
if (this_present_local_snapshot_path || that_present_local_snapshot_path) {
if (!(this_present_local_snapshot_path && that_present_local_snapshot_path))
return false;
if (!this.local_snapshot_path.equals(that.local_snapshot_path))
return false;
}
boolean this_present_remote_tablet_id = true && this.isSetRemoteTabletId();
boolean that_present_remote_tablet_id = true && that.isSetRemoteTabletId();
if (this_present_remote_tablet_id || that_present_remote_tablet_id) {
if (!(this_present_remote_tablet_id && that_present_remote_tablet_id))
return false;
if (this.remote_tablet_id != that.remote_tablet_id)
return false;
}
boolean this_present_remote_be_id = true && this.isSetRemoteBeId();
boolean that_present_remote_be_id = true && that.isSetRemoteBeId();
if (this_present_remote_be_id || that_present_remote_be_id) {
if (!(this_present_remote_be_id && that_present_remote_be_id))
return false;
if (this.remote_be_id != that.remote_be_id)
return false;
}
boolean this_present_remote_be_addr = true && this.isSetRemoteBeAddr();
boolean that_present_remote_be_addr = true && that.isSetRemoteBeAddr();
if (this_present_remote_be_addr || that_present_remote_be_addr) {
if (!(this_present_remote_be_addr && that_present_remote_be_addr))
return false;
if (!this.remote_be_addr.equals(that.remote_be_addr))
return false;
}
boolean this_present_remote_snapshot_path = true && this.isSetRemoteSnapshotPath();
boolean that_present_remote_snapshot_path = true && that.isSetRemoteSnapshotPath();
if (this_present_remote_snapshot_path || that_present_remote_snapshot_path) {
if (!(this_present_remote_snapshot_path && that_present_remote_snapshot_path))
return false;
if (!this.remote_snapshot_path.equals(that.remote_snapshot_path))
return false;
}
boolean this_present_remote_token = true && this.isSetRemoteToken();
boolean that_present_remote_token = true && that.isSetRemoteToken();
if (this_present_remote_token || that_present_remote_token) {
if (!(this_present_remote_token && that_present_remote_token))
return false;
if (!this.remote_token.equals(that.remote_token))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetLocalTabletId()) ? 131071 : 524287);
if (isSetLocalTabletId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(local_tablet_id);
hashCode = hashCode * 8191 + ((isSetLocalSnapshotPath()) ? 131071 : 524287);
if (isSetLocalSnapshotPath())
hashCode = hashCode * 8191 + local_snapshot_path.hashCode();
hashCode = hashCode * 8191 + ((isSetRemoteTabletId()) ? 131071 : 524287);
if (isSetRemoteTabletId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(remote_tablet_id);
hashCode = hashCode * 8191 + ((isSetRemoteBeId()) ? 131071 : 524287);
if (isSetRemoteBeId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(remote_be_id);
hashCode = hashCode * 8191 + ((isSetRemoteBeAddr()) ? 131071 : 524287);
if (isSetRemoteBeAddr())
hashCode = hashCode * 8191 + remote_be_addr.hashCode();
hashCode = hashCode * 8191 + ((isSetRemoteSnapshotPath()) ? 131071 : 524287);
if (isSetRemoteSnapshotPath())
hashCode = hashCode * 8191 + remote_snapshot_path.hashCode();
hashCode = hashCode * 8191 + ((isSetRemoteToken()) ? 131071 : 524287);
if (isSetRemoteToken())
hashCode = hashCode * 8191 + remote_token.hashCode();
return hashCode;
}
@Override
public int compareTo(TRemoteTabletSnapshot other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetLocalTabletId(), other.isSetLocalTabletId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLocalTabletId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.local_tablet_id, other.local_tablet_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLocalSnapshotPath(), other.isSetLocalSnapshotPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLocalSnapshotPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.local_snapshot_path, other.local_snapshot_path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemoteTabletId(), other.isSetRemoteTabletId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemoteTabletId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_tablet_id, other.remote_tablet_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemoteBeId(), other.isSetRemoteBeId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemoteBeId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_be_id, other.remote_be_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemoteBeAddr(), other.isSetRemoteBeAddr());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemoteBeAddr()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_be_addr, other.remote_be_addr);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemoteSnapshotPath(), other.isSetRemoteSnapshotPath());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemoteSnapshotPath()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_snapshot_path, other.remote_snapshot_path);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemoteToken(), other.isSetRemoteToken());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemoteToken()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_token, other.remote_token);
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("TRemoteTabletSnapshot(");
boolean first = true;
if (isSetLocalTabletId()) {
sb.append("local_tablet_id:");
sb.append(this.local_tablet_id);
first = false;
}
if (isSetLocalSnapshotPath()) {
if (!first) sb.append(", ");
sb.append("local_snapshot_path:");
if (this.local_snapshot_path == null) {
sb.append("null");
} else {
sb.append(this.local_snapshot_path);
}
first = false;
}
if (isSetRemoteTabletId()) {
if (!first) sb.append(", ");
sb.append("remote_tablet_id:");
sb.append(this.remote_tablet_id);
first = false;
}
if (isSetRemoteBeId()) {
if (!first) sb.append(", ");
sb.append("remote_be_id:");
sb.append(this.remote_be_id);
first = false;
}
if (isSetRemoteBeAddr()) {
if (!first) sb.append(", ");
sb.append("remote_be_addr:");
if (this.remote_be_addr == null) {
sb.append("null");
} else {
sb.append(this.remote_be_addr);
}
first = false;
}
if (isSetRemoteSnapshotPath()) {
if (!first) sb.append(", ");
sb.append("remote_snapshot_path:");
if (this.remote_snapshot_path == null) {
sb.append("null");
} else {
sb.append(this.remote_snapshot_path);
}
first = false;
}
if (isSetRemoteToken()) {
if (!first) sb.append(", ");
sb.append("remote_token:");
if (this.remote_token == null) {
sb.append("null");
} else {
sb.append(this.remote_token);
}
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 (remote_be_addr != null) {
remote_be_addr.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 TRemoteTabletSnapshotStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRemoteTabletSnapshotStandardScheme getScheme() {
return new TRemoteTabletSnapshotStandardScheme();
}
}
private static class TRemoteTabletSnapshotStandardScheme extends org.apache.thrift.scheme.StandardScheme<TRemoteTabletSnapshot> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TRemoteTabletSnapshot 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: // LOCAL_TABLET_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.local_tablet_id = iprot.readI64();
struct.setLocalTabletIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // LOCAL_SNAPSHOT_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.local_snapshot_path = iprot.readString();
struct.setLocalSnapshotPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // REMOTE_TABLET_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.remote_tablet_id = iprot.readI64();
struct.setRemoteTabletIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // REMOTE_BE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.remote_be_id = iprot.readI64();
struct.setRemoteBeIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // REMOTE_BE_ADDR
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.remote_be_addr = new org.apache.doris.thrift.TNetworkAddress();
struct.remote_be_addr.read(iprot);
struct.setRemoteBeAddrIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // REMOTE_SNAPSHOT_PATH
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.remote_snapshot_path = iprot.readString();
struct.setRemoteSnapshotPathIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // REMOTE_TOKEN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.remote_token = iprot.readString();
struct.setRemoteTokenIsSet(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, TRemoteTabletSnapshot struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetLocalTabletId()) {
oprot.writeFieldBegin(LOCAL_TABLET_ID_FIELD_DESC);
oprot.writeI64(struct.local_tablet_id);
oprot.writeFieldEnd();
}
if (struct.local_snapshot_path != null) {
if (struct.isSetLocalSnapshotPath()) {
oprot.writeFieldBegin(LOCAL_SNAPSHOT_PATH_FIELD_DESC);
oprot.writeString(struct.local_snapshot_path);
oprot.writeFieldEnd();
}
}
if (struct.isSetRemoteTabletId()) {
oprot.writeFieldBegin(REMOTE_TABLET_ID_FIELD_DESC);
oprot.writeI64(struct.remote_tablet_id);
oprot.writeFieldEnd();
}
if (struct.isSetRemoteBeId()) {
oprot.writeFieldBegin(REMOTE_BE_ID_FIELD_DESC);
oprot.writeI64(struct.remote_be_id);
oprot.writeFieldEnd();
}
if (struct.remote_be_addr != null) {
if (struct.isSetRemoteBeAddr()) {
oprot.writeFieldBegin(REMOTE_BE_ADDR_FIELD_DESC);
struct.remote_be_addr.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.remote_snapshot_path != null) {
if (struct.isSetRemoteSnapshotPath()) {
oprot.writeFieldBegin(REMOTE_SNAPSHOT_PATH_FIELD_DESC);
oprot.writeString(struct.remote_snapshot_path);
oprot.writeFieldEnd();
}
}
if (struct.remote_token != null) {
if (struct.isSetRemoteToken()) {
oprot.writeFieldBegin(REMOTE_TOKEN_FIELD_DESC);
oprot.writeString(struct.remote_token);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TRemoteTabletSnapshotTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TRemoteTabletSnapshotTupleScheme getScheme() {
return new TRemoteTabletSnapshotTupleScheme();
}
}
private static class TRemoteTabletSnapshotTupleScheme extends org.apache.thrift.scheme.TupleScheme<TRemoteTabletSnapshot> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TRemoteTabletSnapshot 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.isSetLocalTabletId()) {
optionals.set(0);
}
if (struct.isSetLocalSnapshotPath()) {
optionals.set(1);
}
if (struct.isSetRemoteTabletId()) {
optionals.set(2);
}
if (struct.isSetRemoteBeId()) {
optionals.set(3);
}
if (struct.isSetRemoteBeAddr()) {
optionals.set(4);
}
if (struct.isSetRemoteSnapshotPath()) {
optionals.set(5);
}
if (struct.isSetRemoteToken()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetLocalTabletId()) {
oprot.writeI64(struct.local_tablet_id);
}
if (struct.isSetLocalSnapshotPath()) {
oprot.writeString(struct.local_snapshot_path);
}
if (struct.isSetRemoteTabletId()) {
oprot.writeI64(struct.remote_tablet_id);
}
if (struct.isSetRemoteBeId()) {
oprot.writeI64(struct.remote_be_id);
}
if (struct.isSetRemoteBeAddr()) {
struct.remote_be_addr.write(oprot);
}
if (struct.isSetRemoteSnapshotPath()) {
oprot.writeString(struct.remote_snapshot_path);
}
if (struct.isSetRemoteToken()) {
oprot.writeString(struct.remote_token);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TRemoteTabletSnapshot 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.local_tablet_id = iprot.readI64();
struct.setLocalTabletIdIsSet(true);
}
if (incoming.get(1)) {
struct.local_snapshot_path = iprot.readString();
struct.setLocalSnapshotPathIsSet(true);
}
if (incoming.get(2)) {
struct.remote_tablet_id = iprot.readI64();
struct.setRemoteTabletIdIsSet(true);
}
if (incoming.get(3)) {
struct.remote_be_id = iprot.readI64();
struct.setRemoteBeIdIsSet(true);
}
if (incoming.get(4)) {
struct.remote_be_addr = new org.apache.doris.thrift.TNetworkAddress();
struct.remote_be_addr.read(iprot);
struct.setRemoteBeAddrIsSet(true);
}
if (incoming.get(5)) {
struct.remote_snapshot_path = iprot.readString();
struct.setRemoteSnapshotPathIsSet(true);
}
if (incoming.get(6)) {
struct.remote_token = iprot.readString();
struct.setRemoteTokenIsSet(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();
}
}