TGetOlapTableMetaRequest.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 TGetOlapTableMetaRequest implements org.apache.thrift.TBase<TGetOlapTableMetaRequest, TGetOlapTableMetaRequest._Fields>, java.io.Serializable, Cloneable, Comparable<TGetOlapTableMetaRequest> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOlapTableMetaRequest");
private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PASSWD_FIELD_DESC = new org.apache.thrift.protocol.TField("passwd", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField DB_FIELD_DESC = new org.apache.thrift.protocol.TField("db", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField TABLE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("table_id", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TGetOlapTableMetaRequestStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TGetOlapTableMetaRequestTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String user; // required
public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // required
public @org.apache.thrift.annotation.Nullable java.lang.String db; // required
public @org.apache.thrift.annotation.Nullable java.lang.String table; // required
public long table_id; // required
public int version; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TPartitionMeta> partitions; // 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 {
USER((short)1, "user"),
PASSWD((short)2, "passwd"),
DB((short)3, "db"),
TABLE((short)4, "table"),
TABLE_ID((short)5, "table_id"),
VERSION((short)6, "version"),
PARTITIONS((short)7, "partitions");
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: // USER
return USER;
case 2: // PASSWD
return PASSWD;
case 3: // DB
return DB;
case 4: // TABLE
return TABLE;
case 5: // TABLE_ID
return TABLE_ID;
case 6: // VERSION
return VERSION;
case 7: // PARTITIONS
return PARTITIONS;
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 __TABLE_ID_ISSET_ID = 0;
private static final int __VERSION_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.VERSION,_Fields.PARTITIONS};
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.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PASSWD, new org.apache.thrift.meta_data.FieldMetaData("passwd", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DB, new org.apache.thrift.meta_data.FieldMetaData("db", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TABLE_ID, new org.apache.thrift.meta_data.FieldMetaData("table_id", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TPartitionMeta.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetOlapTableMetaRequest.class, metaDataMap);
}
public TGetOlapTableMetaRequest() {
}
public TGetOlapTableMetaRequest(
java.lang.String user,
java.lang.String passwd,
java.lang.String db,
java.lang.String table,
long table_id)
{
this();
this.user = user;
this.passwd = passwd;
this.db = db;
this.table = table;
this.table_id = table_id;
setTableIdIsSet(true);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TGetOlapTableMetaRequest(TGetOlapTableMetaRequest other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetUser()) {
this.user = other.user;
}
if (other.isSetPasswd()) {
this.passwd = other.passwd;
}
if (other.isSetDb()) {
this.db = other.db;
}
if (other.isSetTable()) {
this.table = other.table;
}
this.table_id = other.table_id;
this.version = other.version;
if (other.isSetPartitions()) {
java.util.List<TPartitionMeta> __this__partitions = new java.util.ArrayList<TPartitionMeta>(other.partitions.size());
for (TPartitionMeta other_element : other.partitions) {
__this__partitions.add(new TPartitionMeta(other_element));
}
this.partitions = __this__partitions;
}
}
public TGetOlapTableMetaRequest deepCopy() {
return new TGetOlapTableMetaRequest(this);
}
@Override
public void clear() {
this.user = null;
this.passwd = null;
this.db = null;
this.table = null;
setTableIdIsSet(false);
this.table_id = 0;
setVersionIsSet(false);
this.version = 0;
this.partitions = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getUser() {
return this.user;
}
public TGetOlapTableMetaRequest setUser(@org.apache.thrift.annotation.Nullable java.lang.String user) {
this.user = user;
return this;
}
public void unsetUser() {
this.user = null;
}
/** Returns true if field user is set (has been assigned a value) and false otherwise */
public boolean isSetUser() {
return this.user != null;
}
public void setUserIsSet(boolean value) {
if (!value) {
this.user = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPasswd() {
return this.passwd;
}
public TGetOlapTableMetaRequest setPasswd(@org.apache.thrift.annotation.Nullable java.lang.String passwd) {
this.passwd = passwd;
return this;
}
public void unsetPasswd() {
this.passwd = null;
}
/** Returns true if field passwd is set (has been assigned a value) and false otherwise */
public boolean isSetPasswd() {
return this.passwd != null;
}
public void setPasswdIsSet(boolean value) {
if (!value) {
this.passwd = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDb() {
return this.db;
}
public TGetOlapTableMetaRequest setDb(@org.apache.thrift.annotation.Nullable java.lang.String db) {
this.db = db;
return this;
}
public void unsetDb() {
this.db = null;
}
/** Returns true if field db is set (has been assigned a value) and false otherwise */
public boolean isSetDb() {
return this.db != null;
}
public void setDbIsSet(boolean value) {
if (!value) {
this.db = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTable() {
return this.table;
}
public TGetOlapTableMetaRequest setTable(@org.apache.thrift.annotation.Nullable java.lang.String table) {
this.table = table;
return this;
}
public void unsetTable() {
this.table = null;
}
/** Returns true if field table is set (has been assigned a value) and false otherwise */
public boolean isSetTable() {
return this.table != null;
}
public void setTableIsSet(boolean value) {
if (!value) {
this.table = null;
}
}
public long getTableId() {
return this.table_id;
}
public TGetOlapTableMetaRequest setTableId(long table_id) {
this.table_id = table_id;
setTableIdIsSet(true);
return this;
}
public void unsetTableId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TABLE_ID_ISSET_ID);
}
/** Returns true if field table_id is set (has been assigned a value) and false otherwise */
public boolean isSetTableId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TABLE_ID_ISSET_ID);
}
public void setTableIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TABLE_ID_ISSET_ID, value);
}
public int getVersion() {
return this.version;
}
public TGetOlapTableMetaRequest setVersion(int version) {
this.version = version;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public int getPartitionsSize() {
return (this.partitions == null) ? 0 : this.partitions.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TPartitionMeta> getPartitionsIterator() {
return (this.partitions == null) ? null : this.partitions.iterator();
}
public void addToPartitions(TPartitionMeta elem) {
if (this.partitions == null) {
this.partitions = new java.util.ArrayList<TPartitionMeta>();
}
this.partitions.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TPartitionMeta> getPartitions() {
return this.partitions;
}
public TGetOlapTableMetaRequest setPartitions(@org.apache.thrift.annotation.Nullable java.util.List<TPartitionMeta> partitions) {
this.partitions = partitions;
return this;
}
public void unsetPartitions() {
this.partitions = null;
}
/** Returns true if field partitions is set (has been assigned a value) and false otherwise */
public boolean isSetPartitions() {
return this.partitions != null;
}
public void setPartitionsIsSet(boolean value) {
if (!value) {
this.partitions = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER:
if (value == null) {
unsetUser();
} else {
setUser((java.lang.String)value);
}
break;
case PASSWD:
if (value == null) {
unsetPasswd();
} else {
setPasswd((java.lang.String)value);
}
break;
case DB:
if (value == null) {
unsetDb();
} else {
setDb((java.lang.String)value);
}
break;
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((java.lang.String)value);
}
break;
case TABLE_ID:
if (value == null) {
unsetTableId();
} else {
setTableId((java.lang.Long)value);
}
break;
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((java.lang.Integer)value);
}
break;
case PARTITIONS:
if (value == null) {
unsetPartitions();
} else {
setPartitions((java.util.List<TPartitionMeta>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER:
return getUser();
case PASSWD:
return getPasswd();
case DB:
return getDb();
case TABLE:
return getTable();
case TABLE_ID:
return getTableId();
case VERSION:
return getVersion();
case PARTITIONS:
return getPartitions();
}
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 USER:
return isSetUser();
case PASSWD:
return isSetPasswd();
case DB:
return isSetDb();
case TABLE:
return isSetTable();
case TABLE_ID:
return isSetTableId();
case VERSION:
return isSetVersion();
case PARTITIONS:
return isSetPartitions();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TGetOlapTableMetaRequest)
return this.equals((TGetOlapTableMetaRequest)that);
return false;
}
public boolean equals(TGetOlapTableMetaRequest that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_user = true && this.isSetUser();
boolean that_present_user = true && that.isSetUser();
if (this_present_user || that_present_user) {
if (!(this_present_user && that_present_user))
return false;
if (!this.user.equals(that.user))
return false;
}
boolean this_present_passwd = true && this.isSetPasswd();
boolean that_present_passwd = true && that.isSetPasswd();
if (this_present_passwd || that_present_passwd) {
if (!(this_present_passwd && that_present_passwd))
return false;
if (!this.passwd.equals(that.passwd))
return false;
}
boolean this_present_db = true && this.isSetDb();
boolean that_present_db = true && that.isSetDb();
if (this_present_db || that_present_db) {
if (!(this_present_db && that_present_db))
return false;
if (!this.db.equals(that.db))
return false;
}
boolean this_present_table = true && this.isSetTable();
boolean that_present_table = true && that.isSetTable();
if (this_present_table || that_present_table) {
if (!(this_present_table && that_present_table))
return false;
if (!this.table.equals(that.table))
return false;
}
boolean this_present_table_id = true;
boolean that_present_table_id = true;
if (this_present_table_id || that_present_table_id) {
if (!(this_present_table_id && that_present_table_id))
return false;
if (this.table_id != that.table_id)
return false;
}
boolean this_present_version = true && this.isSetVersion();
boolean that_present_version = true && that.isSetVersion();
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (this.version != that.version)
return false;
}
boolean this_present_partitions = true && this.isSetPartitions();
boolean that_present_partitions = true && that.isSetPartitions();
if (this_present_partitions || that_present_partitions) {
if (!(this_present_partitions && that_present_partitions))
return false;
if (!this.partitions.equals(that.partitions))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
if (isSetUser())
hashCode = hashCode * 8191 + user.hashCode();
hashCode = hashCode * 8191 + ((isSetPasswd()) ? 131071 : 524287);
if (isSetPasswd())
hashCode = hashCode * 8191 + passwd.hashCode();
hashCode = hashCode * 8191 + ((isSetDb()) ? 131071 : 524287);
if (isSetDb())
hashCode = hashCode * 8191 + db.hashCode();
hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
if (isSetTable())
hashCode = hashCode * 8191 + table.hashCode();
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(table_id);
hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287);
if (isSetVersion())
hashCode = hashCode * 8191 + version;
hashCode = hashCode * 8191 + ((isSetPartitions()) ? 131071 : 524287);
if (isSetPartitions())
hashCode = hashCode * 8191 + partitions.hashCode();
return hashCode;
}
@Override
public int compareTo(TGetOlapTableMetaRequest other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUser()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPasswd(), other.isSetPasswd());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPasswd()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.passwd, other.passwd);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDb(), other.isSetDb());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDb()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.db, other.db);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTable(), other.isSetTable());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTable()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, other.table);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTableId(), other.isSetTableId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTableId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table_id, other.table_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitions(), other.isSetPartitions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions);
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("TGetOlapTableMetaRequest(");
boolean first = true;
sb.append("user:");
if (this.user == null) {
sb.append("null");
} else {
sb.append(this.user);
}
first = false;
if (!first) sb.append(", ");
sb.append("passwd:");
if (this.passwd == null) {
sb.append("null");
} else {
sb.append(this.passwd);
}
first = false;
if (!first) sb.append(", ");
sb.append("db:");
if (this.db == null) {
sb.append("null");
} else {
sb.append(this.db);
}
first = false;
if (!first) sb.append(", ");
sb.append("table:");
if (this.table == null) {
sb.append("null");
} else {
sb.append(this.table);
}
first = false;
if (!first) sb.append(", ");
sb.append("table_id:");
sb.append(this.table_id);
first = false;
if (isSetVersion()) {
if (!first) sb.append(", ");
sb.append("version:");
sb.append(this.version);
first = false;
}
if (isSetPartitions()) {
if (!first) sb.append(", ");
sb.append("partitions:");
if (this.partitions == null) {
sb.append("null");
} else {
sb.append(this.partitions);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (user == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'user' was not present! Struct: " + toString());
}
if (passwd == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'passwd' was not present! Struct: " + toString());
}
if (db == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'db' was not present! Struct: " + toString());
}
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
// alas, we cannot check 'table_id' because it's a primitive and you chose the non-beans generator.
// 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 TGetOlapTableMetaRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetOlapTableMetaRequestStandardScheme getScheme() {
return new TGetOlapTableMetaRequestStandardScheme();
}
}
private static class TGetOlapTableMetaRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<TGetOlapTableMetaRequest> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOlapTableMetaRequest 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: // USER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.user = iprot.readString();
struct.setUserIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PASSWD
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.passwd = iprot.readString();
struct.setPasswdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // DB
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.db = iprot.readString();
struct.setDbIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // TABLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.table = iprot.readString();
struct.setTableIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // TABLE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.table_id = iprot.readI64();
struct.setTableIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.version = iprot.readI32();
struct.setVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // PARTITIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list968 = iprot.readListBegin();
struct.partitions = new java.util.ArrayList<TPartitionMeta>(_list968.size);
@org.apache.thrift.annotation.Nullable TPartitionMeta _elem969;
for (int _i970 = 0; _i970 < _list968.size; ++_i970)
{
_elem969 = new TPartitionMeta();
_elem969.read(iprot);
struct.partitions.add(_elem969);
}
iprot.readListEnd();
}
struct.setPartitionsIsSet(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.isSetTableId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table_id' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOlapTableMetaRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.user != null) {
oprot.writeFieldBegin(USER_FIELD_DESC);
oprot.writeString(struct.user);
oprot.writeFieldEnd();
}
if (struct.passwd != null) {
oprot.writeFieldBegin(PASSWD_FIELD_DESC);
oprot.writeString(struct.passwd);
oprot.writeFieldEnd();
}
if (struct.db != null) {
oprot.writeFieldBegin(DB_FIELD_DESC);
oprot.writeString(struct.db);
oprot.writeFieldEnd();
}
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeString(struct.table);
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(TABLE_ID_FIELD_DESC);
oprot.writeI64(struct.table_id);
oprot.writeFieldEnd();
if (struct.isSetVersion()) {
oprot.writeFieldBegin(VERSION_FIELD_DESC);
oprot.writeI32(struct.version);
oprot.writeFieldEnd();
}
if (struct.partitions != null) {
if (struct.isSetPartitions()) {
oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
for (TPartitionMeta _iter971 : struct.partitions)
{
_iter971.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetOlapTableMetaRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TGetOlapTableMetaRequestTupleScheme getScheme() {
return new TGetOlapTableMetaRequestTupleScheme();
}
}
private static class TGetOlapTableMetaRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<TGetOlapTableMetaRequest> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetOlapTableMetaRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.user);
oprot.writeString(struct.passwd);
oprot.writeString(struct.db);
oprot.writeString(struct.table);
oprot.writeI64(struct.table_id);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetVersion()) {
optionals.set(0);
}
if (struct.isSetPartitions()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetVersion()) {
oprot.writeI32(struct.version);
}
if (struct.isSetPartitions()) {
{
oprot.writeI32(struct.partitions.size());
for (TPartitionMeta _iter972 : struct.partitions)
{
_iter972.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetOlapTableMetaRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.user = iprot.readString();
struct.setUserIsSet(true);
struct.passwd = iprot.readString();
struct.setPasswdIsSet(true);
struct.db = iprot.readString();
struct.setDbIsSet(true);
struct.table = iprot.readString();
struct.setTableIsSet(true);
struct.table_id = iprot.readI64();
struct.setTableIdIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.version = iprot.readI32();
struct.setVersionIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list973 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.partitions = new java.util.ArrayList<TPartitionMeta>(_list973.size);
@org.apache.thrift.annotation.Nullable TPartitionMeta _elem974;
for (int _i975 = 0; _i975 < _list973.size; ++_i975)
{
_elem974 = new TPartitionMeta();
_elem974.read(iprot);
struct.partitions.add(_elem974);
}
}
struct.setPartitionsIsSet(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();
}
}