TIngestBinlogRequest.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 TIngestBinlogRequest implements org.apache.thrift.TBase<TIngestBinlogRequest, TIngestBinlogRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TIngestBinlogRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIngestBinlogRequest");
private static final org.apache.thrift.protocol.TField TXN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("txn_id", org.apache.thrift.protocol.TType.I64, (short)1);
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)2);
private static final org.apache.thrift.protocol.TField BINLOG_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("binlog_version", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField REMOTE_HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_host", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField REMOTE_PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("remote_port", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField PARTITION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_id", org.apache.thrift.protocol.TType.I64, (short)6);
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)7);
private static final org.apache.thrift.protocol.TField LOAD_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("load_id", org.apache.thrift.protocol.TType.STRUCT, (short)8);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TIngestBinlogRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TIngestBinlogRequestTupleSchemeFactory();
public long txn_id; // optional
public long remote_tablet_id; // optional
public long binlog_version; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String remote_host; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String remote_port; // optional
public long partition_id; // optional
public long local_tablet_id; // optional
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId load_id; // 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 {
TXN_ID((short)1, "txn_id"),
REMOTE_TABLET_ID((short)2, "remote_tablet_id"),
BINLOG_VERSION((short)3, "binlog_version"),
REMOTE_HOST((short)4, "remote_host"),
REMOTE_PORT((short)5, "remote_port"),
PARTITION_ID((short)6, "partition_id"),
LOCAL_TABLET_ID((short)7, "local_tablet_id"),
LOAD_ID((short)8, "load_id");
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: // TXN_ID
return TXN_ID;
case 2: // REMOTE_TABLET_ID
return REMOTE_TABLET_ID;
case 3: // BINLOG_VERSION
return BINLOG_VERSION;
case 4: // REMOTE_HOST
return REMOTE_HOST;
case 5: // REMOTE_PORT
return REMOTE_PORT;
case 6: // PARTITION_ID
return PARTITION_ID;
case 7: // LOCAL_TABLET_ID
return LOCAL_TABLET_ID;
case 8: // LOAD_ID
return LOAD_ID;
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 __TXN_ID_ISSET_ID = 0;
private static final int __REMOTE_TABLET_ID_ISSET_ID = 1;
private static final int __BINLOG_VERSION_ISSET_ID = 2;
private static final int __PARTITION_ID_ISSET_ID = 3;
private static final int __LOCAL_TABLET_ID_ISSET_ID = 4;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.TXN_ID,_Fields.REMOTE_TABLET_ID,_Fields.BINLOG_VERSION,_Fields.REMOTE_HOST,_Fields.REMOTE_PORT,_Fields.PARTITION_ID,_Fields.LOCAL_TABLET_ID,_Fields.LOAD_ID};
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.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txn_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
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.BINLOG_VERSION, new org.apache.thrift.meta_data.FieldMetaData("binlog_version", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.REMOTE_HOST, new org.apache.thrift.meta_data.FieldMetaData("remote_host", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.REMOTE_PORT, new org.apache.thrift.meta_data.FieldMetaData("remote_port", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PARTITION_ID, new org.apache.thrift.meta_data.FieldMetaData("partition_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
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.LOAD_ID, new org.apache.thrift.meta_data.FieldMetaData("load_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TUniqueId.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIngestBinlogRequest.class, metaDataMap);
}
public TIngestBinlogRequest() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TIngestBinlogRequest(TIngestBinlogRequest other) {
__isset_bitfield = other.__isset_bitfield;
this.txn_id = other.txn_id;
this.remote_tablet_id = other.remote_tablet_id;
this.binlog_version = other.binlog_version;
if (other.isSetRemoteHost()) {
this.remote_host = other.remote_host;
}
if (other.isSetRemotePort()) {
this.remote_port = other.remote_port;
}
this.partition_id = other.partition_id;
this.local_tablet_id = other.local_tablet_id;
if (other.isSetLoadId()) {
this.load_id = new org.apache.doris.thrift.TUniqueId(other.load_id);
}
}
public TIngestBinlogRequest deepCopy() {
return new TIngestBinlogRequest(this);
}
@Override
public void clear() {
setTxnIdIsSet(false);
this.txn_id = 0;
setRemoteTabletIdIsSet(false);
this.remote_tablet_id = 0;
setBinlogVersionIsSet(false);
this.binlog_version = 0;
this.remote_host = null;
this.remote_port = null;
setPartitionIdIsSet(false);
this.partition_id = 0;
setLocalTabletIdIsSet(false);
this.local_tablet_id = 0;
this.load_id = null;
}
public long getTxnId() {
return this.txn_id;
}
public TIngestBinlogRequest setTxnId(long txn_id) {
this.txn_id = txn_id;
setTxnIdIsSet(true);
return this;
}
public void unsetTxnId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TXN_ID_ISSET_ID);
}
/** Returns true if field txn_id is set (has been assigned a value) and false otherwise */
public boolean isSetTxnId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TXN_ID_ISSET_ID);
}
public void setTxnIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TXN_ID_ISSET_ID, value);
}
public long getRemoteTabletId() {
return this.remote_tablet_id;
}
public TIngestBinlogRequest 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 getBinlogVersion() {
return this.binlog_version;
}
public TIngestBinlogRequest setBinlogVersion(long binlog_version) {
this.binlog_version = binlog_version;
setBinlogVersionIsSet(true);
return this;
}
public void unsetBinlogVersion() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BINLOG_VERSION_ISSET_ID);
}
/** Returns true if field binlog_version is set (has been assigned a value) and false otherwise */
public boolean isSetBinlogVersion() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BINLOG_VERSION_ISSET_ID);
}
public void setBinlogVersionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BINLOG_VERSION_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getRemoteHost() {
return this.remote_host;
}
public TIngestBinlogRequest setRemoteHost(@org.apache.thrift.annotation.Nullable java.lang.String remote_host) {
this.remote_host = remote_host;
return this;
}
public void unsetRemoteHost() {
this.remote_host = null;
}
/** Returns true if field remote_host is set (has been assigned a value) and false otherwise */
public boolean isSetRemoteHost() {
return this.remote_host != null;
}
public void setRemoteHostIsSet(boolean value) {
if (!value) {
this.remote_host = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getRemotePort() {
return this.remote_port;
}
public TIngestBinlogRequest setRemotePort(@org.apache.thrift.annotation.Nullable java.lang.String remote_port) {
this.remote_port = remote_port;
return this;
}
public void unsetRemotePort() {
this.remote_port = null;
}
/** Returns true if field remote_port is set (has been assigned a value) and false otherwise */
public boolean isSetRemotePort() {
return this.remote_port != null;
}
public void setRemotePortIsSet(boolean value) {
if (!value) {
this.remote_port = null;
}
}
public long getPartitionId() {
return this.partition_id;
}
public TIngestBinlogRequest setPartitionId(long partition_id) {
this.partition_id = partition_id;
setPartitionIdIsSet(true);
return this;
}
public void unsetPartitionId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARTITION_ID_ISSET_ID);
}
/** Returns true if field partition_id is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARTITION_ID_ISSET_ID);
}
public void setPartitionIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARTITION_ID_ISSET_ID, value);
}
public long getLocalTabletId() {
return this.local_tablet_id;
}
public TIngestBinlogRequest 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 org.apache.doris.thrift.TUniqueId getLoadId() {
return this.load_id;
}
public TIngestBinlogRequest setLoadId(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId load_id) {
this.load_id = load_id;
return this;
}
public void unsetLoadId() {
this.load_id = null;
}
/** Returns true if field load_id is set (has been assigned a value) and false otherwise */
public boolean isSetLoadId() {
return this.load_id != null;
}
public void setLoadIdIsSet(boolean value) {
if (!value) {
this.load_id = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TXN_ID:
if (value == null) {
unsetTxnId();
} else {
setTxnId((java.lang.Long)value);
}
break;
case REMOTE_TABLET_ID:
if (value == null) {
unsetRemoteTabletId();
} else {
setRemoteTabletId((java.lang.Long)value);
}
break;
case BINLOG_VERSION:
if (value == null) {
unsetBinlogVersion();
} else {
setBinlogVersion((java.lang.Long)value);
}
break;
case REMOTE_HOST:
if (value == null) {
unsetRemoteHost();
} else {
setRemoteHost((java.lang.String)value);
}
break;
case REMOTE_PORT:
if (value == null) {
unsetRemotePort();
} else {
setRemotePort((java.lang.String)value);
}
break;
case PARTITION_ID:
if (value == null) {
unsetPartitionId();
} else {
setPartitionId((java.lang.Long)value);
}
break;
case LOCAL_TABLET_ID:
if (value == null) {
unsetLocalTabletId();
} else {
setLocalTabletId((java.lang.Long)value);
}
break;
case LOAD_ID:
if (value == null) {
unsetLoadId();
} else {
setLoadId((org.apache.doris.thrift.TUniqueId)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TXN_ID:
return getTxnId();
case REMOTE_TABLET_ID:
return getRemoteTabletId();
case BINLOG_VERSION:
return getBinlogVersion();
case REMOTE_HOST:
return getRemoteHost();
case REMOTE_PORT:
return getRemotePort();
case PARTITION_ID:
return getPartitionId();
case LOCAL_TABLET_ID:
return getLocalTabletId();
case LOAD_ID:
return getLoadId();
}
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 TXN_ID:
return isSetTxnId();
case REMOTE_TABLET_ID:
return isSetRemoteTabletId();
case BINLOG_VERSION:
return isSetBinlogVersion();
case REMOTE_HOST:
return isSetRemoteHost();
case REMOTE_PORT:
return isSetRemotePort();
case PARTITION_ID:
return isSetPartitionId();
case LOCAL_TABLET_ID:
return isSetLocalTabletId();
case LOAD_ID:
return isSetLoadId();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TIngestBinlogRequest)
return this.equals((TIngestBinlogRequest)that);
return false;
}
public boolean equals(TIngestBinlogRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_txn_id = true && this.isSetTxnId();
boolean that_present_txn_id = true && that.isSetTxnId();
if (this_present_txn_id || that_present_txn_id) {
if (!(this_present_txn_id && that_present_txn_id))
return false;
if (this.txn_id != that.txn_id)
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_binlog_version = true && this.isSetBinlogVersion();
boolean that_present_binlog_version = true && that.isSetBinlogVersion();
if (this_present_binlog_version || that_present_binlog_version) {
if (!(this_present_binlog_version && that_present_binlog_version))
return false;
if (this.binlog_version != that.binlog_version)
return false;
}
boolean this_present_remote_host = true && this.isSetRemoteHost();
boolean that_present_remote_host = true && that.isSetRemoteHost();
if (this_present_remote_host || that_present_remote_host) {
if (!(this_present_remote_host && that_present_remote_host))
return false;
if (!this.remote_host.equals(that.remote_host))
return false;
}
boolean this_present_remote_port = true && this.isSetRemotePort();
boolean that_present_remote_port = true && that.isSetRemotePort();
if (this_present_remote_port || that_present_remote_port) {
if (!(this_present_remote_port && that_present_remote_port))
return false;
if (!this.remote_port.equals(that.remote_port))
return false;
}
boolean this_present_partition_id = true && this.isSetPartitionId();
boolean that_present_partition_id = true && that.isSetPartitionId();
if (this_present_partition_id || that_present_partition_id) {
if (!(this_present_partition_id && that_present_partition_id))
return false;
if (this.partition_id != that.partition_id)
return false;
}
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_load_id = true && this.isSetLoadId();
boolean that_present_load_id = true && that.isSetLoadId();
if (this_present_load_id || that_present_load_id) {
if (!(this_present_load_id && that_present_load_id))
return false;
if (!this.load_id.equals(that.load_id))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetTxnId()) ? 131071 : 524287);
if (isSetTxnId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(txn_id);
hashCode = hashCode * 8191 + ((isSetRemoteTabletId()) ? 131071 : 524287);
if (isSetRemoteTabletId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(remote_tablet_id);
hashCode = hashCode * 8191 + ((isSetBinlogVersion()) ? 131071 : 524287);
if (isSetBinlogVersion())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(binlog_version);
hashCode = hashCode * 8191 + ((isSetRemoteHost()) ? 131071 : 524287);
if (isSetRemoteHost())
hashCode = hashCode * 8191 + remote_host.hashCode();
hashCode = hashCode * 8191 + ((isSetRemotePort()) ? 131071 : 524287);
if (isSetRemotePort())
hashCode = hashCode * 8191 + remote_port.hashCode();
hashCode = hashCode * 8191 + ((isSetPartitionId()) ? 131071 : 524287);
if (isSetPartitionId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(partition_id);
hashCode = hashCode * 8191 + ((isSetLocalTabletId()) ? 131071 : 524287);
if (isSetLocalTabletId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(local_tablet_id);
hashCode = hashCode * 8191 + ((isSetLoadId()) ? 131071 : 524287);
if (isSetLoadId())
hashCode = hashCode * 8191 + load_id.hashCode();
return hashCode;
}
@Override
public int compareTo(TIngestBinlogRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetTxnId(), other.isSetTxnId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTxnId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txn_id, other.txn_id);
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(isSetBinlogVersion(), other.isSetBinlogVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBinlogVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binlog_version, other.binlog_version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemoteHost(), other.isSetRemoteHost());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemoteHost()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_host, other.remote_host);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRemotePort(), other.isSetRemotePort());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRemotePort()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.remote_port, other.remote_port);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitionId(), other.isSetPartitionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_id, other.partition_id);
if (lastComparison != 0) {
return lastComparison;
}
}
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(isSetLoadId(), other.isSetLoadId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLoadId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.load_id, other.load_id);
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("TIngestBinlogRequest(");
boolean first = true;
if (isSetTxnId()) {
sb.append("txn_id:");
sb.append(this.txn_id);
first = false;
}
if (isSetRemoteTabletId()) {
if (!first) sb.append(", ");
sb.append("remote_tablet_id:");
sb.append(this.remote_tablet_id);
first = false;
}
if (isSetBinlogVersion()) {
if (!first) sb.append(", ");
sb.append("binlog_version:");
sb.append(this.binlog_version);
first = false;
}
if (isSetRemoteHost()) {
if (!first) sb.append(", ");
sb.append("remote_host:");
if (this.remote_host == null) {
sb.append("null");
} else {
sb.append(this.remote_host);
}
first = false;
}
if (isSetRemotePort()) {
if (!first) sb.append(", ");
sb.append("remote_port:");
if (this.remote_port == null) {
sb.append("null");
} else {
sb.append(this.remote_port);
}
first = false;
}
if (isSetPartitionId()) {
if (!first) sb.append(", ");
sb.append("partition_id:");
sb.append(this.partition_id);
first = false;
}
if (isSetLocalTabletId()) {
if (!first) sb.append(", ");
sb.append("local_tablet_id:");
sb.append(this.local_tablet_id);
first = false;
}
if (isSetLoadId()) {
if (!first) sb.append(", ");
sb.append("load_id:");
if (this.load_id == null) {
sb.append("null");
} else {
sb.append(this.load_id);
}
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 (load_id != null) {
load_id.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 TIngestBinlogRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIngestBinlogRequestStandardScheme getScheme() {
return new TIngestBinlogRequestStandardScheme();
}
}
private static class TIngestBinlogRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIngestBinlogRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TIngestBinlogRequest 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: // TXN_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.txn_id = iprot.readI64();
struct.setTxnIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // 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 3: // BINLOG_VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.binlog_version = iprot.readI64();
struct.setBinlogVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // REMOTE_HOST
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.remote_host = iprot.readString();
struct.setRemoteHostIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // REMOTE_PORT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.remote_port = iprot.readString();
struct.setRemotePortIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // PARTITION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.partition_id = iprot.readI64();
struct.setPartitionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // 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 8: // LOAD_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.load_id = new org.apache.doris.thrift.TUniqueId();
struct.load_id.read(iprot);
struct.setLoadIdIsSet(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, TIngestBinlogRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetTxnId()) {
oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
oprot.writeI64(struct.txn_id);
oprot.writeFieldEnd();
}
if (struct.isSetRemoteTabletId()) {
oprot.writeFieldBegin(REMOTE_TABLET_ID_FIELD_DESC);
oprot.writeI64(struct.remote_tablet_id);
oprot.writeFieldEnd();
}
if (struct.isSetBinlogVersion()) {
oprot.writeFieldBegin(BINLOG_VERSION_FIELD_DESC);
oprot.writeI64(struct.binlog_version);
oprot.writeFieldEnd();
}
if (struct.remote_host != null) {
if (struct.isSetRemoteHost()) {
oprot.writeFieldBegin(REMOTE_HOST_FIELD_DESC);
oprot.writeString(struct.remote_host);
oprot.writeFieldEnd();
}
}
if (struct.remote_port != null) {
if (struct.isSetRemotePort()) {
oprot.writeFieldBegin(REMOTE_PORT_FIELD_DESC);
oprot.writeString(struct.remote_port);
oprot.writeFieldEnd();
}
}
if (struct.isSetPartitionId()) {
oprot.writeFieldBegin(PARTITION_ID_FIELD_DESC);
oprot.writeI64(struct.partition_id);
oprot.writeFieldEnd();
}
if (struct.isSetLocalTabletId()) {
oprot.writeFieldBegin(LOCAL_TABLET_ID_FIELD_DESC);
oprot.writeI64(struct.local_tablet_id);
oprot.writeFieldEnd();
}
if (struct.load_id != null) {
if (struct.isSetLoadId()) {
oprot.writeFieldBegin(LOAD_ID_FIELD_DESC);
struct.load_id.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TIngestBinlogRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TIngestBinlogRequestTupleScheme getScheme() {
return new TIngestBinlogRequestTupleScheme();
}
}
private static class TIngestBinlogRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIngestBinlogRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIngestBinlogRequest 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.isSetTxnId()) {
optionals.set(0);
}
if (struct.isSetRemoteTabletId()) {
optionals.set(1);
}
if (struct.isSetBinlogVersion()) {
optionals.set(2);
}
if (struct.isSetRemoteHost()) {
optionals.set(3);
}
if (struct.isSetRemotePort()) {
optionals.set(4);
}
if (struct.isSetPartitionId()) {
optionals.set(5);
}
if (struct.isSetLocalTabletId()) {
optionals.set(6);
}
if (struct.isSetLoadId()) {
optionals.set(7);
}
oprot.writeBitSet(optionals, 8);
if (struct.isSetTxnId()) {
oprot.writeI64(struct.txn_id);
}
if (struct.isSetRemoteTabletId()) {
oprot.writeI64(struct.remote_tablet_id);
}
if (struct.isSetBinlogVersion()) {
oprot.writeI64(struct.binlog_version);
}
if (struct.isSetRemoteHost()) {
oprot.writeString(struct.remote_host);
}
if (struct.isSetRemotePort()) {
oprot.writeString(struct.remote_port);
}
if (struct.isSetPartitionId()) {
oprot.writeI64(struct.partition_id);
}
if (struct.isSetLocalTabletId()) {
oprot.writeI64(struct.local_tablet_id);
}
if (struct.isSetLoadId()) {
struct.load_id.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIngestBinlogRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.txn_id = iprot.readI64();
struct.setTxnIdIsSet(true);
}
if (incoming.get(1)) {
struct.remote_tablet_id = iprot.readI64();
struct.setRemoteTabletIdIsSet(true);
}
if (incoming.get(2)) {
struct.binlog_version = iprot.readI64();
struct.setBinlogVersionIsSet(true);
}
if (incoming.get(3)) {
struct.remote_host = iprot.readString();
struct.setRemoteHostIsSet(true);
}
if (incoming.get(4)) {
struct.remote_port = iprot.readString();
struct.setRemotePortIsSet(true);
}
if (incoming.get(5)) {
struct.partition_id = iprot.readI64();
struct.setPartitionIdIsSet(true);
}
if (incoming.get(6)) {
struct.local_tablet_id = iprot.readI64();
struct.setLocalTabletIdIsSet(true);
}
if (incoming.get(7)) {
struct.load_id = new org.apache.doris.thrift.TUniqueId();
struct.load_id.read(iprot);
struct.setLoadIdIsSet(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();
}
}