TScanOpenParams.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 TScanOpenParams implements org.apache.thrift.TBase<TScanOpenParams, TScanOpenParams._Fields>, java.io.Serializable, Cloneable, Comparable<TScanOpenParams> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScanOpenParams");
private static final org.apache.thrift.protocol.TField CLUSTER_FIELD_DESC = new org.apache.thrift.protocol.TField("cluster", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField DATABASE_FIELD_DESC = new org.apache.thrift.protocol.TField("database", org.apache.thrift.protocol.TType.STRING, (short)2);
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)3);
private static final org.apache.thrift.protocol.TField TABLET_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("tablet_ids", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField OPAQUED_QUERY_PLAN_FIELD_DESC = new org.apache.thrift.protocol.TField("opaqued_query_plan", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField BATCH_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("batch_size", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField PROPERTIES_FIELD_DESC = new org.apache.thrift.protocol.TField("properties", org.apache.thrift.protocol.TType.MAP, (short)7);
private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I64, (short)8);
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)9);
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)10);
private static final org.apache.thrift.protocol.TField KEEP_ALIVE_MIN_FIELD_DESC = new org.apache.thrift.protocol.TField("keep_alive_min", org.apache.thrift.protocol.TType.I16, (short)11);
private static final org.apache.thrift.protocol.TField EXECUTION_TIMEOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("execution_timeout", org.apache.thrift.protocol.TType.I32, (short)12);
private static final org.apache.thrift.protocol.TField MEM_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("mem_limit", org.apache.thrift.protocol.TType.I64, (short)13);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TScanOpenParamsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TScanOpenParamsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String cluster; // required
public @org.apache.thrift.annotation.Nullable java.lang.String database; // required
public @org.apache.thrift.annotation.Nullable java.lang.String table; // required
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablet_ids; // required
public @org.apache.thrift.annotation.Nullable java.lang.String opaqued_query_plan; // required
public int batch_size; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> properties; // optional
public long limit; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String user; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String passwd; // optional
public short keep_alive_min; // optional
public int execution_timeout; // optional
public long mem_limit; // 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 {
CLUSTER((short)1, "cluster"),
DATABASE((short)2, "database"),
TABLE((short)3, "table"),
TABLET_IDS((short)4, "tablet_ids"),
OPAQUED_QUERY_PLAN((short)5, "opaqued_query_plan"),
BATCH_SIZE((short)6, "batch_size"),
PROPERTIES((short)7, "properties"),
LIMIT((short)8, "limit"),
USER((short)9, "user"),
PASSWD((short)10, "passwd"),
KEEP_ALIVE_MIN((short)11, "keep_alive_min"),
EXECUTION_TIMEOUT((short)12, "execution_timeout"),
MEM_LIMIT((short)13, "mem_limit");
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: // CLUSTER
return CLUSTER;
case 2: // DATABASE
return DATABASE;
case 3: // TABLE
return TABLE;
case 4: // TABLET_IDS
return TABLET_IDS;
case 5: // OPAQUED_QUERY_PLAN
return OPAQUED_QUERY_PLAN;
case 6: // BATCH_SIZE
return BATCH_SIZE;
case 7: // PROPERTIES
return PROPERTIES;
case 8: // LIMIT
return LIMIT;
case 9: // USER
return USER;
case 10: // PASSWD
return PASSWD;
case 11: // KEEP_ALIVE_MIN
return KEEP_ALIVE_MIN;
case 12: // EXECUTION_TIMEOUT
return EXECUTION_TIMEOUT;
case 13: // MEM_LIMIT
return MEM_LIMIT;
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 __BATCH_SIZE_ISSET_ID = 0;
private static final int __LIMIT_ISSET_ID = 1;
private static final int __KEEP_ALIVE_MIN_ISSET_ID = 2;
private static final int __EXECUTION_TIMEOUT_ISSET_ID = 3;
private static final int __MEM_LIMIT_ISSET_ID = 4;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.BATCH_SIZE,_Fields.PROPERTIES,_Fields.LIMIT,_Fields.USER,_Fields.PASSWD,_Fields.KEEP_ALIVE_MIN,_Fields.EXECUTION_TIMEOUT,_Fields.MEM_LIMIT};
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.CLUSTER, new org.apache.thrift.meta_data.FieldMetaData("cluster", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DATABASE, new org.apache.thrift.meta_data.FieldMetaData("database", 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.TABLET_IDS, new org.apache.thrift.meta_data.FieldMetaData("tablet_ids", 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.OPAQUED_QUERY_PLAN, new org.apache.thrift.meta_data.FieldMetaData("opaqued_query_plan", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.BATCH_SIZE, new org.apache.thrift.meta_data.FieldMetaData("batch_size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PROPERTIES, new org.apache.thrift.meta_data.FieldMetaData("properties", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.LIMIT, new org.apache.thrift.meta_data.FieldMetaData("limit", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.KEEP_ALIVE_MIN, new org.apache.thrift.meta_data.FieldMetaData("keep_alive_min", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
tmpMap.put(_Fields.EXECUTION_TIMEOUT, new org.apache.thrift.meta_data.FieldMetaData("execution_timeout", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.MEM_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("mem_limit", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScanOpenParams.class, metaDataMap);
}
public TScanOpenParams() {
}
public TScanOpenParams(
java.lang.String cluster,
java.lang.String database,
java.lang.String table,
java.util.List<java.lang.Long> tablet_ids,
java.lang.String opaqued_query_plan)
{
this();
this.cluster = cluster;
this.database = database;
this.table = table;
this.tablet_ids = tablet_ids;
this.opaqued_query_plan = opaqued_query_plan;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TScanOpenParams(TScanOpenParams other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetCluster()) {
this.cluster = other.cluster;
}
if (other.isSetDatabase()) {
this.database = other.database;
}
if (other.isSetTable()) {
this.table = other.table;
}
if (other.isSetTabletIds()) {
java.util.List<java.lang.Long> __this__tablet_ids = new java.util.ArrayList<java.lang.Long>(other.tablet_ids);
this.tablet_ids = __this__tablet_ids;
}
if (other.isSetOpaquedQueryPlan()) {
this.opaqued_query_plan = other.opaqued_query_plan;
}
this.batch_size = other.batch_size;
if (other.isSetProperties()) {
java.util.Map<java.lang.String,java.lang.String> __this__properties = new java.util.HashMap<java.lang.String,java.lang.String>(other.properties);
this.properties = __this__properties;
}
this.limit = other.limit;
if (other.isSetUser()) {
this.user = other.user;
}
if (other.isSetPasswd()) {
this.passwd = other.passwd;
}
this.keep_alive_min = other.keep_alive_min;
this.execution_timeout = other.execution_timeout;
this.mem_limit = other.mem_limit;
}
public TScanOpenParams deepCopy() {
return new TScanOpenParams(this);
}
@Override
public void clear() {
this.cluster = null;
this.database = null;
this.table = null;
this.tablet_ids = null;
this.opaqued_query_plan = null;
setBatchSizeIsSet(false);
this.batch_size = 0;
this.properties = null;
setLimitIsSet(false);
this.limit = 0;
this.user = null;
this.passwd = null;
setKeepAliveMinIsSet(false);
this.keep_alive_min = 0;
setExecutionTimeoutIsSet(false);
this.execution_timeout = 0;
setMemLimitIsSet(false);
this.mem_limit = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCluster() {
return this.cluster;
}
public TScanOpenParams setCluster(@org.apache.thrift.annotation.Nullable java.lang.String cluster) {
this.cluster = cluster;
return this;
}
public void unsetCluster() {
this.cluster = null;
}
/** Returns true if field cluster is set (has been assigned a value) and false otherwise */
public boolean isSetCluster() {
return this.cluster != null;
}
public void setClusterIsSet(boolean value) {
if (!value) {
this.cluster = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDatabase() {
return this.database;
}
public TScanOpenParams setDatabase(@org.apache.thrift.annotation.Nullable java.lang.String database) {
this.database = database;
return this;
}
public void unsetDatabase() {
this.database = null;
}
/** Returns true if field database is set (has been assigned a value) and false otherwise */
public boolean isSetDatabase() {
return this.database != null;
}
public void setDatabaseIsSet(boolean value) {
if (!value) {
this.database = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getTable() {
return this.table;
}
public TScanOpenParams 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 int getTabletIdsSize() {
return (this.tablet_ids == null) ? 0 : this.tablet_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getTabletIdsIterator() {
return (this.tablet_ids == null) ? null : this.tablet_ids.iterator();
}
public void addToTabletIds(long elem) {
if (this.tablet_ids == null) {
this.tablet_ids = new java.util.ArrayList<java.lang.Long>();
}
this.tablet_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getTabletIds() {
return this.tablet_ids;
}
public TScanOpenParams setTabletIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> tablet_ids) {
this.tablet_ids = tablet_ids;
return this;
}
public void unsetTabletIds() {
this.tablet_ids = null;
}
/** Returns true if field tablet_ids is set (has been assigned a value) and false otherwise */
public boolean isSetTabletIds() {
return this.tablet_ids != null;
}
public void setTabletIdsIsSet(boolean value) {
if (!value) {
this.tablet_ids = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getOpaquedQueryPlan() {
return this.opaqued_query_plan;
}
public TScanOpenParams setOpaquedQueryPlan(@org.apache.thrift.annotation.Nullable java.lang.String opaqued_query_plan) {
this.opaqued_query_plan = opaqued_query_plan;
return this;
}
public void unsetOpaquedQueryPlan() {
this.opaqued_query_plan = null;
}
/** Returns true if field opaqued_query_plan is set (has been assigned a value) and false otherwise */
public boolean isSetOpaquedQueryPlan() {
return this.opaqued_query_plan != null;
}
public void setOpaquedQueryPlanIsSet(boolean value) {
if (!value) {
this.opaqued_query_plan = null;
}
}
public int getBatchSize() {
return this.batch_size;
}
public TScanOpenParams setBatchSize(int batch_size) {
this.batch_size = batch_size;
setBatchSizeIsSet(true);
return this;
}
public void unsetBatchSize() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BATCH_SIZE_ISSET_ID);
}
/** Returns true if field batch_size is set (has been assigned a value) and false otherwise */
public boolean isSetBatchSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BATCH_SIZE_ISSET_ID);
}
public void setBatchSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BATCH_SIZE_ISSET_ID, value);
}
public int getPropertiesSize() {
return (this.properties == null) ? 0 : this.properties.size();
}
public void putToProperties(java.lang.String key, java.lang.String val) {
if (this.properties == null) {
this.properties = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.properties.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.String,java.lang.String> getProperties() {
return this.properties;
}
public TScanOpenParams setProperties(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> properties) {
this.properties = properties;
return this;
}
public void unsetProperties() {
this.properties = null;
}
/** Returns true if field properties is set (has been assigned a value) and false otherwise */
public boolean isSetProperties() {
return this.properties != null;
}
public void setPropertiesIsSet(boolean value) {
if (!value) {
this.properties = null;
}
}
public long getLimit() {
return this.limit;
}
public TScanOpenParams setLimit(long limit) {
this.limit = limit;
setLimitIsSet(true);
return this;
}
public void unsetLimit() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIMIT_ISSET_ID);
}
/** Returns true if field limit is set (has been assigned a value) and false otherwise */
public boolean isSetLimit() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMIT_ISSET_ID);
}
public void setLimitIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMIT_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getUser() {
return this.user;
}
public TScanOpenParams 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 TScanOpenParams 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;
}
}
public short getKeepAliveMin() {
return this.keep_alive_min;
}
public TScanOpenParams setKeepAliveMin(short keep_alive_min) {
this.keep_alive_min = keep_alive_min;
setKeepAliveMinIsSet(true);
return this;
}
public void unsetKeepAliveMin() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __KEEP_ALIVE_MIN_ISSET_ID);
}
/** Returns true if field keep_alive_min is set (has been assigned a value) and false otherwise */
public boolean isSetKeepAliveMin() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __KEEP_ALIVE_MIN_ISSET_ID);
}
public void setKeepAliveMinIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __KEEP_ALIVE_MIN_ISSET_ID, value);
}
public int getExecutionTimeout() {
return this.execution_timeout;
}
public TScanOpenParams setExecutionTimeout(int execution_timeout) {
this.execution_timeout = execution_timeout;
setExecutionTimeoutIsSet(true);
return this;
}
public void unsetExecutionTimeout() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXECUTION_TIMEOUT_ISSET_ID);
}
/** Returns true if field execution_timeout is set (has been assigned a value) and false otherwise */
public boolean isSetExecutionTimeout() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXECUTION_TIMEOUT_ISSET_ID);
}
public void setExecutionTimeoutIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXECUTION_TIMEOUT_ISSET_ID, value);
}
public long getMemLimit() {
return this.mem_limit;
}
public TScanOpenParams setMemLimit(long mem_limit) {
this.mem_limit = mem_limit;
setMemLimitIsSet(true);
return this;
}
public void unsetMemLimit() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MEM_LIMIT_ISSET_ID);
}
/** Returns true if field mem_limit is set (has been assigned a value) and false otherwise */
public boolean isSetMemLimit() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MEM_LIMIT_ISSET_ID);
}
public void setMemLimitIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MEM_LIMIT_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case CLUSTER:
if (value == null) {
unsetCluster();
} else {
setCluster((java.lang.String)value);
}
break;
case DATABASE:
if (value == null) {
unsetDatabase();
} else {
setDatabase((java.lang.String)value);
}
break;
case TABLE:
if (value == null) {
unsetTable();
} else {
setTable((java.lang.String)value);
}
break;
case TABLET_IDS:
if (value == null) {
unsetTabletIds();
} else {
setTabletIds((java.util.List<java.lang.Long>)value);
}
break;
case OPAQUED_QUERY_PLAN:
if (value == null) {
unsetOpaquedQueryPlan();
} else {
setOpaquedQueryPlan((java.lang.String)value);
}
break;
case BATCH_SIZE:
if (value == null) {
unsetBatchSize();
} else {
setBatchSize((java.lang.Integer)value);
}
break;
case PROPERTIES:
if (value == null) {
unsetProperties();
} else {
setProperties((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
case LIMIT:
if (value == null) {
unsetLimit();
} else {
setLimit((java.lang.Long)value);
}
break;
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 KEEP_ALIVE_MIN:
if (value == null) {
unsetKeepAliveMin();
} else {
setKeepAliveMin((java.lang.Short)value);
}
break;
case EXECUTION_TIMEOUT:
if (value == null) {
unsetExecutionTimeout();
} else {
setExecutionTimeout((java.lang.Integer)value);
}
break;
case MEM_LIMIT:
if (value == null) {
unsetMemLimit();
} else {
setMemLimit((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CLUSTER:
return getCluster();
case DATABASE:
return getDatabase();
case TABLE:
return getTable();
case TABLET_IDS:
return getTabletIds();
case OPAQUED_QUERY_PLAN:
return getOpaquedQueryPlan();
case BATCH_SIZE:
return getBatchSize();
case PROPERTIES:
return getProperties();
case LIMIT:
return getLimit();
case USER:
return getUser();
case PASSWD:
return getPasswd();
case KEEP_ALIVE_MIN:
return getKeepAliveMin();
case EXECUTION_TIMEOUT:
return getExecutionTimeout();
case MEM_LIMIT:
return getMemLimit();
}
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 CLUSTER:
return isSetCluster();
case DATABASE:
return isSetDatabase();
case TABLE:
return isSetTable();
case TABLET_IDS:
return isSetTabletIds();
case OPAQUED_QUERY_PLAN:
return isSetOpaquedQueryPlan();
case BATCH_SIZE:
return isSetBatchSize();
case PROPERTIES:
return isSetProperties();
case LIMIT:
return isSetLimit();
case USER:
return isSetUser();
case PASSWD:
return isSetPasswd();
case KEEP_ALIVE_MIN:
return isSetKeepAliveMin();
case EXECUTION_TIMEOUT:
return isSetExecutionTimeout();
case MEM_LIMIT:
return isSetMemLimit();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TScanOpenParams)
return this.equals((TScanOpenParams)that);
return false;
}
public boolean equals(TScanOpenParams that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_cluster = true && this.isSetCluster();
boolean that_present_cluster = true && that.isSetCluster();
if (this_present_cluster || that_present_cluster) {
if (!(this_present_cluster && that_present_cluster))
return false;
if (!this.cluster.equals(that.cluster))
return false;
}
boolean this_present_database = true && this.isSetDatabase();
boolean that_present_database = true && that.isSetDatabase();
if (this_present_database || that_present_database) {
if (!(this_present_database && that_present_database))
return false;
if (!this.database.equals(that.database))
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_tablet_ids = true && this.isSetTabletIds();
boolean that_present_tablet_ids = true && that.isSetTabletIds();
if (this_present_tablet_ids || that_present_tablet_ids) {
if (!(this_present_tablet_ids && that_present_tablet_ids))
return false;
if (!this.tablet_ids.equals(that.tablet_ids))
return false;
}
boolean this_present_opaqued_query_plan = true && this.isSetOpaquedQueryPlan();
boolean that_present_opaqued_query_plan = true && that.isSetOpaquedQueryPlan();
if (this_present_opaqued_query_plan || that_present_opaqued_query_plan) {
if (!(this_present_opaqued_query_plan && that_present_opaqued_query_plan))
return false;
if (!this.opaqued_query_plan.equals(that.opaqued_query_plan))
return false;
}
boolean this_present_batch_size = true && this.isSetBatchSize();
boolean that_present_batch_size = true && that.isSetBatchSize();
if (this_present_batch_size || that_present_batch_size) {
if (!(this_present_batch_size && that_present_batch_size))
return false;
if (this.batch_size != that.batch_size)
return false;
}
boolean this_present_properties = true && this.isSetProperties();
boolean that_present_properties = true && that.isSetProperties();
if (this_present_properties || that_present_properties) {
if (!(this_present_properties && that_present_properties))
return false;
if (!this.properties.equals(that.properties))
return false;
}
boolean this_present_limit = true && this.isSetLimit();
boolean that_present_limit = true && that.isSetLimit();
if (this_present_limit || that_present_limit) {
if (!(this_present_limit && that_present_limit))
return false;
if (this.limit != that.limit)
return false;
}
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_keep_alive_min = true && this.isSetKeepAliveMin();
boolean that_present_keep_alive_min = true && that.isSetKeepAliveMin();
if (this_present_keep_alive_min || that_present_keep_alive_min) {
if (!(this_present_keep_alive_min && that_present_keep_alive_min))
return false;
if (this.keep_alive_min != that.keep_alive_min)
return false;
}
boolean this_present_execution_timeout = true && this.isSetExecutionTimeout();
boolean that_present_execution_timeout = true && that.isSetExecutionTimeout();
if (this_present_execution_timeout || that_present_execution_timeout) {
if (!(this_present_execution_timeout && that_present_execution_timeout))
return false;
if (this.execution_timeout != that.execution_timeout)
return false;
}
boolean this_present_mem_limit = true && this.isSetMemLimit();
boolean that_present_mem_limit = true && that.isSetMemLimit();
if (this_present_mem_limit || that_present_mem_limit) {
if (!(this_present_mem_limit && that_present_mem_limit))
return false;
if (this.mem_limit != that.mem_limit)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetCluster()) ? 131071 : 524287);
if (isSetCluster())
hashCode = hashCode * 8191 + cluster.hashCode();
hashCode = hashCode * 8191 + ((isSetDatabase()) ? 131071 : 524287);
if (isSetDatabase())
hashCode = hashCode * 8191 + database.hashCode();
hashCode = hashCode * 8191 + ((isSetTable()) ? 131071 : 524287);
if (isSetTable())
hashCode = hashCode * 8191 + table.hashCode();
hashCode = hashCode * 8191 + ((isSetTabletIds()) ? 131071 : 524287);
if (isSetTabletIds())
hashCode = hashCode * 8191 + tablet_ids.hashCode();
hashCode = hashCode * 8191 + ((isSetOpaquedQueryPlan()) ? 131071 : 524287);
if (isSetOpaquedQueryPlan())
hashCode = hashCode * 8191 + opaqued_query_plan.hashCode();
hashCode = hashCode * 8191 + ((isSetBatchSize()) ? 131071 : 524287);
if (isSetBatchSize())
hashCode = hashCode * 8191 + batch_size;
hashCode = hashCode * 8191 + ((isSetProperties()) ? 131071 : 524287);
if (isSetProperties())
hashCode = hashCode * 8191 + properties.hashCode();
hashCode = hashCode * 8191 + ((isSetLimit()) ? 131071 : 524287);
if (isSetLimit())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(limit);
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 + ((isSetKeepAliveMin()) ? 131071 : 524287);
if (isSetKeepAliveMin())
hashCode = hashCode * 8191 + keep_alive_min;
hashCode = hashCode * 8191 + ((isSetExecutionTimeout()) ? 131071 : 524287);
if (isSetExecutionTimeout())
hashCode = hashCode * 8191 + execution_timeout;
hashCode = hashCode * 8191 + ((isSetMemLimit()) ? 131071 : 524287);
if (isSetMemLimit())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mem_limit);
return hashCode;
}
@Override
public int compareTo(TScanOpenParams other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetCluster(), other.isSetCluster());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCluster()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cluster, other.cluster);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDatabase(), other.isSetDatabase());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDatabase()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.database, other.database);
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(isSetTabletIds(), other.isSetTabletIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTabletIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablet_ids, other.tablet_ids);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetOpaquedQueryPlan(), other.isSetOpaquedQueryPlan());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOpaquedQueryPlan()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.opaqued_query_plan, other.opaqued_query_plan);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBatchSize(), other.isSetBatchSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBatchSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batch_size, other.batch_size);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetProperties(), other.isSetProperties());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProperties()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.properties, other.properties);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLimit(), other.isSetLimit());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLimit()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, other.limit);
if (lastComparison != 0) {
return lastComparison;
}
}
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(isSetKeepAliveMin(), other.isSetKeepAliveMin());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetKeepAliveMin()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keep_alive_min, other.keep_alive_min);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetExecutionTimeout(), other.isSetExecutionTimeout());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetExecutionTimeout()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.execution_timeout, other.execution_timeout);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMemLimit(), other.isSetMemLimit());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMemLimit()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mem_limit, other.mem_limit);
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("TScanOpenParams(");
boolean first = true;
sb.append("cluster:");
if (this.cluster == null) {
sb.append("null");
} else {
sb.append(this.cluster);
}
first = false;
if (!first) sb.append(", ");
sb.append("database:");
if (this.database == null) {
sb.append("null");
} else {
sb.append(this.database);
}
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("tablet_ids:");
if (this.tablet_ids == null) {
sb.append("null");
} else {
sb.append(this.tablet_ids);
}
first = false;
if (!first) sb.append(", ");
sb.append("opaqued_query_plan:");
if (this.opaqued_query_plan == null) {
sb.append("null");
} else {
sb.append(this.opaqued_query_plan);
}
first = false;
if (isSetBatchSize()) {
if (!first) sb.append(", ");
sb.append("batch_size:");
sb.append(this.batch_size);
first = false;
}
if (isSetProperties()) {
if (!first) sb.append(", ");
sb.append("properties:");
if (this.properties == null) {
sb.append("null");
} else {
sb.append(this.properties);
}
first = false;
}
if (isSetLimit()) {
if (!first) sb.append(", ");
sb.append("limit:");
sb.append(this.limit);
first = false;
}
if (isSetUser()) {
if (!first) sb.append(", ");
sb.append("user:");
if (this.user == null) {
sb.append("null");
} else {
sb.append(this.user);
}
first = false;
}
if (isSetPasswd()) {
if (!first) sb.append(", ");
sb.append("passwd:");
if (this.passwd == null) {
sb.append("null");
} else {
sb.append(this.passwd);
}
first = false;
}
if (isSetKeepAliveMin()) {
if (!first) sb.append(", ");
sb.append("keep_alive_min:");
sb.append(this.keep_alive_min);
first = false;
}
if (isSetExecutionTimeout()) {
if (!first) sb.append(", ");
sb.append("execution_timeout:");
sb.append(this.execution_timeout);
first = false;
}
if (isSetMemLimit()) {
if (!first) sb.append(", ");
sb.append("mem_limit:");
sb.append(this.mem_limit);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (cluster == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'cluster' was not present! Struct: " + toString());
}
if (database == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'database' was not present! Struct: " + toString());
}
if (table == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'table' was not present! Struct: " + toString());
}
if (tablet_ids == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'tablet_ids' was not present! Struct: " + toString());
}
if (opaqued_query_plan == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'opaqued_query_plan' 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 TScanOpenParamsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TScanOpenParamsStandardScheme getScheme() {
return new TScanOpenParamsStandardScheme();
}
}
private static class TScanOpenParamsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TScanOpenParams> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TScanOpenParams 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: // CLUSTER
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.cluster = iprot.readString();
struct.setClusterIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DATABASE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.database = iprot.readString();
struct.setDatabaseIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // 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 4: // TABLET_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.tablet_ids = new java.util.ArrayList<java.lang.Long>(_list0.size);
long _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readI64();
struct.tablet_ids.add(_elem1);
}
iprot.readListEnd();
}
struct.setTabletIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // OPAQUED_QUERY_PLAN
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.opaqued_query_plan = iprot.readString();
struct.setOpaquedQueryPlanIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // BATCH_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.batch_size = iprot.readI32();
struct.setBatchSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // PROPERTIES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map3 = iprot.readMapBegin();
struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map3.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key4;
@org.apache.thrift.annotation.Nullable java.lang.String _val5;
for (int _i6 = 0; _i6 < _map3.size; ++_i6)
{
_key4 = iprot.readString();
_val5 = iprot.readString();
struct.properties.put(_key4, _val5);
}
iprot.readMapEnd();
}
struct.setPropertiesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // LIMIT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.limit = iprot.readI64();
struct.setLimitIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // 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 10: // 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 11: // KEEP_ALIVE_MIN
if (schemeField.type == org.apache.thrift.protocol.TType.I16) {
struct.keep_alive_min = iprot.readI16();
struct.setKeepAliveMinIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // EXECUTION_TIMEOUT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.execution_timeout = iprot.readI32();
struct.setExecutionTimeoutIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // MEM_LIMIT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.mem_limit = iprot.readI64();
struct.setMemLimitIsSet(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, TScanOpenParams struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.cluster != null) {
oprot.writeFieldBegin(CLUSTER_FIELD_DESC);
oprot.writeString(struct.cluster);
oprot.writeFieldEnd();
}
if (struct.database != null) {
oprot.writeFieldBegin(DATABASE_FIELD_DESC);
oprot.writeString(struct.database);
oprot.writeFieldEnd();
}
if (struct.table != null) {
oprot.writeFieldBegin(TABLE_FIELD_DESC);
oprot.writeString(struct.table);
oprot.writeFieldEnd();
}
if (struct.tablet_ids != null) {
oprot.writeFieldBegin(TABLET_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.tablet_ids.size()));
for (long _iter7 : struct.tablet_ids)
{
oprot.writeI64(_iter7);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.opaqued_query_plan != null) {
oprot.writeFieldBegin(OPAQUED_QUERY_PLAN_FIELD_DESC);
oprot.writeString(struct.opaqued_query_plan);
oprot.writeFieldEnd();
}
if (struct.isSetBatchSize()) {
oprot.writeFieldBegin(BATCH_SIZE_FIELD_DESC);
oprot.writeI32(struct.batch_size);
oprot.writeFieldEnd();
}
if (struct.properties != null) {
if (struct.isSetProperties()) {
oprot.writeFieldBegin(PROPERTIES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size()));
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter8 : struct.properties.entrySet())
{
oprot.writeString(_iter8.getKey());
oprot.writeString(_iter8.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetLimit()) {
oprot.writeFieldBegin(LIMIT_FIELD_DESC);
oprot.writeI64(struct.limit);
oprot.writeFieldEnd();
}
if (struct.user != null) {
if (struct.isSetUser()) {
oprot.writeFieldBegin(USER_FIELD_DESC);
oprot.writeString(struct.user);
oprot.writeFieldEnd();
}
}
if (struct.passwd != null) {
if (struct.isSetPasswd()) {
oprot.writeFieldBegin(PASSWD_FIELD_DESC);
oprot.writeString(struct.passwd);
oprot.writeFieldEnd();
}
}
if (struct.isSetKeepAliveMin()) {
oprot.writeFieldBegin(KEEP_ALIVE_MIN_FIELD_DESC);
oprot.writeI16(struct.keep_alive_min);
oprot.writeFieldEnd();
}
if (struct.isSetExecutionTimeout()) {
oprot.writeFieldBegin(EXECUTION_TIMEOUT_FIELD_DESC);
oprot.writeI32(struct.execution_timeout);
oprot.writeFieldEnd();
}
if (struct.isSetMemLimit()) {
oprot.writeFieldBegin(MEM_LIMIT_FIELD_DESC);
oprot.writeI64(struct.mem_limit);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TScanOpenParamsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TScanOpenParamsTupleScheme getScheme() {
return new TScanOpenParamsTupleScheme();
}
}
private static class TScanOpenParamsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TScanOpenParams> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TScanOpenParams struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.cluster);
oprot.writeString(struct.database);
oprot.writeString(struct.table);
{
oprot.writeI32(struct.tablet_ids.size());
for (long _iter9 : struct.tablet_ids)
{
oprot.writeI64(_iter9);
}
}
oprot.writeString(struct.opaqued_query_plan);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetBatchSize()) {
optionals.set(0);
}
if (struct.isSetProperties()) {
optionals.set(1);
}
if (struct.isSetLimit()) {
optionals.set(2);
}
if (struct.isSetUser()) {
optionals.set(3);
}
if (struct.isSetPasswd()) {
optionals.set(4);
}
if (struct.isSetKeepAliveMin()) {
optionals.set(5);
}
if (struct.isSetExecutionTimeout()) {
optionals.set(6);
}
if (struct.isSetMemLimit()) {
optionals.set(7);
}
oprot.writeBitSet(optionals, 8);
if (struct.isSetBatchSize()) {
oprot.writeI32(struct.batch_size);
}
if (struct.isSetProperties()) {
{
oprot.writeI32(struct.properties.size());
for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter10 : struct.properties.entrySet())
{
oprot.writeString(_iter10.getKey());
oprot.writeString(_iter10.getValue());
}
}
}
if (struct.isSetLimit()) {
oprot.writeI64(struct.limit);
}
if (struct.isSetUser()) {
oprot.writeString(struct.user);
}
if (struct.isSetPasswd()) {
oprot.writeString(struct.passwd);
}
if (struct.isSetKeepAliveMin()) {
oprot.writeI16(struct.keep_alive_min);
}
if (struct.isSetExecutionTimeout()) {
oprot.writeI32(struct.execution_timeout);
}
if (struct.isSetMemLimit()) {
oprot.writeI64(struct.mem_limit);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TScanOpenParams struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.cluster = iprot.readString();
struct.setClusterIsSet(true);
struct.database = iprot.readString();
struct.setDatabaseIsSet(true);
struct.table = iprot.readString();
struct.setTableIsSet(true);
{
org.apache.thrift.protocol.TList _list11 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.tablet_ids = new java.util.ArrayList<java.lang.Long>(_list11.size);
long _elem12;
for (int _i13 = 0; _i13 < _list11.size; ++_i13)
{
_elem12 = iprot.readI64();
struct.tablet_ids.add(_elem12);
}
}
struct.setTabletIdsIsSet(true);
struct.opaqued_query_plan = iprot.readString();
struct.setOpaquedQueryPlanIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.batch_size = iprot.readI32();
struct.setBatchSizeIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map14 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.properties = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map14.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key15;
@org.apache.thrift.annotation.Nullable java.lang.String _val16;
for (int _i17 = 0; _i17 < _map14.size; ++_i17)
{
_key15 = iprot.readString();
_val16 = iprot.readString();
struct.properties.put(_key15, _val16);
}
}
struct.setPropertiesIsSet(true);
}
if (incoming.get(2)) {
struct.limit = iprot.readI64();
struct.setLimitIsSet(true);
}
if (incoming.get(3)) {
struct.user = iprot.readString();
struct.setUserIsSet(true);
}
if (incoming.get(4)) {
struct.passwd = iprot.readString();
struct.setPasswdIsSet(true);
}
if (incoming.get(5)) {
struct.keep_alive_min = iprot.readI16();
struct.setKeepAliveMinIsSet(true);
}
if (incoming.get(6)) {
struct.execution_timeout = iprot.readI32();
struct.setExecutionTimeoutIsSet(true);
}
if (incoming.get(7)) {
struct.mem_limit = iprot.readI64();
struct.setMemLimitIsSet(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();
}
}