TOlapTableIndexTablets.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-07-13")
public class TOlapTableIndexTablets implements org.apache.thrift.TBase<TOlapTableIndexTablets, TOlapTableIndexTablets._Fields>, java.io.Serializable, Cloneable, Comparable<TOlapTableIndexTablets> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOlapTableIndexTablets");
private static final org.apache.thrift.protocol.TField INDEX_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("index_id", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tablets", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField BUCKET_BE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("bucket_be_id", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField LOCAL_BUCKET_SEQS_FIELD_DESC = new org.apache.thrift.protocol.TField("local_bucket_seqs", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TOlapTableIndexTabletsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TOlapTableIndexTabletsTupleSchemeFactory();
public long index_id; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablets; // required
public long bucket_be_id; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> local_bucket_seqs; // 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 {
INDEX_ID((short)1, "index_id"),
TABLETS((short)2, "tablets"),
BUCKET_BE_ID((short)3, "bucket_be_id"),
LOCAL_BUCKET_SEQS((short)4, "local_bucket_seqs");
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: // INDEX_ID
return INDEX_ID;
case 2: // TABLETS
return TABLETS;
case 3: // BUCKET_BE_ID
return BUCKET_BE_ID;
case 4: // LOCAL_BUCKET_SEQS
return LOCAL_BUCKET_SEQS;
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 __INDEX_ID_ISSET_ID = 0;
private static final int __BUCKET_BE_ID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.BUCKET_BE_ID,_Fields.LOCAL_BUCKET_SEQS};
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.INDEX_ID, new org.apache.thrift.meta_data.FieldMetaData("index_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.TABLETS, new org.apache.thrift.meta_data.FieldMetaData("tablets", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
tmpMap.put(_Fields.BUCKET_BE_ID, new org.apache.thrift.meta_data.FieldMetaData("bucket_be_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.LOCAL_BUCKET_SEQS, new org.apache.thrift.meta_data.FieldMetaData("local_bucket_seqs", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOlapTableIndexTablets.class, metaDataMap);
}
public TOlapTableIndexTablets() {
}
public TOlapTableIndexTablets(
long index_id,
java.util.List<java.lang.Long> tablets)
{
this();
this.index_id = index_id;
setIndexIdIsSet(true);
this.tablets = tablets;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TOlapTableIndexTablets(TOlapTableIndexTablets other) {
__isset_bitfield = other.__isset_bitfield;
this.index_id = other.index_id;
if (other.isSetTablets()) {
java.util.List<java.lang.Long> __this__tablets = new java.util.ArrayList<java.lang.Long>(other.tablets);
this.tablets = __this__tablets;
}
this.bucket_be_id = other.bucket_be_id;
if (other.isSetLocalBucketSeqs()) {
java.util.List<java.lang.Integer> __this__local_bucket_seqs = new java.util.ArrayList<java.lang.Integer>(other.local_bucket_seqs);
this.local_bucket_seqs = __this__local_bucket_seqs;
}
}
public TOlapTableIndexTablets deepCopy() {
return new TOlapTableIndexTablets(this);
}
@Override
public void clear() {
setIndexIdIsSet(false);
this.index_id = 0;
this.tablets = null;
setBucketBeIdIsSet(false);
this.bucket_be_id = 0;
this.local_bucket_seqs = null;
}
public long getIndexId() {
return this.index_id;
}
public TOlapTableIndexTablets setIndexId(long index_id) {
this.index_id = index_id;
setIndexIdIsSet(true);
return this;
}
public void unsetIndexId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INDEX_ID_ISSET_ID);
}
/** Returns true if field index_id is set (has been assigned a value) and false otherwise */
public boolean isSetIndexId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INDEX_ID_ISSET_ID);
}
public void setIndexIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_ID_ISSET_ID, value);
}
public int getTabletsSize() {
return (this.tablets == null) ? 0 : this.tablets.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getTabletsIterator() {
return (this.tablets == null) ? null : this.tablets.iterator();
}
public void addToTablets(long elem) {
if (this.tablets == null) {
this.tablets = new java.util.ArrayList<java.lang.Long>();
}
this.tablets.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getTablets() {
return this.tablets;
}
public TOlapTableIndexTablets setTablets(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablets) {
this.tablets = tablets;
return this;
}
public void unsetTablets() {
this.tablets = null;
}
/** Returns true if field tablets is set (has been assigned a value) and false otherwise */
public boolean isSetTablets() {
return this.tablets != null;
}
public void setTabletsIsSet(boolean value) {
if (!value) {
this.tablets = null;
}
}
public long getBucketBeId() {
return this.bucket_be_id;
}
public TOlapTableIndexTablets setBucketBeId(long bucket_be_id) {
this.bucket_be_id = bucket_be_id;
setBucketBeIdIsSet(true);
return this;
}
public void unsetBucketBeId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BUCKET_BE_ID_ISSET_ID);
}
/** Returns true if field bucket_be_id is set (has been assigned a value) and false otherwise */
public boolean isSetBucketBeId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BUCKET_BE_ID_ISSET_ID);
}
public void setBucketBeIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BUCKET_BE_ID_ISSET_ID, value);
}
public int getLocalBucketSeqsSize() {
return (this.local_bucket_seqs == null) ? 0 : this.local_bucket_seqs.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Integer> getLocalBucketSeqsIterator() {
return (this.local_bucket_seqs == null) ? null : this.local_bucket_seqs.iterator();
}
public void addToLocalBucketSeqs(int elem) {
if (this.local_bucket_seqs == null) {
this.local_bucket_seqs = new java.util.ArrayList<java.lang.Integer>();
}
this.local_bucket_seqs.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Integer> getLocalBucketSeqs() {
return this.local_bucket_seqs;
}
public TOlapTableIndexTablets setLocalBucketSeqs(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> local_bucket_seqs) {
this.local_bucket_seqs = local_bucket_seqs;
return this;
}
public void unsetLocalBucketSeqs() {
this.local_bucket_seqs = null;
}
/** Returns true if field local_bucket_seqs is set (has been assigned a value) and false otherwise */
public boolean isSetLocalBucketSeqs() {
return this.local_bucket_seqs != null;
}
public void setLocalBucketSeqsIsSet(boolean value) {
if (!value) {
this.local_bucket_seqs = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case INDEX_ID:
if (value == null) {
unsetIndexId();
} else {
setIndexId((java.lang.Long)value);
}
break;
case TABLETS:
if (value == null) {
unsetTablets();
} else {
setTablets((java.util.List<java.lang.Long>)value);
}
break;
case BUCKET_BE_ID:
if (value == null) {
unsetBucketBeId();
} else {
setBucketBeId((java.lang.Long)value);
}
break;
case LOCAL_BUCKET_SEQS:
if (value == null) {
unsetLocalBucketSeqs();
} else {
setLocalBucketSeqs((java.util.List<java.lang.Integer>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case INDEX_ID:
return getIndexId();
case TABLETS:
return getTablets();
case BUCKET_BE_ID:
return getBucketBeId();
case LOCAL_BUCKET_SEQS:
return getLocalBucketSeqs();
}
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 INDEX_ID:
return isSetIndexId();
case TABLETS:
return isSetTablets();
case BUCKET_BE_ID:
return isSetBucketBeId();
case LOCAL_BUCKET_SEQS:
return isSetLocalBucketSeqs();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TOlapTableIndexTablets)
return this.equals((TOlapTableIndexTablets)that);
return false;
}
public boolean equals(TOlapTableIndexTablets that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_index_id = true;
boolean that_present_index_id = true;
if (this_present_index_id || that_present_index_id) {
if (!(this_present_index_id && that_present_index_id))
return false;
if (this.index_id != that.index_id)
return false;
}
boolean this_present_tablets = true && this.isSetTablets();
boolean that_present_tablets = true && that.isSetTablets();
if (this_present_tablets || that_present_tablets) {
if (!(this_present_tablets && that_present_tablets))
return false;
if (!this.tablets.equals(that.tablets))
return false;
}
boolean this_present_bucket_be_id = true && this.isSetBucketBeId();
boolean that_present_bucket_be_id = true && that.isSetBucketBeId();
if (this_present_bucket_be_id || that_present_bucket_be_id) {
if (!(this_present_bucket_be_id && that_present_bucket_be_id))
return false;
if (this.bucket_be_id != that.bucket_be_id)
return false;
}
boolean this_present_local_bucket_seqs = true && this.isSetLocalBucketSeqs();
boolean that_present_local_bucket_seqs = true && that.isSetLocalBucketSeqs();
if (this_present_local_bucket_seqs || that_present_local_bucket_seqs) {
if (!(this_present_local_bucket_seqs && that_present_local_bucket_seqs))
return false;
if (!this.local_bucket_seqs.equals(that.local_bucket_seqs))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(index_id);
hashCode = hashCode * 8191 + ((isSetTablets()) ? 131071 : 524287);
if (isSetTablets())
hashCode = hashCode * 8191 + tablets.hashCode();
hashCode = hashCode * 8191 + ((isSetBucketBeId()) ? 131071 : 524287);
if (isSetBucketBeId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(bucket_be_id);
hashCode = hashCode * 8191 + ((isSetLocalBucketSeqs()) ? 131071 : 524287);
if (isSetLocalBucketSeqs())
hashCode = hashCode * 8191 + local_bucket_seqs.hashCode();
return hashCode;
}
@Override
public int compareTo(TOlapTableIndexTablets other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetIndexId(), other.isSetIndexId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_id, other.index_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTablets(), other.isSetTablets());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTablets()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablets, other.tablets);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBucketBeId(), other.isSetBucketBeId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBucketBeId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bucket_be_id, other.bucket_be_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLocalBucketSeqs(), other.isSetLocalBucketSeqs());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLocalBucketSeqs()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.local_bucket_seqs, other.local_bucket_seqs);
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("TOlapTableIndexTablets(");
boolean first = true;
sb.append("index_id:");
sb.append(this.index_id);
first = false;
if (!first) sb.append(", ");
sb.append("tablets:");
if (this.tablets == null) {
sb.append("null");
} else {
sb.append(this.tablets);
}
first = false;
if (isSetBucketBeId()) {
if (!first) sb.append(", ");
sb.append("bucket_be_id:");
sb.append(this.bucket_be_id);
first = false;
}
if (isSetLocalBucketSeqs()) {
if (!first) sb.append(", ");
sb.append("local_bucket_seqs:");
if (this.local_bucket_seqs == null) {
sb.append("null");
} else {
sb.append(this.local_bucket_seqs);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'index_id' because it's a primitive and you chose the non-beans generator.
if (tablets == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablets' was not present! Struct: " + toString());
}
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TOlapTableIndexTabletsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TOlapTableIndexTabletsStandardScheme getScheme() {
return new TOlapTableIndexTabletsStandardScheme();
}
}
private static class TOlapTableIndexTabletsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TOlapTableIndexTablets> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TOlapTableIndexTablets 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: // INDEX_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.index_id = iprot.readI64();
struct.setIndexIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TABLETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
struct.tablets = new java.util.ArrayList<java.lang.Long>(_list48.size);
long _elem49;
for (int _i50 = 0; _i50 < _list48.size; ++_i50)
{
_elem49 = iprot.readI64();
struct.tablets.add(_elem49);
}
iprot.readListEnd();
}
struct.setTabletsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // BUCKET_BE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.bucket_be_id = iprot.readI64();
struct.setBucketBeIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // LOCAL_BUCKET_SEQS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list51 = iprot.readListBegin();
struct.local_bucket_seqs = new java.util.ArrayList<java.lang.Integer>(_list51.size);
int _elem52;
for (int _i53 = 0; _i53 < _list51.size; ++_i53)
{
_elem52 = iprot.readI32();
struct.local_bucket_seqs.add(_elem52);
}
iprot.readListEnd();
}
struct.setLocalBucketSeqsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
if (!struct.isSetIndexId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'index_id' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TOlapTableIndexTablets struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(INDEX_ID_FIELD_DESC);
oprot.writeI64(struct.index_id);
oprot.writeFieldEnd();
if (struct.tablets != null) {
oprot.writeFieldBegin(TABLETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.tablets.size()));
for (long _iter54 : struct.tablets)
{
oprot.writeI64(_iter54);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.isSetBucketBeId()) {
oprot.writeFieldBegin(BUCKET_BE_ID_FIELD_DESC);
oprot.writeI64(struct.bucket_be_id);
oprot.writeFieldEnd();
}
if (struct.local_bucket_seqs != null) {
if (struct.isSetLocalBucketSeqs()) {
oprot.writeFieldBegin(LOCAL_BUCKET_SEQS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.local_bucket_seqs.size()));
for (int _iter55 : struct.local_bucket_seqs)
{
oprot.writeI32(_iter55);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TOlapTableIndexTabletsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TOlapTableIndexTabletsTupleScheme getScheme() {
return new TOlapTableIndexTabletsTupleScheme();
}
}
private static class TOlapTableIndexTabletsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TOlapTableIndexTablets> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TOlapTableIndexTablets struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.index_id);
{
oprot.writeI32(struct.tablets.size());
for (long _iter56 : struct.tablets)
{
oprot.writeI64(_iter56);
}
}
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetBucketBeId()) {
optionals.set(0);
}
if (struct.isSetLocalBucketSeqs()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetBucketBeId()) {
oprot.writeI64(struct.bucket_be_id);
}
if (struct.isSetLocalBucketSeqs()) {
{
oprot.writeI32(struct.local_bucket_seqs.size());
for (int _iter57 : struct.local_bucket_seqs)
{
oprot.writeI32(_iter57);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TOlapTableIndexTablets struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.index_id = iprot.readI64();
struct.setIndexIdIsSet(true);
{
org.apache.thrift.protocol.TList _list58 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.tablets = new java.util.ArrayList<java.lang.Long>(_list58.size);
long _elem59;
for (int _i60 = 0; _i60 < _list58.size; ++_i60)
{
_elem59 = iprot.readI64();
struct.tablets.add(_elem59);
}
}
struct.setTabletsIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.bucket_be_id = iprot.readI64();
struct.setBucketBeIdIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list61 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
struct.local_bucket_seqs = new java.util.ArrayList<java.lang.Integer>(_list61.size);
int _elem62;
for (int _i63 = 0; _i63 < _list61.size; ++_i63)
{
_elem62 = iprot.readI32();
struct.local_bucket_seqs.add(_elem62);
}
}
struct.setLocalBucketSeqsIsSet(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();
}
}