/** * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.xiaomi.infra.galaxy.sds.thrift; import libthrift091.scheme.IScheme; import libthrift091.scheme.SchemeFactory; import libthrift091.scheme.StandardScheme; import libthrift091.scheme.TupleScheme; import libthrift091.protocol.TTupleProtocol; import libthrift091.protocol.TProtocolException; import libthrift091.EncodingUtils; import libthrift091.TException; import libthrift091.async.AsyncMethodCallback; import libthrift091.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) /** * 表Schema设置 */ @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-12-30") public class TableSchema implements libthrift091.TBase<TableSchema, TableSchema._Fields>, java.io.Serializable, Cloneable, Comparable<TableSchema> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("TableSchema"); private static final libthrift091.protocol.TField VERSION_FIELD_DESC = new libthrift091.protocol.TField("version", libthrift091.protocol.TType.I32, (short)1); private static final libthrift091.protocol.TField ENTITY_GROUP_FIELD_DESC = new libthrift091.protocol.TField("entityGroup", libthrift091.protocol.TType.STRUCT, (short)2); private static final libthrift091.protocol.TField PRIMARY_INDEX_FIELD_DESC = new libthrift091.protocol.TField("primaryIndex", libthrift091.protocol.TType.LIST, (short)3); private static final libthrift091.protocol.TField SECONDARY_INDEXES_FIELD_DESC = new libthrift091.protocol.TField("secondaryIndexes", libthrift091.protocol.TType.MAP, (short)4); private static final libthrift091.protocol.TField ATTRIBUTES_FIELD_DESC = new libthrift091.protocol.TField("attributes", libthrift091.protocol.TType.MAP, (short)5); private static final libthrift091.protocol.TField TTL_FIELD_DESC = new libthrift091.protocol.TField("ttl", libthrift091.protocol.TType.I32, (short)6); private static final libthrift091.protocol.TField PRE_SPLITS_FIELD_DESC = new libthrift091.protocol.TField("preSplits", libthrift091.protocol.TType.I32, (short)7); private static final libthrift091.protocol.TField STREAMS_FIELD_DESC = new libthrift091.protocol.TField("streams", libthrift091.protocol.TType.MAP, (short)8); private static final libthrift091.protocol.TField GLOBAL_SECONDARY_INDEXES_FIELD_DESC = new libthrift091.protocol.TField("globalSecondaryIndexes", libthrift091.protocol.TType.MAP, (short)9); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TableSchemaStandardSchemeFactory()); schemes.put(TupleScheme.class, new TableSchemaTupleSchemeFactory()); } /** * Schema版本号,仅作为输出,作为输入不需要设置 */ public int version; // optional /** * Entity group定义, 不设置表示不开启Entity Group支持。 * 开启后自动支持应用用户表空间隔离(需配合相应权限设置), * 即每个应用用户将看到独立的表空间 */ public EntityGroupSpec entityGroup; // optional /** * 主键定义 */ public List<KeySpec> primaryIndex; // required /** * 二级索引定义 */ public Map<String,LocalSecondaryIndexSpec> secondaryIndexes; // optional /** * 属性定义 */ public Map<String,DataType> attributes; // optional /** * 记录存活时间,单位为秒。-1表示不会自动删除 */ public int ttl; // optional /** * 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用 */ public int preSplits; // optional /** * stream定义,TopicName => StreamSpec */ public Map<String,StreamSpec> streams; // optional /** * 全局二级索引定义 */ public Map<String,GlobalSecondaryIndexSpec> globalSecondaryIndexes; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { /** * Schema版本号,仅作为输出,作为输入不需要设置 */ VERSION((short)1, "version"), /** * Entity group定义, 不设置表示不开启Entity Group支持。 * 开启后自动支持应用用户表空间隔离(需配合相应权限设置), * 即每个应用用户将看到独立的表空间 */ ENTITY_GROUP((short)2, "entityGroup"), /** * 主键定义 */ PRIMARY_INDEX((short)3, "primaryIndex"), /** * 二级索引定义 */ SECONDARY_INDEXES((short)4, "secondaryIndexes"), /** * 属性定义 */ ATTRIBUTES((short)5, "attributes"), /** * 记录存活时间,单位为秒。-1表示不会自动删除 */ TTL((short)6, "ttl"), /** * 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用 */ PRE_SPLITS((short)7, "preSplits"), /** * stream定义,TopicName => StreamSpec */ STREAMS((short)8, "streams"), /** * 全局二级索引定义 */ GLOBAL_SECONDARY_INDEXES((short)9, "globalSecondaryIndexes"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // VERSION return VERSION; case 2: // ENTITY_GROUP return ENTITY_GROUP; case 3: // PRIMARY_INDEX return PRIMARY_INDEX; case 4: // SECONDARY_INDEXES return SECONDARY_INDEXES; case 5: // ATTRIBUTES return ATTRIBUTES; case 6: // TTL return TTL; case 7: // PRE_SPLITS return PRE_SPLITS; case 8: // STREAMS return STREAMS; case 9: // GLOBAL_SECONDARY_INDEXES return GLOBAL_SECONDARY_INDEXES; 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __VERSION_ISSET_ID = 0; private static final int __TTL_ISSET_ID = 1; private static final int __PRESPLITS_ISSET_ID = 2; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.VERSION,_Fields.ENTITY_GROUP,_Fields.SECONDARY_INDEXES,_Fields.ATTRIBUTES,_Fields.TTL,_Fields.PRE_SPLITS,_Fields.STREAMS,_Fields.GLOBAL_SECONDARY_INDEXES}; public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.VERSION, new libthrift091.meta_data.FieldMetaData("version", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32))); tmpMap.put(_Fields.ENTITY_GROUP, new libthrift091.meta_data.FieldMetaData("entityGroup", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, EntityGroupSpec.class))); tmpMap.put(_Fields.PRIMARY_INDEX, new libthrift091.meta_data.FieldMetaData("primaryIndex", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.LIST , "IndexSpec"))); tmpMap.put(_Fields.SECONDARY_INDEXES, new libthrift091.meta_data.FieldMetaData("secondaryIndexes", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING), new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, LocalSecondaryIndexSpec.class)))); tmpMap.put(_Fields.ATTRIBUTES, new libthrift091.meta_data.FieldMetaData("attributes", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING), new libthrift091.meta_data.EnumMetaData(libthrift091.protocol.TType.ENUM, DataType.class)))); tmpMap.put(_Fields.TTL, new libthrift091.meta_data.FieldMetaData("ttl", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32))); tmpMap.put(_Fields.PRE_SPLITS, new libthrift091.meta_data.FieldMetaData("preSplits", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.I32))); tmpMap.put(_Fields.STREAMS, new libthrift091.meta_data.FieldMetaData("streams", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING), new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, StreamSpec.class)))); tmpMap.put(_Fields.GLOBAL_SECONDARY_INDEXES, new libthrift091.meta_data.FieldMetaData("globalSecondaryIndexes", libthrift091.TFieldRequirementType.OPTIONAL, new libthrift091.meta_data.MapMetaData(libthrift091.protocol.TType.MAP, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING), new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GlobalSecondaryIndexSpec.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(TableSchema.class, metaDataMap); } public TableSchema() { this.ttl = -1; this.preSplits = 1; } public TableSchema( List<KeySpec> primaryIndex) { this(); this.primaryIndex = primaryIndex; } /** * Performs a deep copy on <i>other</i>. */ public TableSchema(TableSchema other) { __isset_bitfield = other.__isset_bitfield; this.version = other.version; if (other.isSetEntityGroup()) { this.entityGroup = new EntityGroupSpec(other.entityGroup); } if (other.isSetPrimaryIndex()) { this.primaryIndex = other.primaryIndex; } if (other.isSetSecondaryIndexes()) { Map<String,LocalSecondaryIndexSpec> __this__secondaryIndexes = new HashMap<String,LocalSecondaryIndexSpec>(other.secondaryIndexes.size()); for (Map.Entry<String, LocalSecondaryIndexSpec> other_element : other.secondaryIndexes.entrySet()) { String other_element_key = other_element.getKey(); LocalSecondaryIndexSpec other_element_value = other_element.getValue(); String __this__secondaryIndexes_copy_key = other_element_key; LocalSecondaryIndexSpec __this__secondaryIndexes_copy_value = new LocalSecondaryIndexSpec(other_element_value); __this__secondaryIndexes.put(__this__secondaryIndexes_copy_key, __this__secondaryIndexes_copy_value); } this.secondaryIndexes = __this__secondaryIndexes; } if (other.isSetAttributes()) { Map<String,DataType> __this__attributes = new HashMap<String,DataType>(other.attributes.size()); for (Map.Entry<String, DataType> other_element : other.attributes.entrySet()) { String other_element_key = other_element.getKey(); DataType other_element_value = other_element.getValue(); String __this__attributes_copy_key = other_element_key; DataType __this__attributes_copy_value = other_element_value; __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); } this.attributes = __this__attributes; } this.ttl = other.ttl; this.preSplits = other.preSplits; if (other.isSetStreams()) { Map<String,StreamSpec> __this__streams = new HashMap<String,StreamSpec>(other.streams.size()); for (Map.Entry<String, StreamSpec> other_element : other.streams.entrySet()) { String other_element_key = other_element.getKey(); StreamSpec other_element_value = other_element.getValue(); String __this__streams_copy_key = other_element_key; StreamSpec __this__streams_copy_value = new StreamSpec(other_element_value); __this__streams.put(__this__streams_copy_key, __this__streams_copy_value); } this.streams = __this__streams; } if (other.isSetGlobalSecondaryIndexes()) { Map<String,GlobalSecondaryIndexSpec> __this__globalSecondaryIndexes = new HashMap<String,GlobalSecondaryIndexSpec>(other.globalSecondaryIndexes.size()); for (Map.Entry<String, GlobalSecondaryIndexSpec> other_element : other.globalSecondaryIndexes.entrySet()) { String other_element_key = other_element.getKey(); GlobalSecondaryIndexSpec other_element_value = other_element.getValue(); String __this__globalSecondaryIndexes_copy_key = other_element_key; GlobalSecondaryIndexSpec __this__globalSecondaryIndexes_copy_value = new GlobalSecondaryIndexSpec(other_element_value); __this__globalSecondaryIndexes.put(__this__globalSecondaryIndexes_copy_key, __this__globalSecondaryIndexes_copy_value); } this.globalSecondaryIndexes = __this__globalSecondaryIndexes; } } public TableSchema deepCopy() { return new TableSchema(this); } @Override public void clear() { setVersionIsSet(false); this.version = 0; this.entityGroup = null; this.primaryIndex = null; this.secondaryIndexes = null; this.attributes = null; this.ttl = -1; this.preSplits = 1; this.streams = null; this.globalSecondaryIndexes = null; } /** * Schema版本号,仅作为输出,作为输入不需要设置 */ public int getVersion() { return this.version; } /** * Schema版本号,仅作为输出,作为输入不需要设置 */ public TableSchema setVersion(int version) { this.version = version; setVersionIsSet(true); return this; } public void unsetVersion() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID); } /** Returns true if field version is set (has been assigned a value) and false otherwise */ public boolean isSetVersion() { return EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID); } public void setVersionIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value); } /** * Entity group定义, 不设置表示不开启Entity Group支持。 * 开启后自动支持应用用户表空间隔离(需配合相应权限设置), * 即每个应用用户将看到独立的表空间 */ public EntityGroupSpec getEntityGroup() { return this.entityGroup; } /** * Entity group定义, 不设置表示不开启Entity Group支持。 * 开启后自动支持应用用户表空间隔离(需配合相应权限设置), * 即每个应用用户将看到独立的表空间 */ public TableSchema setEntityGroup(EntityGroupSpec entityGroup) { this.entityGroup = entityGroup; return this; } public void unsetEntityGroup() { this.entityGroup = null; } /** Returns true if field entityGroup is set (has been assigned a value) and false otherwise */ public boolean isSetEntityGroup() { return this.entityGroup != null; } public void setEntityGroupIsSet(boolean value) { if (!value) { this.entityGroup = null; } } public int getPrimaryIndexSize() { return (this.primaryIndex == null) ? 0 : this.primaryIndex.size(); } public java.util.Iterator<KeySpec> getPrimaryIndexIterator() { return (this.primaryIndex == null) ? null : this.primaryIndex.iterator(); } public void addToPrimaryIndex(KeySpec elem) { if (this.primaryIndex == null) { this.primaryIndex = new ArrayList<KeySpec>(); } this.primaryIndex.add(elem); } /** * 主键定义 */ public List<KeySpec> getPrimaryIndex() { return this.primaryIndex; } /** * 主键定义 */ public TableSchema setPrimaryIndex(List<KeySpec> primaryIndex) { this.primaryIndex = primaryIndex; return this; } public void unsetPrimaryIndex() { this.primaryIndex = null; } /** Returns true if field primaryIndex is set (has been assigned a value) and false otherwise */ public boolean isSetPrimaryIndex() { return this.primaryIndex != null; } public void setPrimaryIndexIsSet(boolean value) { if (!value) { this.primaryIndex = null; } } public int getSecondaryIndexesSize() { return (this.secondaryIndexes == null) ? 0 : this.secondaryIndexes.size(); } public void putToSecondaryIndexes(String key, LocalSecondaryIndexSpec val) { if (this.secondaryIndexes == null) { this.secondaryIndexes = new HashMap<String,LocalSecondaryIndexSpec>(); } this.secondaryIndexes.put(key, val); } /** * 二级索引定义 */ public Map<String,LocalSecondaryIndexSpec> getSecondaryIndexes() { return this.secondaryIndexes; } /** * 二级索引定义 */ public TableSchema setSecondaryIndexes(Map<String,LocalSecondaryIndexSpec> secondaryIndexes) { this.secondaryIndexes = secondaryIndexes; return this; } public void unsetSecondaryIndexes() { this.secondaryIndexes = null; } /** Returns true if field secondaryIndexes is set (has been assigned a value) and false otherwise */ public boolean isSetSecondaryIndexes() { return this.secondaryIndexes != null; } public void setSecondaryIndexesIsSet(boolean value) { if (!value) { this.secondaryIndexes = null; } } public int getAttributesSize() { return (this.attributes == null) ? 0 : this.attributes.size(); } public void putToAttributes(String key, DataType val) { if (this.attributes == null) { this.attributes = new HashMap<String,DataType>(); } this.attributes.put(key, val); } /** * 属性定义 */ public Map<String,DataType> getAttributes() { return this.attributes; } /** * 属性定义 */ public TableSchema setAttributes(Map<String,DataType> attributes) { this.attributes = attributes; return this; } public void unsetAttributes() { this.attributes = null; } /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ public boolean isSetAttributes() { return this.attributes != null; } public void setAttributesIsSet(boolean value) { if (!value) { this.attributes = null; } } /** * 记录存活时间,单位为秒。-1表示不会自动删除 */ public int getTtl() { return this.ttl; } /** * 记录存活时间,单位为秒。-1表示不会自动删除 */ public TableSchema setTtl(int ttl) { this.ttl = ttl; setTtlIsSet(true); return this; } public void unsetTtl() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TTL_ISSET_ID); } /** Returns true if field ttl is set (has been assigned a value) and false otherwise */ public boolean isSetTtl() { return EncodingUtils.testBit(__isset_bitfield, __TTL_ISSET_ID); } public void setTtlIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TTL_ISSET_ID, value); } /** * 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用 */ public int getPreSplits() { return this.preSplits; } /** * 表初始分片数目,仅支持Entity Group开启hash分布的表,且仅在建表时起作用 */ public TableSchema setPreSplits(int preSplits) { this.preSplits = preSplits; setPreSplitsIsSet(true); return this; } public void unsetPreSplits() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PRESPLITS_ISSET_ID); } /** Returns true if field preSplits is set (has been assigned a value) and false otherwise */ public boolean isSetPreSplits() { return EncodingUtils.testBit(__isset_bitfield, __PRESPLITS_ISSET_ID); } public void setPreSplitsIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PRESPLITS_ISSET_ID, value); } public int getStreamsSize() { return (this.streams == null) ? 0 : this.streams.size(); } public void putToStreams(String key, StreamSpec val) { if (this.streams == null) { this.streams = new HashMap<String,StreamSpec>(); } this.streams.put(key, val); } /** * stream定义,TopicName => StreamSpec */ public Map<String,StreamSpec> getStreams() { return this.streams; } /** * stream定义,TopicName => StreamSpec */ public TableSchema setStreams(Map<String,StreamSpec> streams) { this.streams = streams; return this; } public void unsetStreams() { this.streams = null; } /** Returns true if field streams is set (has been assigned a value) and false otherwise */ public boolean isSetStreams() { return this.streams != null; } public void setStreamsIsSet(boolean value) { if (!value) { this.streams = null; } } public int getGlobalSecondaryIndexesSize() { return (this.globalSecondaryIndexes == null) ? 0 : this.globalSecondaryIndexes.size(); } public void putToGlobalSecondaryIndexes(String key, GlobalSecondaryIndexSpec val) { if (this.globalSecondaryIndexes == null) { this.globalSecondaryIndexes = new HashMap<String,GlobalSecondaryIndexSpec>(); } this.globalSecondaryIndexes.put(key, val); } /** * 全局二级索引定义 */ public Map<String,GlobalSecondaryIndexSpec> getGlobalSecondaryIndexes() { return this.globalSecondaryIndexes; } /** * 全局二级索引定义 */ public TableSchema setGlobalSecondaryIndexes(Map<String,GlobalSecondaryIndexSpec> globalSecondaryIndexes) { this.globalSecondaryIndexes = globalSecondaryIndexes; return this; } public void unsetGlobalSecondaryIndexes() { this.globalSecondaryIndexes = null; } /** Returns true if field globalSecondaryIndexes is set (has been assigned a value) and false otherwise */ public boolean isSetGlobalSecondaryIndexes() { return this.globalSecondaryIndexes != null; } public void setGlobalSecondaryIndexesIsSet(boolean value) { if (!value) { this.globalSecondaryIndexes = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case VERSION: if (value == null) { unsetVersion(); } else { setVersion((Integer)value); } break; case ENTITY_GROUP: if (value == null) { unsetEntityGroup(); } else { setEntityGroup((EntityGroupSpec)value); } break; case PRIMARY_INDEX: if (value == null) { unsetPrimaryIndex(); } else { setPrimaryIndex((List<KeySpec>)value); } break; case SECONDARY_INDEXES: if (value == null) { unsetSecondaryIndexes(); } else { setSecondaryIndexes((Map<String,LocalSecondaryIndexSpec>)value); } break; case ATTRIBUTES: if (value == null) { unsetAttributes(); } else { setAttributes((Map<String,DataType>)value); } break; case TTL: if (value == null) { unsetTtl(); } else { setTtl((Integer)value); } break; case PRE_SPLITS: if (value == null) { unsetPreSplits(); } else { setPreSplits((Integer)value); } break; case STREAMS: if (value == null) { unsetStreams(); } else { setStreams((Map<String,StreamSpec>)value); } break; case GLOBAL_SECONDARY_INDEXES: if (value == null) { unsetGlobalSecondaryIndexes(); } else { setGlobalSecondaryIndexes((Map<String,GlobalSecondaryIndexSpec>)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case VERSION: return Integer.valueOf(getVersion()); case ENTITY_GROUP: return getEntityGroup(); case PRIMARY_INDEX: return getPrimaryIndex(); case SECONDARY_INDEXES: return getSecondaryIndexes(); case ATTRIBUTES: return getAttributes(); case TTL: return Integer.valueOf(getTtl()); case PRE_SPLITS: return Integer.valueOf(getPreSplits()); case STREAMS: return getStreams(); case GLOBAL_SECONDARY_INDEXES: return getGlobalSecondaryIndexes(); } throw new 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 IllegalArgumentException(); } switch (field) { case VERSION: return isSetVersion(); case ENTITY_GROUP: return isSetEntityGroup(); case PRIMARY_INDEX: return isSetPrimaryIndex(); case SECONDARY_INDEXES: return isSetSecondaryIndexes(); case ATTRIBUTES: return isSetAttributes(); case TTL: return isSetTtl(); case PRE_SPLITS: return isSetPreSplits(); case STREAMS: return isSetStreams(); case GLOBAL_SECONDARY_INDEXES: return isSetGlobalSecondaryIndexes(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TableSchema) return this.equals((TableSchema)that); return false; } public boolean equals(TableSchema that) { if (that == null) return false; boolean this_present_version = true && this.isSetVersion(); boolean that_present_version = true && that.isSetVersion(); if (this_present_version || that_present_version) { if (!(this_present_version && that_present_version)) return false; if (this.version != that.version) return false; } boolean this_present_entityGroup = true && this.isSetEntityGroup(); boolean that_present_entityGroup = true && that.isSetEntityGroup(); if (this_present_entityGroup || that_present_entityGroup) { if (!(this_present_entityGroup && that_present_entityGroup)) return false; if (!this.entityGroup.equals(that.entityGroup)) return false; } boolean this_present_primaryIndex = true && this.isSetPrimaryIndex(); boolean that_present_primaryIndex = true && that.isSetPrimaryIndex(); if (this_present_primaryIndex || that_present_primaryIndex) { if (!(this_present_primaryIndex && that_present_primaryIndex)) return false; if (!this.primaryIndex.equals(that.primaryIndex)) return false; } boolean this_present_secondaryIndexes = true && this.isSetSecondaryIndexes(); boolean that_present_secondaryIndexes = true && that.isSetSecondaryIndexes(); if (this_present_secondaryIndexes || that_present_secondaryIndexes) { if (!(this_present_secondaryIndexes && that_present_secondaryIndexes)) return false; if (!this.secondaryIndexes.equals(that.secondaryIndexes)) return false; } boolean this_present_attributes = true && this.isSetAttributes(); boolean that_present_attributes = true && that.isSetAttributes(); if (this_present_attributes || that_present_attributes) { if (!(this_present_attributes && that_present_attributes)) return false; if (!this.attributes.equals(that.attributes)) return false; } boolean this_present_ttl = true && this.isSetTtl(); boolean that_present_ttl = true && that.isSetTtl(); if (this_present_ttl || that_present_ttl) { if (!(this_present_ttl && that_present_ttl)) return false; if (this.ttl != that.ttl) return false; } boolean this_present_preSplits = true && this.isSetPreSplits(); boolean that_present_preSplits = true && that.isSetPreSplits(); if (this_present_preSplits || that_present_preSplits) { if (!(this_present_preSplits && that_present_preSplits)) return false; if (this.preSplits != that.preSplits) return false; } boolean this_present_streams = true && this.isSetStreams(); boolean that_present_streams = true && that.isSetStreams(); if (this_present_streams || that_present_streams) { if (!(this_present_streams && that_present_streams)) return false; if (!this.streams.equals(that.streams)) return false; } boolean this_present_globalSecondaryIndexes = true && this.isSetGlobalSecondaryIndexes(); boolean that_present_globalSecondaryIndexes = true && that.isSetGlobalSecondaryIndexes(); if (this_present_globalSecondaryIndexes || that_present_globalSecondaryIndexes) { if (!(this_present_globalSecondaryIndexes && that_present_globalSecondaryIndexes)) return false; if (!this.globalSecondaryIndexes.equals(that.globalSecondaryIndexes)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_version = true && (isSetVersion()); list.add(present_version); if (present_version) list.add(version); boolean present_entityGroup = true && (isSetEntityGroup()); list.add(present_entityGroup); if (present_entityGroup) list.add(entityGroup); boolean present_primaryIndex = true && (isSetPrimaryIndex()); list.add(present_primaryIndex); if (present_primaryIndex) list.add(primaryIndex); boolean present_secondaryIndexes = true && (isSetSecondaryIndexes()); list.add(present_secondaryIndexes); if (present_secondaryIndexes) list.add(secondaryIndexes); boolean present_attributes = true && (isSetAttributes()); list.add(present_attributes); if (present_attributes) list.add(attributes); boolean present_ttl = true && (isSetTtl()); list.add(present_ttl); if (present_ttl) list.add(ttl); boolean present_preSplits = true && (isSetPreSplits()); list.add(present_preSplits); if (present_preSplits) list.add(preSplits); boolean present_streams = true && (isSetStreams()); list.add(present_streams); if (present_streams) list.add(streams); boolean present_globalSecondaryIndexes = true && (isSetGlobalSecondaryIndexes()); list.add(present_globalSecondaryIndexes); if (present_globalSecondaryIndexes) list.add(globalSecondaryIndexes); return list.hashCode(); } @Override public int compareTo(TableSchema other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion()); if (lastComparison != 0) { return lastComparison; } if (isSetVersion()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.version, other.version); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEntityGroup()).compareTo(other.isSetEntityGroup()); if (lastComparison != 0) { return lastComparison; } if (isSetEntityGroup()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.entityGroup, other.entityGroup); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPrimaryIndex()).compareTo(other.isSetPrimaryIndex()); if (lastComparison != 0) { return lastComparison; } if (isSetPrimaryIndex()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.primaryIndex, other.primaryIndex); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSecondaryIndexes()).compareTo(other.isSetSecondaryIndexes()); if (lastComparison != 0) { return lastComparison; } if (isSetSecondaryIndexes()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.secondaryIndexes, other.secondaryIndexes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(other.isSetAttributes()); if (lastComparison != 0) { return lastComparison; } if (isSetAttributes()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.attributes, other.attributes); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTtl()).compareTo(other.isSetTtl()); if (lastComparison != 0) { return lastComparison; } if (isSetTtl()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.ttl, other.ttl); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPreSplits()).compareTo(other.isSetPreSplits()); if (lastComparison != 0) { return lastComparison; } if (isSetPreSplits()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.preSplits, other.preSplits); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetStreams()).compareTo(other.isSetStreams()); if (lastComparison != 0) { return lastComparison; } if (isSetStreams()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.streams, other.streams); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetGlobalSecondaryIndexes()).compareTo(other.isSetGlobalSecondaryIndexes()); if (lastComparison != 0) { return lastComparison; } if (isSetGlobalSecondaryIndexes()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.globalSecondaryIndexes, other.globalSecondaryIndexes); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TableSchema("); boolean first = true; if (isSetVersion()) { sb.append("version:"); sb.append(this.version); first = false; } if (isSetEntityGroup()) { if (!first) sb.append(", "); sb.append("entityGroup:"); if (this.entityGroup == null) { sb.append("null"); } else { sb.append(this.entityGroup); } first = false; } if (!first) sb.append(", "); sb.append("primaryIndex:"); if (this.primaryIndex == null) { sb.append("null"); } else { sb.append(this.primaryIndex); } first = false; if (isSetSecondaryIndexes()) { if (!first) sb.append(", "); sb.append("secondaryIndexes:"); if (this.secondaryIndexes == null) { sb.append("null"); } else { sb.append(this.secondaryIndexes); } first = false; } if (isSetAttributes()) { if (!first) sb.append(", "); sb.append("attributes:"); if (this.attributes == null) { sb.append("null"); } else { sb.append(this.attributes); } first = false; } if (isSetTtl()) { if (!first) sb.append(", "); sb.append("ttl:"); sb.append(this.ttl); first = false; } if (isSetPreSplits()) { if (!first) sb.append(", "); sb.append("preSplits:"); sb.append(this.preSplits); first = false; } if (isSetStreams()) { if (!first) sb.append(", "); sb.append("streams:"); if (this.streams == null) { sb.append("null"); } else { sb.append(this.streams); } first = false; } if (isSetGlobalSecondaryIndexes()) { if (!first) sb.append(", "); sb.append("globalSecondaryIndexes:"); if (this.globalSecondaryIndexes == null) { sb.append("null"); } else { sb.append(this.globalSecondaryIndexes); } first = false; } sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity if (entityGroup != null) { entityGroup.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class TableSchemaStandardSchemeFactory implements SchemeFactory { public TableSchemaStandardScheme getScheme() { return new TableSchemaStandardScheme(); } } private static class TableSchemaStandardScheme extends StandardScheme<TableSchema> { public void read(libthrift091.protocol.TProtocol iprot, TableSchema struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // VERSION if (schemeField.type == libthrift091.protocol.TType.I32) { struct.version = iprot.readI32(); struct.setVersionIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // ENTITY_GROUP if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.entityGroup = new EntityGroupSpec(); struct.entityGroup.read(iprot); struct.setEntityGroupIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PRIMARY_INDEX if (schemeField.type == libthrift091.protocol.TType.LIST) { { libthrift091.protocol.TList _list112 = iprot.readListBegin(); struct.primaryIndex = new ArrayList<KeySpec>(_list112.size); KeySpec _elem113; for (int _i114 = 0; _i114 < _list112.size; ++_i114) { _elem113 = new KeySpec(); _elem113.read(iprot); struct.primaryIndex.add(_elem113); } iprot.readListEnd(); } struct.setPrimaryIndexIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // SECONDARY_INDEXES if (schemeField.type == libthrift091.protocol.TType.MAP) { { libthrift091.protocol.TMap _map115 = iprot.readMapBegin(); struct.secondaryIndexes = new HashMap<String,LocalSecondaryIndexSpec>(2*_map115.size); String _key116; LocalSecondaryIndexSpec _val117; for (int _i118 = 0; _i118 < _map115.size; ++_i118) { _key116 = iprot.readString(); _val117 = new LocalSecondaryIndexSpec(); _val117.read(iprot); struct.secondaryIndexes.put(_key116, _val117); } iprot.readMapEnd(); } struct.setSecondaryIndexesIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // ATTRIBUTES if (schemeField.type == libthrift091.protocol.TType.MAP) { { libthrift091.protocol.TMap _map119 = iprot.readMapBegin(); struct.attributes = new HashMap<String,DataType>(2*_map119.size); String _key120; DataType _val121; for (int _i122 = 0; _i122 < _map119.size; ++_i122) { _key120 = iprot.readString(); _val121 = com.xiaomi.infra.galaxy.sds.thrift.DataType.findByValue(iprot.readI32()); struct.attributes.put(_key120, _val121); } iprot.readMapEnd(); } struct.setAttributesIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // TTL if (schemeField.type == libthrift091.protocol.TType.I32) { struct.ttl = iprot.readI32(); struct.setTtlIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // PRE_SPLITS if (schemeField.type == libthrift091.protocol.TType.I32) { struct.preSplits = iprot.readI32(); struct.setPreSplitsIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // STREAMS if (schemeField.type == libthrift091.protocol.TType.MAP) { { libthrift091.protocol.TMap _map123 = iprot.readMapBegin(); struct.streams = new HashMap<String,StreamSpec>(2*_map123.size); String _key124; StreamSpec _val125; for (int _i126 = 0; _i126 < _map123.size; ++_i126) { _key124 = iprot.readString(); _val125 = new StreamSpec(); _val125.read(iprot); struct.streams.put(_key124, _val125); } iprot.readMapEnd(); } struct.setStreamsIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 9: // GLOBAL_SECONDARY_INDEXES if (schemeField.type == libthrift091.protocol.TType.MAP) { { libthrift091.protocol.TMap _map127 = iprot.readMapBegin(); struct.globalSecondaryIndexes = new HashMap<String,GlobalSecondaryIndexSpec>(2*_map127.size); String _key128; GlobalSecondaryIndexSpec _val129; for (int _i130 = 0; _i130 < _map127.size; ++_i130) { _key128 = iprot.readString(); _val129 = new GlobalSecondaryIndexSpec(); _val129.read(iprot); struct.globalSecondaryIndexes.put(_key128, _val129); } iprot.readMapEnd(); } struct.setGlobalSecondaryIndexesIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.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(libthrift091.protocol.TProtocol oprot, TableSchema struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetVersion()) { oprot.writeFieldBegin(VERSION_FIELD_DESC); oprot.writeI32(struct.version); oprot.writeFieldEnd(); } if (struct.entityGroup != null) { if (struct.isSetEntityGroup()) { oprot.writeFieldBegin(ENTITY_GROUP_FIELD_DESC); struct.entityGroup.write(oprot); oprot.writeFieldEnd(); } } if (struct.primaryIndex != null) { oprot.writeFieldBegin(PRIMARY_INDEX_FIELD_DESC); { oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.primaryIndex.size())); for (KeySpec _iter131 : struct.primaryIndex) { _iter131.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.secondaryIndexes != null) { if (struct.isSetSecondaryIndexes()) { oprot.writeFieldBegin(SECONDARY_INDEXES_FIELD_DESC); { oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, struct.secondaryIndexes.size())); for (Map.Entry<String, LocalSecondaryIndexSpec> _iter132 : struct.secondaryIndexes.entrySet()) { oprot.writeString(_iter132.getKey()); _iter132.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } if (struct.attributes != null) { if (struct.isSetAttributes()) { oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); { oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.I32, struct.attributes.size())); for (Map.Entry<String, DataType> _iter133 : struct.attributes.entrySet()) { oprot.writeString(_iter133.getKey()); oprot.writeI32(_iter133.getValue().getValue()); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } if (struct.isSetTtl()) { oprot.writeFieldBegin(TTL_FIELD_DESC); oprot.writeI32(struct.ttl); oprot.writeFieldEnd(); } if (struct.isSetPreSplits()) { oprot.writeFieldBegin(PRE_SPLITS_FIELD_DESC); oprot.writeI32(struct.preSplits); oprot.writeFieldEnd(); } if (struct.streams != null) { if (struct.isSetStreams()) { oprot.writeFieldBegin(STREAMS_FIELD_DESC); { oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, struct.streams.size())); for (Map.Entry<String, StreamSpec> _iter134 : struct.streams.entrySet()) { oprot.writeString(_iter134.getKey()); _iter134.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } if (struct.globalSecondaryIndexes != null) { if (struct.isSetGlobalSecondaryIndexes()) { oprot.writeFieldBegin(GLOBAL_SECONDARY_INDEXES_FIELD_DESC); { oprot.writeMapBegin(new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, struct.globalSecondaryIndexes.size())); for (Map.Entry<String, GlobalSecondaryIndexSpec> _iter135 : struct.globalSecondaryIndexes.entrySet()) { oprot.writeString(_iter135.getKey()); _iter135.getValue().write(oprot); } oprot.writeMapEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TableSchemaTupleSchemeFactory implements SchemeFactory { public TableSchemaTupleScheme getScheme() { return new TableSchemaTupleScheme(); } } private static class TableSchemaTupleScheme extends TupleScheme<TableSchema> { @Override public void write(libthrift091.protocol.TProtocol prot, TableSchema struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetVersion()) { optionals.set(0); } if (struct.isSetEntityGroup()) { optionals.set(1); } if (struct.isSetPrimaryIndex()) { optionals.set(2); } if (struct.isSetSecondaryIndexes()) { optionals.set(3); } if (struct.isSetAttributes()) { optionals.set(4); } if (struct.isSetTtl()) { optionals.set(5); } if (struct.isSetPreSplits()) { optionals.set(6); } if (struct.isSetStreams()) { optionals.set(7); } if (struct.isSetGlobalSecondaryIndexes()) { optionals.set(8); } oprot.writeBitSet(optionals, 9); if (struct.isSetVersion()) { oprot.writeI32(struct.version); } if (struct.isSetEntityGroup()) { struct.entityGroup.write(oprot); } if (struct.isSetPrimaryIndex()) { { oprot.writeI32(struct.primaryIndex.size()); for (KeySpec _iter136 : struct.primaryIndex) { _iter136.write(oprot); } } } if (struct.isSetSecondaryIndexes()) { { oprot.writeI32(struct.secondaryIndexes.size()); for (Map.Entry<String, LocalSecondaryIndexSpec> _iter137 : struct.secondaryIndexes.entrySet()) { oprot.writeString(_iter137.getKey()); _iter137.getValue().write(oprot); } } } if (struct.isSetAttributes()) { { oprot.writeI32(struct.attributes.size()); for (Map.Entry<String, DataType> _iter138 : struct.attributes.entrySet()) { oprot.writeString(_iter138.getKey()); oprot.writeI32(_iter138.getValue().getValue()); } } } if (struct.isSetTtl()) { oprot.writeI32(struct.ttl); } if (struct.isSetPreSplits()) { oprot.writeI32(struct.preSplits); } if (struct.isSetStreams()) { { oprot.writeI32(struct.streams.size()); for (Map.Entry<String, StreamSpec> _iter139 : struct.streams.entrySet()) { oprot.writeString(_iter139.getKey()); _iter139.getValue().write(oprot); } } } if (struct.isSetGlobalSecondaryIndexes()) { { oprot.writeI32(struct.globalSecondaryIndexes.size()); for (Map.Entry<String, GlobalSecondaryIndexSpec> _iter140 : struct.globalSecondaryIndexes.entrySet()) { oprot.writeString(_iter140.getKey()); _iter140.getValue().write(oprot); } } } } @Override public void read(libthrift091.protocol.TProtocol prot, TableSchema struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { struct.version = iprot.readI32(); struct.setVersionIsSet(true); } if (incoming.get(1)) { struct.entityGroup = new EntityGroupSpec(); struct.entityGroup.read(iprot); struct.setEntityGroupIsSet(true); } if (incoming.get(2)) { { libthrift091.protocol.TList _list141 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32()); struct.primaryIndex = new ArrayList<KeySpec>(_list141.size); KeySpec _elem142; for (int _i143 = 0; _i143 < _list141.size; ++_i143) { _elem142 = new KeySpec(); _elem142.read(iprot); struct.primaryIndex.add(_elem142); } } struct.setPrimaryIndexIsSet(true); } if (incoming.get(3)) { { libthrift091.protocol.TMap _map144 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, iprot.readI32()); struct.secondaryIndexes = new HashMap<String,LocalSecondaryIndexSpec>(2*_map144.size); String _key145; LocalSecondaryIndexSpec _val146; for (int _i147 = 0; _i147 < _map144.size; ++_i147) { _key145 = iprot.readString(); _val146 = new LocalSecondaryIndexSpec(); _val146.read(iprot); struct.secondaryIndexes.put(_key145, _val146); } } struct.setSecondaryIndexesIsSet(true); } if (incoming.get(4)) { { libthrift091.protocol.TMap _map148 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.I32, iprot.readI32()); struct.attributes = new HashMap<String,DataType>(2*_map148.size); String _key149; DataType _val150; for (int _i151 = 0; _i151 < _map148.size; ++_i151) { _key149 = iprot.readString(); _val150 = com.xiaomi.infra.galaxy.sds.thrift.DataType.findByValue(iprot.readI32()); struct.attributes.put(_key149, _val150); } } struct.setAttributesIsSet(true); } if (incoming.get(5)) { struct.ttl = iprot.readI32(); struct.setTtlIsSet(true); } if (incoming.get(6)) { struct.preSplits = iprot.readI32(); struct.setPreSplitsIsSet(true); } if (incoming.get(7)) { { libthrift091.protocol.TMap _map152 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, iprot.readI32()); struct.streams = new HashMap<String,StreamSpec>(2*_map152.size); String _key153; StreamSpec _val154; for (int _i155 = 0; _i155 < _map152.size; ++_i155) { _key153 = iprot.readString(); _val154 = new StreamSpec(); _val154.read(iprot); struct.streams.put(_key153, _val154); } } struct.setStreamsIsSet(true); } if (incoming.get(8)) { { libthrift091.protocol.TMap _map156 = new libthrift091.protocol.TMap(libthrift091.protocol.TType.STRING, libthrift091.protocol.TType.STRUCT, iprot.readI32()); struct.globalSecondaryIndexes = new HashMap<String,GlobalSecondaryIndexSpec>(2*_map156.size); String _key157; GlobalSecondaryIndexSpec _val158; for (int _i159 = 0; _i159 < _map156.size; ++_i159) { _key157 = iprot.readString(); _val158 = new GlobalSecondaryIndexSpec(); _val158.read(iprot); struct.globalSecondaryIndexes.put(_key157, _val158); } } struct.setGlobalSecondaryIndexesIsSet(true); } } } }