TIndexDiskUsageMetadataParams.java
/**
* Autogenerated by Thrift Compiler (0.24.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"})
public class TIndexDiskUsageMetadataParams implements org.apache.thrift.TBase<TIndexDiskUsageMetadataParams, TIndexDiskUsageMetadataParams._Fields>, java.io.Serializable, Cloneable, Comparable<TIndexDiskUsageMetadataParams> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIndexDiskUsageMetadataParams");
private static final org.apache.thrift.protocol.TField LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("level", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField POSITION_DETAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("position_detail", org.apache.thrift.protocol.TType.BOOL, (short)2);
private static final org.apache.thrift.protocol.TField INDEX_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("index_ids", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField PARTITION_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_names", org.apache.thrift.protocol.TType.MAP, (short)4);
private static final org.apache.thrift.protocol.TField TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("tablets", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.protocol.TField MATERIALIZED_INDEX_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("materialized_index_names", org.apache.thrift.protocol.TType.MAP, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TIndexDiskUsageMetadataParamsStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TIndexDiskUsageMetadataParamsTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String level; // optional
public boolean position_detail; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> index_ids; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.lang.String> partition_names; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TIndexDiskUsageTablet> tablets; // optional
public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.lang.String> materialized_index_names; // 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 {
LEVEL((short)1, "level"),
POSITION_DETAIL((short)2, "position_detail"),
INDEX_IDS((short)3, "index_ids"),
PARTITION_NAMES((short)4, "partition_names"),
TABLETS((short)5, "tablets"),
MATERIALIZED_INDEX_NAMES((short)6, "materialized_index_names");
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: // LEVEL
return LEVEL;
case 2: // POSITION_DETAIL
return POSITION_DETAIL;
case 3: // INDEX_IDS
return INDEX_IDS;
case 4: // PARTITION_NAMES
return PARTITION_NAMES;
case 5: // TABLETS
return TABLETS;
case 6: // MATERIALIZED_INDEX_NAMES
return MATERIALIZED_INDEX_NAMES;
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;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __POSITION_DETAIL_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields[] optionals = {_Fields.LEVEL,_Fields.POSITION_DETAIL,_Fields.INDEX_IDS,_Fields.PARTITION_NAMES,_Fields.TABLETS,_Fields.MATERIALIZED_INDEX_NAMES};
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.LEVEL, new org.apache.thrift.meta_data.FieldMetaData("level", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.POSITION_DETAIL, new org.apache.thrift.meta_data.FieldMetaData("position_detail", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.INDEX_IDS, new org.apache.thrift.meta_data.FieldMetaData("index_ids", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
tmpMap.put(_Fields.PARTITION_NAMES, new org.apache.thrift.meta_data.FieldMetaData("partition_names", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.TABLETS, new org.apache.thrift.meta_data.FieldMetaData("tablets", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIndexDiskUsageTablet.class))));
tmpMap.put(_Fields.MATERIALIZED_INDEX_NAMES, new org.apache.thrift.meta_data.FieldMetaData("materialized_index_names", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIndexDiskUsageMetadataParams.class, metaDataMap);
}
public TIndexDiskUsageMetadataParams() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TIndexDiskUsageMetadataParams(TIndexDiskUsageMetadataParams other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetLevel()) {
this.level = other.level;
}
this.position_detail = other.position_detail;
if (other.isSetIndexIds()) {
java.util.List<java.lang.Long> __this__index_ids = new java.util.ArrayList<java.lang.Long>(other.index_ids);
this.index_ids = __this__index_ids;
}
if (other.isSetPartitionNames()) {
java.util.Map<java.lang.Long,java.lang.String> __this__partition_names = new java.util.HashMap<java.lang.Long,java.lang.String>(other.partition_names);
this.partition_names = __this__partition_names;
}
if (other.isSetTablets()) {
java.util.List<TIndexDiskUsageTablet> __this__tablets = new java.util.ArrayList<TIndexDiskUsageTablet>(other.tablets.size());
for (TIndexDiskUsageTablet other_element : other.tablets) {
__this__tablets.add(new TIndexDiskUsageTablet(other_element));
}
this.tablets = __this__tablets;
}
if (other.isSetMaterializedIndexNames()) {
java.util.Map<java.lang.Long,java.lang.String> __this__materialized_index_names = new java.util.HashMap<java.lang.Long,java.lang.String>(other.materialized_index_names);
this.materialized_index_names = __this__materialized_index_names;
}
}
@Override
public TIndexDiskUsageMetadataParams deepCopy() {
return new TIndexDiskUsageMetadataParams(this);
}
@Override
public void clear() {
this.level = null;
setPositionDetailIsSet(false);
this.position_detail = false;
this.index_ids = null;
this.partition_names = null;
this.tablets = null;
this.materialized_index_names = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getLevel() {
return this.level;
}
public TIndexDiskUsageMetadataParams setLevel(@org.apache.thrift.annotation.Nullable java.lang.String level) {
this.level = level;
return this;
}
public void unsetLevel() {
this.level = null;
}
/** Returns true if field level is set (has been assigned a value) and false otherwise */
public boolean isSetLevel() {
return this.level != null;
}
public void setLevelIsSet(boolean value) {
if (!value) {
this.level = null;
}
}
public boolean isPositionDetail() {
return this.position_detail;
}
public TIndexDiskUsageMetadataParams setPositionDetail(boolean position_detail) {
this.position_detail = position_detail;
setPositionDetailIsSet(true);
return this;
}
public void unsetPositionDetail() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __POSITION_DETAIL_ISSET_ID);
}
/** Returns true if field position_detail is set (has been assigned a value) and false otherwise */
public boolean isSetPositionDetail() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __POSITION_DETAIL_ISSET_ID);
}
public void setPositionDetailIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __POSITION_DETAIL_ISSET_ID, value);
}
public int getIndexIdsSize() {
return (this.index_ids == null) ? 0 : this.index_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getIndexIdsIterator() {
return (this.index_ids == null) ? null : this.index_ids.iterator();
}
public void addToIndexIds(long elem) {
if (this.index_ids == null) {
this.index_ids = new java.util.ArrayList<java.lang.Long>();
}
this.index_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getIndexIds() {
return this.index_ids;
}
public TIndexDiskUsageMetadataParams setIndexIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> index_ids) {
this.index_ids = index_ids;
return this;
}
public void unsetIndexIds() {
this.index_ids = null;
}
/** Returns true if field index_ids is set (has been assigned a value) and false otherwise */
public boolean isSetIndexIds() {
return this.index_ids != null;
}
public void setIndexIdsIsSet(boolean value) {
if (!value) {
this.index_ids = null;
}
}
public int getPartitionNamesSize() {
return (this.partition_names == null) ? 0 : this.partition_names.size();
}
public void putToPartitionNames(long key, java.lang.String val) {
if (this.partition_names == null) {
this.partition_names = new java.util.HashMap<java.lang.Long,java.lang.String>();
}
this.partition_names.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.Long,java.lang.String> getPartitionNames() {
return this.partition_names;
}
public TIndexDiskUsageMetadataParams setPartitionNames(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.lang.String> partition_names) {
this.partition_names = partition_names;
return this;
}
public void unsetPartitionNames() {
this.partition_names = null;
}
/** Returns true if field partition_names is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionNames() {
return this.partition_names != null;
}
public void setPartitionNamesIsSet(boolean value) {
if (!value) {
this.partition_names = null;
}
}
public int getTabletsSize() {
return (this.tablets == null) ? 0 : this.tablets.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TIndexDiskUsageTablet> getTabletsIterator() {
return (this.tablets == null) ? null : this.tablets.iterator();
}
public void addToTablets(TIndexDiskUsageTablet elem) {
if (this.tablets == null) {
this.tablets = new java.util.ArrayList<TIndexDiskUsageTablet>();
}
this.tablets.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TIndexDiskUsageTablet> getTablets() {
return this.tablets;
}
public TIndexDiskUsageMetadataParams setTablets(@org.apache.thrift.annotation.Nullable java.util.List<TIndexDiskUsageTablet> tablets) {
this.tablets = tablets;
return this;
}
public void unsetTablets() {
this.tablets = null;
}
/** Returns true if field tablets is set (has been assigned a value) and false otherwise */
public boolean isSetTablets() {
return this.tablets != null;
}
public void setTabletsIsSet(boolean value) {
if (!value) {
this.tablets = null;
}
}
public int getMaterializedIndexNamesSize() {
return (this.materialized_index_names == null) ? 0 : this.materialized_index_names.size();
}
public void putToMaterializedIndexNames(long key, java.lang.String val) {
if (this.materialized_index_names == null) {
this.materialized_index_names = new java.util.HashMap<java.lang.Long,java.lang.String>();
}
this.materialized_index_names.put(key, val);
}
@org.apache.thrift.annotation.Nullable
public java.util.Map<java.lang.Long,java.lang.String> getMaterializedIndexNames() {
return this.materialized_index_names;
}
public TIndexDiskUsageMetadataParams setMaterializedIndexNames(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Long,java.lang.String> materialized_index_names) {
this.materialized_index_names = materialized_index_names;
return this;
}
public void unsetMaterializedIndexNames() {
this.materialized_index_names = null;
}
/** Returns true if field materialized_index_names is set (has been assigned a value) and false otherwise */
public boolean isSetMaterializedIndexNames() {
return this.materialized_index_names != null;
}
public void setMaterializedIndexNamesIsSet(boolean value) {
if (!value) {
this.materialized_index_names = null;
}
}
@Override
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LEVEL:
if (value == null) {
unsetLevel();
} else {
setLevel((java.lang.String)value);
}
break;
case POSITION_DETAIL:
if (value == null) {
unsetPositionDetail();
} else {
setPositionDetail((java.lang.Boolean)value);
}
break;
case INDEX_IDS:
if (value == null) {
unsetIndexIds();
} else {
setIndexIds((java.util.List<java.lang.Long>)value);
}
break;
case PARTITION_NAMES:
if (value == null) {
unsetPartitionNames();
} else {
setPartitionNames((java.util.Map<java.lang.Long,java.lang.String>)value);
}
break;
case TABLETS:
if (value == null) {
unsetTablets();
} else {
setTablets((java.util.List<TIndexDiskUsageTablet>)value);
}
break;
case MATERIALIZED_INDEX_NAMES:
if (value == null) {
unsetMaterializedIndexNames();
} else {
setMaterializedIndexNames((java.util.Map<java.lang.Long,java.lang.String>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LEVEL:
return getLevel();
case POSITION_DETAIL:
return isPositionDetail();
case INDEX_IDS:
return getIndexIds();
case PARTITION_NAMES:
return getPartitionNames();
case TABLETS:
return getTablets();
case MATERIALIZED_INDEX_NAMES:
return getMaterializedIndexNames();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case LEVEL:
return isSetLevel();
case POSITION_DETAIL:
return isSetPositionDetail();
case INDEX_IDS:
return isSetIndexIds();
case PARTITION_NAMES:
return isSetPartitionNames();
case TABLETS:
return isSetTablets();
case MATERIALIZED_INDEX_NAMES:
return isSetMaterializedIndexNames();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TIndexDiskUsageMetadataParams)
return this.equals((TIndexDiskUsageMetadataParams)that);
return false;
}
public boolean equals(TIndexDiskUsageMetadataParams that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_level = true && this.isSetLevel();
boolean that_present_level = true && that.isSetLevel();
if (this_present_level || that_present_level) {
if (!(this_present_level && that_present_level))
return false;
if (!this.level.equals(that.level))
return false;
}
boolean this_present_position_detail = true && this.isSetPositionDetail();
boolean that_present_position_detail = true && that.isSetPositionDetail();
if (this_present_position_detail || that_present_position_detail) {
if (!(this_present_position_detail && that_present_position_detail))
return false;
if (this.position_detail != that.position_detail)
return false;
}
boolean this_present_index_ids = true && this.isSetIndexIds();
boolean that_present_index_ids = true && that.isSetIndexIds();
if (this_present_index_ids || that_present_index_ids) {
if (!(this_present_index_ids && that_present_index_ids))
return false;
if (!this.index_ids.equals(that.index_ids))
return false;
}
boolean this_present_partition_names = true && this.isSetPartitionNames();
boolean that_present_partition_names = true && that.isSetPartitionNames();
if (this_present_partition_names || that_present_partition_names) {
if (!(this_present_partition_names && that_present_partition_names))
return false;
if (!this.partition_names.equals(that.partition_names))
return false;
}
boolean this_present_tablets = true && this.isSetTablets();
boolean that_present_tablets = true && that.isSetTablets();
if (this_present_tablets || that_present_tablets) {
if (!(this_present_tablets && that_present_tablets))
return false;
if (!this.tablets.equals(that.tablets))
return false;
}
boolean this_present_materialized_index_names = true && this.isSetMaterializedIndexNames();
boolean that_present_materialized_index_names = true && that.isSetMaterializedIndexNames();
if (this_present_materialized_index_names || that_present_materialized_index_names) {
if (!(this_present_materialized_index_names && that_present_materialized_index_names))
return false;
if (!this.materialized_index_names.equals(that.materialized_index_names))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetLevel()) ? 131071 : 524287);
if (isSetLevel())
hashCode = hashCode * 8191 + level.hashCode();
hashCode = hashCode * 8191 + ((isSetPositionDetail()) ? 131071 : 524287);
if (isSetPositionDetail())
hashCode = hashCode * 8191 + ((position_detail) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetIndexIds()) ? 131071 : 524287);
if (isSetIndexIds())
hashCode = hashCode * 8191 + index_ids.hashCode();
hashCode = hashCode * 8191 + ((isSetPartitionNames()) ? 131071 : 524287);
if (isSetPartitionNames())
hashCode = hashCode * 8191 + partition_names.hashCode();
hashCode = hashCode * 8191 + ((isSetTablets()) ? 131071 : 524287);
if (isSetTablets())
hashCode = hashCode * 8191 + tablets.hashCode();
hashCode = hashCode * 8191 + ((isSetMaterializedIndexNames()) ? 131071 : 524287);
if (isSetMaterializedIndexNames())
hashCode = hashCode * 8191 + materialized_index_names.hashCode();
return hashCode;
}
@Override
public int compareTo(TIndexDiskUsageMetadataParams other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetLevel(), other.isSetLevel());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLevel()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.level, other.level);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPositionDetail(), other.isSetPositionDetail());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPositionDetail()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.position_detail, other.position_detail);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetIndexIds(), other.isSetIndexIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIndexIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.index_ids, other.index_ids);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitionNames(), other.isSetPartitionNames());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitionNames()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_names, other.partition_names);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTablets(), other.isSetTablets());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTablets()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tablets, other.tablets);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMaterializedIndexNames(), other.isSetMaterializedIndexNames());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaterializedIndexNames()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.materialized_index_names, other.materialized_index_names);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
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("TIndexDiskUsageMetadataParams(");
boolean first = true;
if (isSetLevel()) {
sb.append("level:");
if (this.level == null) {
sb.append("null");
} else {
sb.append(this.level);
}
first = false;
}
if (isSetPositionDetail()) {
if (!first) sb.append(", ");
sb.append("position_detail:");
sb.append(this.position_detail);
first = false;
}
if (isSetIndexIds()) {
if (!first) sb.append(", ");
sb.append("index_ids:");
if (this.index_ids == null) {
sb.append("null");
} else {
sb.append(this.index_ids);
}
first = false;
}
if (isSetPartitionNames()) {
if (!first) sb.append(", ");
sb.append("partition_names:");
if (this.partition_names == null) {
sb.append("null");
} else {
sb.append(this.partition_names);
}
first = false;
}
if (isSetTablets()) {
if (!first) sb.append(", ");
sb.append("tablets:");
if (this.tablets == null) {
sb.append("null");
} else {
sb.append(this.tablets);
}
first = false;
}
if (isSetMaterializedIndexNames()) {
if (!first) sb.append(", ");
sb.append("materialized_index_names:");
if (this.materialized_index_names == null) {
sb.append("null");
} else {
sb.append(this.materialized_index_names);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// 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 TIndexDiskUsageMetadataParamsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TIndexDiskUsageMetadataParamsStandardScheme getScheme() {
return new TIndexDiskUsageMetadataParamsStandardScheme();
}
}
private static class TIndexDiskUsageMetadataParamsStandardScheme extends org.apache.thrift.scheme.StandardScheme<TIndexDiskUsageMetadataParams> {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TIndexDiskUsageMetadataParams struct) throws org.apache.thrift.TException {
iprot.incrementRecursionDepth();
try {
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: // LEVEL
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.level = iprot.readString();
struct.setLevelIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // POSITION_DETAIL
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.position_detail = iprot.readBool();
struct.setPositionDetailIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INDEX_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list436 = iprot.readListBegin();
struct.index_ids = new java.util.ArrayList<java.lang.Long>(_list436.size);
long _elem437;
for (int _i438 = 0; _i438 < _list436.size; ++_i438)
{
_elem437 = iprot.readI64();
struct.index_ids.add(_elem437);
}
iprot.readListEnd();
}
struct.setIndexIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // PARTITION_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map439 = iprot.readMapBegin();
struct.partition_names = new java.util.HashMap<java.lang.Long,java.lang.String>(2*_map439.size);
long _key440;
@org.apache.thrift.annotation.Nullable java.lang.String _val441;
for (int _i442 = 0; _i442 < _map439.size; ++_i442)
{
_key440 = iprot.readI64();
_val441 = iprot.readString();
struct.partition_names.put(_key440, _val441);
}
iprot.readMapEnd();
}
struct.setPartitionNamesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // TABLETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list443 = iprot.readListBegin();
struct.tablets = new java.util.ArrayList<TIndexDiskUsageTablet>(_list443.size);
@org.apache.thrift.annotation.Nullable TIndexDiskUsageTablet _elem444;
for (int _i445 = 0; _i445 < _list443.size; ++_i445)
{
_elem444 = new TIndexDiskUsageTablet();
_elem444.read(iprot);
struct.tablets.add(_elem444);
}
iprot.readListEnd();
}
struct.setTabletsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // MATERIALIZED_INDEX_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map446 = iprot.readMapBegin();
struct.materialized_index_names = new java.util.HashMap<java.lang.Long,java.lang.String>(2*_map446.size);
long _key447;
@org.apache.thrift.annotation.Nullable java.lang.String _val448;
for (int _i449 = 0; _i449 < _map446.size; ++_i449)
{
_key447 = iprot.readI64();
_val448 = iprot.readString();
struct.materialized_index_names.put(_key447, _val448);
}
iprot.readMapEnd();
}
struct.setMaterializedIndexNamesIsSet(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();
} finally {
iprot.decrementRecursionDepth();
}
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, TIndexDiskUsageMetadataParams struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.level != null) {
if (struct.isSetLevel()) {
oprot.writeFieldBegin(LEVEL_FIELD_DESC);
oprot.writeString(struct.level);
oprot.writeFieldEnd();
}
}
if (struct.isSetPositionDetail()) {
oprot.writeFieldBegin(POSITION_DETAIL_FIELD_DESC);
oprot.writeBool(struct.position_detail);
oprot.writeFieldEnd();
}
if (struct.index_ids != null) {
if (struct.isSetIndexIds()) {
oprot.writeFieldBegin(INDEX_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.index_ids.size()));
for (long _iter450 : struct.index_ids)
{
oprot.writeI64(_iter450);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.partition_names != null) {
if (struct.isSetPartitionNames()) {
oprot.writeFieldBegin(PARTITION_NAMES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.partition_names.size()));
for (java.util.Map.Entry<java.lang.Long, java.lang.String> _iter451 : struct.partition_names.entrySet())
{
oprot.writeI64(_iter451.getKey());
oprot.writeString(_iter451.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.tablets != null) {
if (struct.isSetTablets()) {
oprot.writeFieldBegin(TABLETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tablets.size()));
for (TIndexDiskUsageTablet _iter452 : struct.tablets)
{
_iter452.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.materialized_index_names != null) {
if (struct.isSetMaterializedIndexNames()) {
oprot.writeFieldBegin(MATERIALIZED_INDEX_NAMES_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, struct.materialized_index_names.size()));
for (java.util.Map.Entry<java.lang.Long, java.lang.String> _iter453 : struct.materialized_index_names.entrySet())
{
oprot.writeI64(_iter453.getKey());
oprot.writeString(_iter453.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TIndexDiskUsageMetadataParamsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TIndexDiskUsageMetadataParamsTupleScheme getScheme() {
return new TIndexDiskUsageMetadataParamsTupleScheme();
}
}
private static class TIndexDiskUsageMetadataParamsTupleScheme extends org.apache.thrift.scheme.TupleScheme<TIndexDiskUsageMetadataParams> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TIndexDiskUsageMetadataParams struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetLevel()) {
optionals.set(0);
}
if (struct.isSetPositionDetail()) {
optionals.set(1);
}
if (struct.isSetIndexIds()) {
optionals.set(2);
}
if (struct.isSetPartitionNames()) {
optionals.set(3);
}
if (struct.isSetTablets()) {
optionals.set(4);
}
if (struct.isSetMaterializedIndexNames()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetLevel()) {
oprot.writeString(struct.level);
}
if (struct.isSetPositionDetail()) {
oprot.writeBool(struct.position_detail);
}
if (struct.isSetIndexIds()) {
{
oprot.writeI32(struct.index_ids.size());
for (long _iter454 : struct.index_ids)
{
oprot.writeI64(_iter454);
}
}
}
if (struct.isSetPartitionNames()) {
{
oprot.writeI32(struct.partition_names.size());
for (java.util.Map.Entry<java.lang.Long, java.lang.String> _iter455 : struct.partition_names.entrySet())
{
oprot.writeI64(_iter455.getKey());
oprot.writeString(_iter455.getValue());
}
}
}
if (struct.isSetTablets()) {
{
oprot.writeI32(struct.tablets.size());
for (TIndexDiskUsageTablet _iter456 : struct.tablets)
{
_iter456.write(oprot);
}
}
}
if (struct.isSetMaterializedIndexNames()) {
{
oprot.writeI32(struct.materialized_index_names.size());
for (java.util.Map.Entry<java.lang.Long, java.lang.String> _iter457 : struct.materialized_index_names.entrySet())
{
oprot.writeI64(_iter457.getKey());
oprot.writeString(_iter457.getValue());
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TIndexDiskUsageMetadataParams struct) throws org.apache.thrift.TException {
prot.incrementRecursionDepth();
try {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.level = iprot.readString();
struct.setLevelIsSet(true);
}
if (incoming.get(1)) {
struct.position_detail = iprot.readBool();
struct.setPositionDetailIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list458 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.index_ids = new java.util.ArrayList<java.lang.Long>(_list458.size);
long _elem459;
for (int _i460 = 0; _i460 < _list458.size; ++_i460)
{
_elem459 = iprot.readI64();
struct.index_ids.add(_elem459);
}
}
struct.setIndexIdsIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TMap _map461 = iprot.readMapBegin(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING);
struct.partition_names = new java.util.HashMap<java.lang.Long,java.lang.String>(2*_map461.size);
long _key462;
@org.apache.thrift.annotation.Nullable java.lang.String _val463;
for (int _i464 = 0; _i464 < _map461.size; ++_i464)
{
_key462 = iprot.readI64();
_val463 = iprot.readString();
struct.partition_names.put(_key462, _val463);
}
}
struct.setPartitionNamesIsSet(true);
}
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list465 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.tablets = new java.util.ArrayList<TIndexDiskUsageTablet>(_list465.size);
@org.apache.thrift.annotation.Nullable TIndexDiskUsageTablet _elem466;
for (int _i467 = 0; _i467 < _list465.size; ++_i467)
{
_elem466 = new TIndexDiskUsageTablet();
_elem466.read(iprot);
struct.tablets.add(_elem466);
}
}
struct.setTabletsIsSet(true);
}
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TMap _map468 = iprot.readMapBegin(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING);
struct.materialized_index_names = new java.util.HashMap<java.lang.Long,java.lang.String>(2*_map468.size);
long _key469;
@org.apache.thrift.annotation.Nullable java.lang.String _val470;
for (int _i471 = 0; _i471 < _map468.size; ++_i471)
{
_key469 = iprot.readI64();
_val470 = iprot.readString();
struct.materialized_index_names.put(_key469, _val470);
}
}
struct.setMaterializedIndexNamesIsSet(true);
}
} finally {
prot.decrementRecursionDepth();
}
}
}
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();
}
}