TTableStatus.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 TTableStatus implements org.apache.thrift.TBase<TTableStatus, TTableStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TTableStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableStatus");
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COMMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("comment", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField ENGINE_FIELD_DESC = new org.apache.thrift.protocol.TField("engine", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField LAST_CHECK_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("last_check_time", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField CREATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("create_time", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField DDL_SQL_FIELD_DESC = new org.apache.thrift.protocol.TField("ddl_sql", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField UPDATE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("update_time", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.protocol.TField CHECK_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("check_time", org.apache.thrift.protocol.TType.I64, (short)9);
private static final org.apache.thrift.protocol.TField COLLATION_FIELD_DESC = new org.apache.thrift.protocol.TField("collation", org.apache.thrift.protocol.TType.STRING, (short)10);
private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.I64, (short)11);
private static final org.apache.thrift.protocol.TField AVG_ROW_LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("avg_row_length", org.apache.thrift.protocol.TType.I64, (short)12);
private static final org.apache.thrift.protocol.TField DATA_LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("data_length", org.apache.thrift.protocol.TType.I64, (short)13);
private static final org.apache.thrift.protocol.TField INDEX_LENGTH_FIELD_DESC = new org.apache.thrift.protocol.TField("index_length", org.apache.thrift.protocol.TType.I64, (short)14);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TTableStatusStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TTableStatusTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
public @org.apache.thrift.annotation.Nullable java.lang.String type; // required
public @org.apache.thrift.annotation.Nullable java.lang.String comment; // required
public @org.apache.thrift.annotation.Nullable java.lang.String engine; // optional
public long last_check_time; // optional
public long create_time; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String ddl_sql; // optional
public long update_time; // optional
public long check_time; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String collation; // optional
public long rows; // optional
public long avg_row_length; // optional
public long data_length; // optional
public long index_length; // 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 {
NAME((short)1, "name"),
TYPE((short)2, "type"),
COMMENT((short)3, "comment"),
ENGINE((short)4, "engine"),
LAST_CHECK_TIME((short)5, "last_check_time"),
CREATE_TIME((short)6, "create_time"),
DDL_SQL((short)7, "ddl_sql"),
UPDATE_TIME((short)8, "update_time"),
CHECK_TIME((short)9, "check_time"),
COLLATION((short)10, "collation"),
ROWS((short)11, "rows"),
AVG_ROW_LENGTH((short)12, "avg_row_length"),
DATA_LENGTH((short)13, "data_length"),
INDEX_LENGTH((short)14, "index_length");
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: // NAME
return NAME;
case 2: // TYPE
return TYPE;
case 3: // COMMENT
return COMMENT;
case 4: // ENGINE
return ENGINE;
case 5: // LAST_CHECK_TIME
return LAST_CHECK_TIME;
case 6: // CREATE_TIME
return CREATE_TIME;
case 7: // DDL_SQL
return DDL_SQL;
case 8: // UPDATE_TIME
return UPDATE_TIME;
case 9: // CHECK_TIME
return CHECK_TIME;
case 10: // COLLATION
return COLLATION;
case 11: // ROWS
return ROWS;
case 12: // AVG_ROW_LENGTH
return AVG_ROW_LENGTH;
case 13: // DATA_LENGTH
return DATA_LENGTH;
case 14: // INDEX_LENGTH
return INDEX_LENGTH;
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 __LAST_CHECK_TIME_ISSET_ID = 0;
private static final int __CREATE_TIME_ISSET_ID = 1;
private static final int __UPDATE_TIME_ISSET_ID = 2;
private static final int __CHECK_TIME_ISSET_ID = 3;
private static final int __ROWS_ISSET_ID = 4;
private static final int __AVG_ROW_LENGTH_ISSET_ID = 5;
private static final int __DATA_LENGTH_ISSET_ID = 6;
private static final int __INDEX_LENGTH_ISSET_ID = 7;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ENGINE,_Fields.LAST_CHECK_TIME,_Fields.CREATE_TIME,_Fields.DDL_SQL,_Fields.UPDATE_TIME,_Fields.CHECK_TIME,_Fields.COLLATION,_Fields.ROWS,_Fields.AVG_ROW_LENGTH,_Fields.DATA_LENGTH,_Fields.INDEX_LENGTH};
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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COMMENT, new org.apache.thrift.meta_data.FieldMetaData("comment", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ENGINE, new org.apache.thrift.meta_data.FieldMetaData("engine", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LAST_CHECK_TIME, new org.apache.thrift.meta_data.FieldMetaData("last_check_time", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("create_time", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.DDL_SQL, new org.apache.thrift.meta_data.FieldMetaData("ddl_sql", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.UPDATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("update_time", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.CHECK_TIME, new org.apache.thrift.meta_data.FieldMetaData("check_time", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COLLATION, new org.apache.thrift.meta_data.FieldMetaData("collation", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.AVG_ROW_LENGTH, new org.apache.thrift.meta_data.FieldMetaData("avg_row_length", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.DATA_LENGTH, new org.apache.thrift.meta_data.FieldMetaData("data_length", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.INDEX_LENGTH, new org.apache.thrift.meta_data.FieldMetaData("index_length", 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(TTableStatus.class, metaDataMap);
}
public TTableStatus() {
}
public TTableStatus(
java.lang.String name,
java.lang.String type,
java.lang.String comment)
{
this();
this.name = name;
this.type = type;
this.comment = comment;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TTableStatus(TTableStatus other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetName()) {
this.name = other.name;
}
if (other.isSetType()) {
this.type = other.type;
}
if (other.isSetComment()) {
this.comment = other.comment;
}
if (other.isSetEngine()) {
this.engine = other.engine;
}
this.last_check_time = other.last_check_time;
this.create_time = other.create_time;
if (other.isSetDdlSql()) {
this.ddl_sql = other.ddl_sql;
}
this.update_time = other.update_time;
this.check_time = other.check_time;
if (other.isSetCollation()) {
this.collation = other.collation;
}
this.rows = other.rows;
this.avg_row_length = other.avg_row_length;
this.data_length = other.data_length;
this.index_length = other.index_length;
}
public TTableStatus deepCopy() {
return new TTableStatus(this);
}
@Override
public void clear() {
this.name = null;
this.type = null;
this.comment = null;
this.engine = null;
setLastCheckTimeIsSet(false);
this.last_check_time = 0;
setCreateTimeIsSet(false);
this.create_time = 0;
this.ddl_sql = null;
setUpdateTimeIsSet(false);
this.update_time = 0;
setCheckTimeIsSet(false);
this.check_time = 0;
this.collation = null;
setRowsIsSet(false);
this.rows = 0;
setAvgRowLengthIsSet(false);
this.avg_row_length = 0;
setDataLengthIsSet(false);
this.data_length = 0;
setIndexLengthIsSet(false);
this.index_length = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getName() {
return this.name;
}
public TTableStatus setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getType() {
return this.type;
}
public TTableStatus setType(@org.apache.thrift.annotation.Nullable java.lang.String type) {
this.type = type;
return this;
}
public void unsetType() {
this.type = null;
}
/** Returns true if field type is set (has been assigned a value) and false otherwise */
public boolean isSetType() {
return this.type != null;
}
public void setTypeIsSet(boolean value) {
if (!value) {
this.type = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getComment() {
return this.comment;
}
public TTableStatus setComment(@org.apache.thrift.annotation.Nullable java.lang.String comment) {
this.comment = comment;
return this;
}
public void unsetComment() {
this.comment = null;
}
/** Returns true if field comment is set (has been assigned a value) and false otherwise */
public boolean isSetComment() {
return this.comment != null;
}
public void setCommentIsSet(boolean value) {
if (!value) {
this.comment = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getEngine() {
return this.engine;
}
public TTableStatus setEngine(@org.apache.thrift.annotation.Nullable java.lang.String engine) {
this.engine = engine;
return this;
}
public void unsetEngine() {
this.engine = null;
}
/** Returns true if field engine is set (has been assigned a value) and false otherwise */
public boolean isSetEngine() {
return this.engine != null;
}
public void setEngineIsSet(boolean value) {
if (!value) {
this.engine = null;
}
}
public long getLastCheckTime() {
return this.last_check_time;
}
public TTableStatus setLastCheckTime(long last_check_time) {
this.last_check_time = last_check_time;
setLastCheckTimeIsSet(true);
return this;
}
public void unsetLastCheckTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LAST_CHECK_TIME_ISSET_ID);
}
/** Returns true if field last_check_time is set (has been assigned a value) and false otherwise */
public boolean isSetLastCheckTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LAST_CHECK_TIME_ISSET_ID);
}
public void setLastCheckTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LAST_CHECK_TIME_ISSET_ID, value);
}
public long getCreateTime() {
return this.create_time;
}
public TTableStatus setCreateTime(long create_time) {
this.create_time = create_time;
setCreateTimeIsSet(true);
return this;
}
public void unsetCreateTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CREATE_TIME_ISSET_ID);
}
/** Returns true if field create_time is set (has been assigned a value) and false otherwise */
public boolean isSetCreateTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATE_TIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATE_TIME_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDdlSql() {
return this.ddl_sql;
}
public TTableStatus setDdlSql(@org.apache.thrift.annotation.Nullable java.lang.String ddl_sql) {
this.ddl_sql = ddl_sql;
return this;
}
public void unsetDdlSql() {
this.ddl_sql = null;
}
/** Returns true if field ddl_sql is set (has been assigned a value) and false otherwise */
public boolean isSetDdlSql() {
return this.ddl_sql != null;
}
public void setDdlSqlIsSet(boolean value) {
if (!value) {
this.ddl_sql = null;
}
}
public long getUpdateTime() {
return this.update_time;
}
public TTableStatus setUpdateTime(long update_time) {
this.update_time = update_time;
setUpdateTimeIsSet(true);
return this;
}
public void unsetUpdateTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPDATE_TIME_ISSET_ID);
}
/** Returns true if field update_time is set (has been assigned a value) and false otherwise */
public boolean isSetUpdateTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATE_TIME_ISSET_ID);
}
public void setUpdateTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATE_TIME_ISSET_ID, value);
}
public long getCheckTime() {
return this.check_time;
}
public TTableStatus setCheckTime(long check_time) {
this.check_time = check_time;
setCheckTimeIsSet(true);
return this;
}
public void unsetCheckTime() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CHECK_TIME_ISSET_ID);
}
/** Returns true if field check_time is set (has been assigned a value) and false otherwise */
public boolean isSetCheckTime() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CHECK_TIME_ISSET_ID);
}
public void setCheckTimeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CHECK_TIME_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCollation() {
return this.collation;
}
public TTableStatus setCollation(@org.apache.thrift.annotation.Nullable java.lang.String collation) {
this.collation = collation;
return this;
}
public void unsetCollation() {
this.collation = null;
}
/** Returns true if field collation is set (has been assigned a value) and false otherwise */
public boolean isSetCollation() {
return this.collation != null;
}
public void setCollationIsSet(boolean value) {
if (!value) {
this.collation = null;
}
}
public long getRows() {
return this.rows;
}
public TTableStatus setRows(long rows) {
this.rows = rows;
setRowsIsSet(true);
return this;
}
public void unsetRows() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ROWS_ISSET_ID);
}
/** Returns true if field rows is set (has been assigned a value) and false otherwise */
public boolean isSetRows() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ROWS_ISSET_ID);
}
public void setRowsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ROWS_ISSET_ID, value);
}
public long getAvgRowLength() {
return this.avg_row_length;
}
public TTableStatus setAvgRowLength(long avg_row_length) {
this.avg_row_length = avg_row_length;
setAvgRowLengthIsSet(true);
return this;
}
public void unsetAvgRowLength() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AVG_ROW_LENGTH_ISSET_ID);
}
/** Returns true if field avg_row_length is set (has been assigned a value) and false otherwise */
public boolean isSetAvgRowLength() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AVG_ROW_LENGTH_ISSET_ID);
}
public void setAvgRowLengthIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AVG_ROW_LENGTH_ISSET_ID, value);
}
public long getDataLength() {
return this.data_length;
}
public TTableStatus setDataLength(long data_length) {
this.data_length = data_length;
setDataLengthIsSet(true);
return this;
}
public void unsetDataLength() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DATA_LENGTH_ISSET_ID);
}
/** Returns true if field data_length is set (has been assigned a value) and false otherwise */
public boolean isSetDataLength() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DATA_LENGTH_ISSET_ID);
}
public void setDataLengthIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DATA_LENGTH_ISSET_ID, value);
}
public long getIndexLength() {
return this.index_length;
}
public TTableStatus setIndexLength(long index_length) {
this.index_length = index_length;
setIndexLengthIsSet(true);
return this;
}
public void unsetIndexLength() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INDEX_LENGTH_ISSET_ID);
}
/** Returns true if field index_length is set (has been assigned a value) and false otherwise */
public boolean isSetIndexLength() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INDEX_LENGTH_ISSET_ID);
}
public void setIndexLengthIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INDEX_LENGTH_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
} else {
setName((java.lang.String)value);
}
break;
case TYPE:
if (value == null) {
unsetType();
} else {
setType((java.lang.String)value);
}
break;
case COMMENT:
if (value == null) {
unsetComment();
} else {
setComment((java.lang.String)value);
}
break;
case ENGINE:
if (value == null) {
unsetEngine();
} else {
setEngine((java.lang.String)value);
}
break;
case LAST_CHECK_TIME:
if (value == null) {
unsetLastCheckTime();
} else {
setLastCheckTime((java.lang.Long)value);
}
break;
case CREATE_TIME:
if (value == null) {
unsetCreateTime();
} else {
setCreateTime((java.lang.Long)value);
}
break;
case DDL_SQL:
if (value == null) {
unsetDdlSql();
} else {
setDdlSql((java.lang.String)value);
}
break;
case UPDATE_TIME:
if (value == null) {
unsetUpdateTime();
} else {
setUpdateTime((java.lang.Long)value);
}
break;
case CHECK_TIME:
if (value == null) {
unsetCheckTime();
} else {
setCheckTime((java.lang.Long)value);
}
break;
case COLLATION:
if (value == null) {
unsetCollation();
} else {
setCollation((java.lang.String)value);
}
break;
case ROWS:
if (value == null) {
unsetRows();
} else {
setRows((java.lang.Long)value);
}
break;
case AVG_ROW_LENGTH:
if (value == null) {
unsetAvgRowLength();
} else {
setAvgRowLength((java.lang.Long)value);
}
break;
case DATA_LENGTH:
if (value == null) {
unsetDataLength();
} else {
setDataLength((java.lang.Long)value);
}
break;
case INDEX_LENGTH:
if (value == null) {
unsetIndexLength();
} else {
setIndexLength((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
case TYPE:
return getType();
case COMMENT:
return getComment();
case ENGINE:
return getEngine();
case LAST_CHECK_TIME:
return getLastCheckTime();
case CREATE_TIME:
return getCreateTime();
case DDL_SQL:
return getDdlSql();
case UPDATE_TIME:
return getUpdateTime();
case CHECK_TIME:
return getCheckTime();
case COLLATION:
return getCollation();
case ROWS:
return getRows();
case AVG_ROW_LENGTH:
return getAvgRowLength();
case DATA_LENGTH:
return getDataLength();
case INDEX_LENGTH:
return getIndexLength();
}
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 NAME:
return isSetName();
case TYPE:
return isSetType();
case COMMENT:
return isSetComment();
case ENGINE:
return isSetEngine();
case LAST_CHECK_TIME:
return isSetLastCheckTime();
case CREATE_TIME:
return isSetCreateTime();
case DDL_SQL:
return isSetDdlSql();
case UPDATE_TIME:
return isSetUpdateTime();
case CHECK_TIME:
return isSetCheckTime();
case COLLATION:
return isSetCollation();
case ROWS:
return isSetRows();
case AVG_ROW_LENGTH:
return isSetAvgRowLength();
case DATA_LENGTH:
return isSetDataLength();
case INDEX_LENGTH:
return isSetIndexLength();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TTableStatus)
return this.equals((TTableStatus)that);
return false;
}
public boolean equals(TTableStatus that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
boolean this_present_type = true && this.isSetType();
boolean that_present_type = true && that.isSetType();
if (this_present_type || that_present_type) {
if (!(this_present_type && that_present_type))
return false;
if (!this.type.equals(that.type))
return false;
}
boolean this_present_comment = true && this.isSetComment();
boolean that_present_comment = true && that.isSetComment();
if (this_present_comment || that_present_comment) {
if (!(this_present_comment && that_present_comment))
return false;
if (!this.comment.equals(that.comment))
return false;
}
boolean this_present_engine = true && this.isSetEngine();
boolean that_present_engine = true && that.isSetEngine();
if (this_present_engine || that_present_engine) {
if (!(this_present_engine && that_present_engine))
return false;
if (!this.engine.equals(that.engine))
return false;
}
boolean this_present_last_check_time = true && this.isSetLastCheckTime();
boolean that_present_last_check_time = true && that.isSetLastCheckTime();
if (this_present_last_check_time || that_present_last_check_time) {
if (!(this_present_last_check_time && that_present_last_check_time))
return false;
if (this.last_check_time != that.last_check_time)
return false;
}
boolean this_present_create_time = true && this.isSetCreateTime();
boolean that_present_create_time = true && that.isSetCreateTime();
if (this_present_create_time || that_present_create_time) {
if (!(this_present_create_time && that_present_create_time))
return false;
if (this.create_time != that.create_time)
return false;
}
boolean this_present_ddl_sql = true && this.isSetDdlSql();
boolean that_present_ddl_sql = true && that.isSetDdlSql();
if (this_present_ddl_sql || that_present_ddl_sql) {
if (!(this_present_ddl_sql && that_present_ddl_sql))
return false;
if (!this.ddl_sql.equals(that.ddl_sql))
return false;
}
boolean this_present_update_time = true && this.isSetUpdateTime();
boolean that_present_update_time = true && that.isSetUpdateTime();
if (this_present_update_time || that_present_update_time) {
if (!(this_present_update_time && that_present_update_time))
return false;
if (this.update_time != that.update_time)
return false;
}
boolean this_present_check_time = true && this.isSetCheckTime();
boolean that_present_check_time = true && that.isSetCheckTime();
if (this_present_check_time || that_present_check_time) {
if (!(this_present_check_time && that_present_check_time))
return false;
if (this.check_time != that.check_time)
return false;
}
boolean this_present_collation = true && this.isSetCollation();
boolean that_present_collation = true && that.isSetCollation();
if (this_present_collation || that_present_collation) {
if (!(this_present_collation && that_present_collation))
return false;
if (!this.collation.equals(that.collation))
return false;
}
boolean this_present_rows = true && this.isSetRows();
boolean that_present_rows = true && that.isSetRows();
if (this_present_rows || that_present_rows) {
if (!(this_present_rows && that_present_rows))
return false;
if (this.rows != that.rows)
return false;
}
boolean this_present_avg_row_length = true && this.isSetAvgRowLength();
boolean that_present_avg_row_length = true && that.isSetAvgRowLength();
if (this_present_avg_row_length || that_present_avg_row_length) {
if (!(this_present_avg_row_length && that_present_avg_row_length))
return false;
if (this.avg_row_length != that.avg_row_length)
return false;
}
boolean this_present_data_length = true && this.isSetDataLength();
boolean that_present_data_length = true && that.isSetDataLength();
if (this_present_data_length || that_present_data_length) {
if (!(this_present_data_length && that_present_data_length))
return false;
if (this.data_length != that.data_length)
return false;
}
boolean this_present_index_length = true && this.isSetIndexLength();
boolean that_present_index_length = true && that.isSetIndexLength();
if (this_present_index_length || that_present_index_length) {
if (!(this_present_index_length && that_present_index_length))
return false;
if (this.index_length != that.index_length)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
if (isSetType())
hashCode = hashCode * 8191 + type.hashCode();
hashCode = hashCode * 8191 + ((isSetComment()) ? 131071 : 524287);
if (isSetComment())
hashCode = hashCode * 8191 + comment.hashCode();
hashCode = hashCode * 8191 + ((isSetEngine()) ? 131071 : 524287);
if (isSetEngine())
hashCode = hashCode * 8191 + engine.hashCode();
hashCode = hashCode * 8191 + ((isSetLastCheckTime()) ? 131071 : 524287);
if (isSetLastCheckTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(last_check_time);
hashCode = hashCode * 8191 + ((isSetCreateTime()) ? 131071 : 524287);
if (isSetCreateTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(create_time);
hashCode = hashCode * 8191 + ((isSetDdlSql()) ? 131071 : 524287);
if (isSetDdlSql())
hashCode = hashCode * 8191 + ddl_sql.hashCode();
hashCode = hashCode * 8191 + ((isSetUpdateTime()) ? 131071 : 524287);
if (isSetUpdateTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(update_time);
hashCode = hashCode * 8191 + ((isSetCheckTime()) ? 131071 : 524287);
if (isSetCheckTime())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(check_time);
hashCode = hashCode * 8191 + ((isSetCollation()) ? 131071 : 524287);
if (isSetCollation())
hashCode = hashCode * 8191 + collation.hashCode();
hashCode = hashCode * 8191 + ((isSetRows()) ? 131071 : 524287);
if (isSetRows())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(rows);
hashCode = hashCode * 8191 + ((isSetAvgRowLength()) ? 131071 : 524287);
if (isSetAvgRowLength())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(avg_row_length);
hashCode = hashCode * 8191 + ((isSetDataLength()) ? 131071 : 524287);
if (isSetDataLength())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(data_length);
hashCode = hashCode * 8191 + ((isSetIndexLength()) ? 131071 : 524287);
if (isSetIndexLength())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(index_length);
return hashCode;
}
@Override
public int compareTo(TTableStatus other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetType(), other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetComment(), other.isSetComment());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetComment()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEngine(), other.isSetEngine());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEngine()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.engine, other.engine);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLastCheckTime(), other.isSetLastCheckTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLastCheckTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.last_check_time, other.last_check_time);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCreateTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.create_time, other.create_time);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDdlSql(), other.isSetDdlSql());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDdlSql()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ddl_sql, other.ddl_sql);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetUpdateTime(), other.isSetUpdateTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpdateTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.update_time, other.update_time);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCheckTime(), other.isSetCheckTime());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCheckTime()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.check_time, other.check_time);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCollation(), other.isSetCollation());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCollation()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collation, other.collation);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRows(), other.isSetRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, other.rows);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAvgRowLength(), other.isSetAvgRowLength());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAvgRowLength()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.avg_row_length, other.avg_row_length);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetDataLength(), other.isSetDataLength());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDataLength()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data_length, other.data_length);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIndexLength(), other.isSetIndexLength());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexLength()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_length, other.index_length);
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("TTableStatus(");
boolean first = true;
sb.append("name:");
if (this.name == null) {
sb.append("null");
} else {
sb.append(this.name);
}
first = false;
if (!first) sb.append(", ");
sb.append("type:");
if (this.type == null) {
sb.append("null");
} else {
sb.append(this.type);
}
first = false;
if (!first) sb.append(", ");
sb.append("comment:");
if (this.comment == null) {
sb.append("null");
} else {
sb.append(this.comment);
}
first = false;
if (isSetEngine()) {
if (!first) sb.append(", ");
sb.append("engine:");
if (this.engine == null) {
sb.append("null");
} else {
sb.append(this.engine);
}
first = false;
}
if (isSetLastCheckTime()) {
if (!first) sb.append(", ");
sb.append("last_check_time:");
sb.append(this.last_check_time);
first = false;
}
if (isSetCreateTime()) {
if (!first) sb.append(", ");
sb.append("create_time:");
sb.append(this.create_time);
first = false;
}
if (isSetDdlSql()) {
if (!first) sb.append(", ");
sb.append("ddl_sql:");
if (this.ddl_sql == null) {
sb.append("null");
} else {
sb.append(this.ddl_sql);
}
first = false;
}
if (isSetUpdateTime()) {
if (!first) sb.append(", ");
sb.append("update_time:");
sb.append(this.update_time);
first = false;
}
if (isSetCheckTime()) {
if (!first) sb.append(", ");
sb.append("check_time:");
sb.append(this.check_time);
first = false;
}
if (isSetCollation()) {
if (!first) sb.append(", ");
sb.append("collation:");
if (this.collation == null) {
sb.append("null");
} else {
sb.append(this.collation);
}
first = false;
}
if (isSetRows()) {
if (!first) sb.append(", ");
sb.append("rows:");
sb.append(this.rows);
first = false;
}
if (isSetAvgRowLength()) {
if (!first) sb.append(", ");
sb.append("avg_row_length:");
sb.append(this.avg_row_length);
first = false;
}
if (isSetDataLength()) {
if (!first) sb.append(", ");
sb.append("data_length:");
sb.append(this.data_length);
first = false;
}
if (isSetIndexLength()) {
if (!first) sb.append(", ");
sb.append("index_length:");
sb.append(this.index_length);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (name == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
}
if (type == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString());
}
if (comment == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'comment' 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 TTableStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTableStatusStandardScheme getScheme() {
return new TTableStatusStandardScheme();
}
}
private static class TTableStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<TTableStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TTableStatus 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: // NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.type = iprot.readString();
struct.setTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COMMENT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.comment = iprot.readString();
struct.setCommentIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // ENGINE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.engine = iprot.readString();
struct.setEngineIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // LAST_CHECK_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.last_check_time = iprot.readI64();
struct.setLastCheckTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // CREATE_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.create_time = iprot.readI64();
struct.setCreateTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // DDL_SQL
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.ddl_sql = iprot.readString();
struct.setDdlSqlIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // UPDATE_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.update_time = iprot.readI64();
struct.setUpdateTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // CHECK_TIME
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.check_time = iprot.readI64();
struct.setCheckTimeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // COLLATION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.collation = iprot.readString();
struct.setCollationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.rows = iprot.readI64();
struct.setRowsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // AVG_ROW_LENGTH
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.avg_row_length = iprot.readI64();
struct.setAvgRowLengthIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // DATA_LENGTH
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.data_length = iprot.readI64();
struct.setDataLengthIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 14: // INDEX_LENGTH
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.index_length = iprot.readI64();
struct.setIndexLengthIsSet(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, TTableStatus struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.name != null) {
oprot.writeFieldBegin(NAME_FIELD_DESC);
oprot.writeString(struct.name);
oprot.writeFieldEnd();
}
if (struct.type != null) {
oprot.writeFieldBegin(TYPE_FIELD_DESC);
oprot.writeString(struct.type);
oprot.writeFieldEnd();
}
if (struct.comment != null) {
oprot.writeFieldBegin(COMMENT_FIELD_DESC);
oprot.writeString(struct.comment);
oprot.writeFieldEnd();
}
if (struct.engine != null) {
if (struct.isSetEngine()) {
oprot.writeFieldBegin(ENGINE_FIELD_DESC);
oprot.writeString(struct.engine);
oprot.writeFieldEnd();
}
}
if (struct.isSetLastCheckTime()) {
oprot.writeFieldBegin(LAST_CHECK_TIME_FIELD_DESC);
oprot.writeI64(struct.last_check_time);
oprot.writeFieldEnd();
}
if (struct.isSetCreateTime()) {
oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
oprot.writeI64(struct.create_time);
oprot.writeFieldEnd();
}
if (struct.ddl_sql != null) {
if (struct.isSetDdlSql()) {
oprot.writeFieldBegin(DDL_SQL_FIELD_DESC);
oprot.writeString(struct.ddl_sql);
oprot.writeFieldEnd();
}
}
if (struct.isSetUpdateTime()) {
oprot.writeFieldBegin(UPDATE_TIME_FIELD_DESC);
oprot.writeI64(struct.update_time);
oprot.writeFieldEnd();
}
if (struct.isSetCheckTime()) {
oprot.writeFieldBegin(CHECK_TIME_FIELD_DESC);
oprot.writeI64(struct.check_time);
oprot.writeFieldEnd();
}
if (struct.collation != null) {
if (struct.isSetCollation()) {
oprot.writeFieldBegin(COLLATION_FIELD_DESC);
oprot.writeString(struct.collation);
oprot.writeFieldEnd();
}
}
if (struct.isSetRows()) {
oprot.writeFieldBegin(ROWS_FIELD_DESC);
oprot.writeI64(struct.rows);
oprot.writeFieldEnd();
}
if (struct.isSetAvgRowLength()) {
oprot.writeFieldBegin(AVG_ROW_LENGTH_FIELD_DESC);
oprot.writeI64(struct.avg_row_length);
oprot.writeFieldEnd();
}
if (struct.isSetDataLength()) {
oprot.writeFieldBegin(DATA_LENGTH_FIELD_DESC);
oprot.writeI64(struct.data_length);
oprot.writeFieldEnd();
}
if (struct.isSetIndexLength()) {
oprot.writeFieldBegin(INDEX_LENGTH_FIELD_DESC);
oprot.writeI64(struct.index_length);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TTableStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTableStatusTupleScheme getScheme() {
return new TTableStatusTupleScheme();
}
}
private static class TTableStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<TTableStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTableStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
oprot.writeString(struct.type);
oprot.writeString(struct.comment);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetEngine()) {
optionals.set(0);
}
if (struct.isSetLastCheckTime()) {
optionals.set(1);
}
if (struct.isSetCreateTime()) {
optionals.set(2);
}
if (struct.isSetDdlSql()) {
optionals.set(3);
}
if (struct.isSetUpdateTime()) {
optionals.set(4);
}
if (struct.isSetCheckTime()) {
optionals.set(5);
}
if (struct.isSetCollation()) {
optionals.set(6);
}
if (struct.isSetRows()) {
optionals.set(7);
}
if (struct.isSetAvgRowLength()) {
optionals.set(8);
}
if (struct.isSetDataLength()) {
optionals.set(9);
}
if (struct.isSetIndexLength()) {
optionals.set(10);
}
oprot.writeBitSet(optionals, 11);
if (struct.isSetEngine()) {
oprot.writeString(struct.engine);
}
if (struct.isSetLastCheckTime()) {
oprot.writeI64(struct.last_check_time);
}
if (struct.isSetCreateTime()) {
oprot.writeI64(struct.create_time);
}
if (struct.isSetDdlSql()) {
oprot.writeString(struct.ddl_sql);
}
if (struct.isSetUpdateTime()) {
oprot.writeI64(struct.update_time);
}
if (struct.isSetCheckTime()) {
oprot.writeI64(struct.check_time);
}
if (struct.isSetCollation()) {
oprot.writeString(struct.collation);
}
if (struct.isSetRows()) {
oprot.writeI64(struct.rows);
}
if (struct.isSetAvgRowLength()) {
oprot.writeI64(struct.avg_row_length);
}
if (struct.isSetDataLength()) {
oprot.writeI64(struct.data_length);
}
if (struct.isSetIndexLength()) {
oprot.writeI64(struct.index_length);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TTableStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.setNameIsSet(true);
struct.type = iprot.readString();
struct.setTypeIsSet(true);
struct.comment = iprot.readString();
struct.setCommentIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(11);
if (incoming.get(0)) {
struct.engine = iprot.readString();
struct.setEngineIsSet(true);
}
if (incoming.get(1)) {
struct.last_check_time = iprot.readI64();
struct.setLastCheckTimeIsSet(true);
}
if (incoming.get(2)) {
struct.create_time = iprot.readI64();
struct.setCreateTimeIsSet(true);
}
if (incoming.get(3)) {
struct.ddl_sql = iprot.readString();
struct.setDdlSqlIsSet(true);
}
if (incoming.get(4)) {
struct.update_time = iprot.readI64();
struct.setUpdateTimeIsSet(true);
}
if (incoming.get(5)) {
struct.check_time = iprot.readI64();
struct.setCheckTimeIsSet(true);
}
if (incoming.get(6)) {
struct.collation = iprot.readString();
struct.setCollationIsSet(true);
}
if (incoming.get(7)) {
struct.rows = iprot.readI64();
struct.setRowsIsSet(true);
}
if (incoming.get(8)) {
struct.avg_row_length = iprot.readI64();
struct.setAvgRowLengthIsSet(true);
}
if (incoming.get(9)) {
struct.data_length = iprot.readI64();
struct.setDataLengthIsSet(true);
}
if (incoming.get(10)) {
struct.index_length = iprot.readI64();
struct.setIndexLengthIsSet(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();
}
}