TCreatePartitionResult.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 TCreatePartitionResult implements org.apache.thrift.TBase<TCreatePartitionResult, TCreatePartitionResult._Fields>, java.io.Serializable, Cloneable, Comparable<TCreatePartitionResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCreatePartitionResult");
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField PARTITIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("partitions", org.apache.thrift.protocol.TType.LIST, (short)2);
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)3);
private static final org.apache.thrift.protocol.TField NODES_FIELD_DESC = new org.apache.thrift.protocol.TField("nodes", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField SLAVE_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("slave_tablets", org.apache.thrift.protocol.TType.LIST, (short)5);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TCreatePartitionResultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TCreatePartitionResultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTablePartition> partitions; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TTabletLocation> tablets; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNodeInfo> nodes; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TTabletLocation> slave_tablets; // 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 {
STATUS((short)1, "status"),
PARTITIONS((short)2, "partitions"),
TABLETS((short)3, "tablets"),
NODES((short)4, "nodes"),
SLAVE_TABLETS((short)5, "slave_tablets");
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: // STATUS
return STATUS;
case 2: // PARTITIONS
return PARTITIONS;
case 3: // TABLETS
return TABLETS;
case 4: // NODES
return NODES;
case 5: // SLAVE_TABLETS
return SLAVE_TABLETS;
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 _Fields optionals[] = {_Fields.STATUS,_Fields.PARTITIONS,_Fields.TABLETS,_Fields.NODES,_Fields.SLAVE_TABLETS};
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.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TStatus.class)));
tmpMap.put(_Fields.PARTITIONS, new org.apache.thrift.meta_data.FieldMetaData("partitions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TOlapTablePartition.class))));
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, org.apache.doris.thrift.TTabletLocation.class))));
tmpMap.put(_Fields.NODES, new org.apache.thrift.meta_data.FieldMetaData("nodes", 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, org.apache.doris.thrift.TNodeInfo.class))));
tmpMap.put(_Fields.SLAVE_TABLETS, new org.apache.thrift.meta_data.FieldMetaData("slave_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, org.apache.doris.thrift.TTabletLocation.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCreatePartitionResult.class, metaDataMap);
}
public TCreatePartitionResult() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TCreatePartitionResult(TCreatePartitionResult other) {
if (other.isSetStatus()) {
this.status = new org.apache.doris.thrift.TStatus(other.status);
}
if (other.isSetPartitions()) {
java.util.List<org.apache.doris.thrift.TOlapTablePartition> __this__partitions = new java.util.ArrayList<org.apache.doris.thrift.TOlapTablePartition>(other.partitions.size());
for (org.apache.doris.thrift.TOlapTablePartition other_element : other.partitions) {
__this__partitions.add(new org.apache.doris.thrift.TOlapTablePartition(other_element));
}
this.partitions = __this__partitions;
}
if (other.isSetTablets()) {
java.util.List<org.apache.doris.thrift.TTabletLocation> __this__tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>(other.tablets.size());
for (org.apache.doris.thrift.TTabletLocation other_element : other.tablets) {
__this__tablets.add(new org.apache.doris.thrift.TTabletLocation(other_element));
}
this.tablets = __this__tablets;
}
if (other.isSetNodes()) {
java.util.List<org.apache.doris.thrift.TNodeInfo> __this__nodes = new java.util.ArrayList<org.apache.doris.thrift.TNodeInfo>(other.nodes.size());
for (org.apache.doris.thrift.TNodeInfo other_element : other.nodes) {
__this__nodes.add(new org.apache.doris.thrift.TNodeInfo(other_element));
}
this.nodes = __this__nodes;
}
if (other.isSetSlaveTablets()) {
java.util.List<org.apache.doris.thrift.TTabletLocation> __this__slave_tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>(other.slave_tablets.size());
for (org.apache.doris.thrift.TTabletLocation other_element : other.slave_tablets) {
__this__slave_tablets.add(new org.apache.doris.thrift.TTabletLocation(other_element));
}
this.slave_tablets = __this__slave_tablets;
}
}
public TCreatePartitionResult deepCopy() {
return new TCreatePartitionResult(this);
}
@Override
public void clear() {
this.status = null;
this.partitions = null;
this.tablets = null;
this.nodes = null;
this.slave_tablets = null;
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TStatus getStatus() {
return this.status;
}
public TCreatePartitionResult setStatus(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TStatus status) {
this.status = status;
return this;
}
public void unsetStatus() {
this.status = null;
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
return this.status != null;
}
public void setStatusIsSet(boolean value) {
if (!value) {
this.status = null;
}
}
public int getPartitionsSize() {
return (this.partitions == null) ? 0 : this.partitions.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TOlapTablePartition> getPartitionsIterator() {
return (this.partitions == null) ? null : this.partitions.iterator();
}
public void addToPartitions(org.apache.doris.thrift.TOlapTablePartition elem) {
if (this.partitions == null) {
this.partitions = new java.util.ArrayList<org.apache.doris.thrift.TOlapTablePartition>();
}
this.partitions.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TOlapTablePartition> getPartitions() {
return this.partitions;
}
public TCreatePartitionResult setPartitions(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TOlapTablePartition> partitions) {
this.partitions = partitions;
return this;
}
public void unsetPartitions() {
this.partitions = null;
}
/** Returns true if field partitions is set (has been assigned a value) and false otherwise */
public boolean isSetPartitions() {
return this.partitions != null;
}
public void setPartitionsIsSet(boolean value) {
if (!value) {
this.partitions = null;
}
}
public int getTabletsSize() {
return (this.tablets == null) ? 0 : this.tablets.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TTabletLocation> getTabletsIterator() {
return (this.tablets == null) ? null : this.tablets.iterator();
}
public void addToTablets(org.apache.doris.thrift.TTabletLocation elem) {
if (this.tablets == null) {
this.tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>();
}
this.tablets.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TTabletLocation> getTablets() {
return this.tablets;
}
public TCreatePartitionResult setTablets(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TTabletLocation> 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 getNodesSize() {
return (this.nodes == null) ? 0 : this.nodes.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TNodeInfo> getNodesIterator() {
return (this.nodes == null) ? null : this.nodes.iterator();
}
public void addToNodes(org.apache.doris.thrift.TNodeInfo elem) {
if (this.nodes == null) {
this.nodes = new java.util.ArrayList<org.apache.doris.thrift.TNodeInfo>();
}
this.nodes.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TNodeInfo> getNodes() {
return this.nodes;
}
public TCreatePartitionResult setNodes(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TNodeInfo> nodes) {
this.nodes = nodes;
return this;
}
public void unsetNodes() {
this.nodes = null;
}
/** Returns true if field nodes is set (has been assigned a value) and false otherwise */
public boolean isSetNodes() {
return this.nodes != null;
}
public void setNodesIsSet(boolean value) {
if (!value) {
this.nodes = null;
}
}
public int getSlaveTabletsSize() {
return (this.slave_tablets == null) ? 0 : this.slave_tablets.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<org.apache.doris.thrift.TTabletLocation> getSlaveTabletsIterator() {
return (this.slave_tablets == null) ? null : this.slave_tablets.iterator();
}
public void addToSlaveTablets(org.apache.doris.thrift.TTabletLocation elem) {
if (this.slave_tablets == null) {
this.slave_tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>();
}
this.slave_tablets.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<org.apache.doris.thrift.TTabletLocation> getSlaveTablets() {
return this.slave_tablets;
}
public TCreatePartitionResult setSlaveTablets(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.doris.thrift.TTabletLocation> slave_tablets) {
this.slave_tablets = slave_tablets;
return this;
}
public void unsetSlaveTablets() {
this.slave_tablets = null;
}
/** Returns true if field slave_tablets is set (has been assigned a value) and false otherwise */
public boolean isSetSlaveTablets() {
return this.slave_tablets != null;
}
public void setSlaveTabletsIsSet(boolean value) {
if (!value) {
this.slave_tablets = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((org.apache.doris.thrift.TStatus)value);
}
break;
case PARTITIONS:
if (value == null) {
unsetPartitions();
} else {
setPartitions((java.util.List<org.apache.doris.thrift.TOlapTablePartition>)value);
}
break;
case TABLETS:
if (value == null) {
unsetTablets();
} else {
setTablets((java.util.List<org.apache.doris.thrift.TTabletLocation>)value);
}
break;
case NODES:
if (value == null) {
unsetNodes();
} else {
setNodes((java.util.List<org.apache.doris.thrift.TNodeInfo>)value);
}
break;
case SLAVE_TABLETS:
if (value == null) {
unsetSlaveTablets();
} else {
setSlaveTablets((java.util.List<org.apache.doris.thrift.TTabletLocation>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return getStatus();
case PARTITIONS:
return getPartitions();
case TABLETS:
return getTablets();
case NODES:
return getNodes();
case SLAVE_TABLETS:
return getSlaveTablets();
}
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 STATUS:
return isSetStatus();
case PARTITIONS:
return isSetPartitions();
case TABLETS:
return isSetTablets();
case NODES:
return isSetNodes();
case SLAVE_TABLETS:
return isSetSlaveTablets();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TCreatePartitionResult)
return this.equals((TCreatePartitionResult)that);
return false;
}
public boolean equals(TCreatePartitionResult that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_status = true && this.isSetStatus();
boolean that_present_status = true && that.isSetStatus();
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status))
return false;
if (!this.status.equals(that.status))
return false;
}
boolean this_present_partitions = true && this.isSetPartitions();
boolean that_present_partitions = true && that.isSetPartitions();
if (this_present_partitions || that_present_partitions) {
if (!(this_present_partitions && that_present_partitions))
return false;
if (!this.partitions.equals(that.partitions))
return false;
}
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_nodes = true && this.isSetNodes();
boolean that_present_nodes = true && that.isSetNodes();
if (this_present_nodes || that_present_nodes) {
if (!(this_present_nodes && that_present_nodes))
return false;
if (!this.nodes.equals(that.nodes))
return false;
}
boolean this_present_slave_tablets = true && this.isSetSlaveTablets();
boolean that_present_slave_tablets = true && that.isSetSlaveTablets();
if (this_present_slave_tablets || that_present_slave_tablets) {
if (!(this_present_slave_tablets && that_present_slave_tablets))
return false;
if (!this.slave_tablets.equals(that.slave_tablets))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
if (isSetStatus())
hashCode = hashCode * 8191 + status.hashCode();
hashCode = hashCode * 8191 + ((isSetPartitions()) ? 131071 : 524287);
if (isSetPartitions())
hashCode = hashCode * 8191 + partitions.hashCode();
hashCode = hashCode * 8191 + ((isSetTablets()) ? 131071 : 524287);
if (isSetTablets())
hashCode = hashCode * 8191 + tablets.hashCode();
hashCode = hashCode * 8191 + ((isSetNodes()) ? 131071 : 524287);
if (isSetNodes())
hashCode = hashCode * 8191 + nodes.hashCode();
hashCode = hashCode * 8191 + ((isSetSlaveTablets()) ? 131071 : 524287);
if (isSetSlaveTablets())
hashCode = hashCode * 8191 + slave_tablets.hashCode();
return hashCode;
}
@Override
public int compareTo(TCreatePartitionResult other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitions(), other.isSetPartitions());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitions()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partitions, other.partitions);
if (lastComparison != 0) {
return lastComparison;
}
}
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(isSetNodes(), other.isSetNodes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNodes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodes, other.nodes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSlaveTablets(), other.isSetSlaveTablets());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSlaveTablets()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.slave_tablets, other.slave_tablets);
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("TCreatePartitionResult(");
boolean first = true;
if (isSetStatus()) {
sb.append("status:");
if (this.status == null) {
sb.append("null");
} else {
sb.append(this.status);
}
first = false;
}
if (isSetPartitions()) {
if (!first) sb.append(", ");
sb.append("partitions:");
if (this.partitions == null) {
sb.append("null");
} else {
sb.append(this.partitions);
}
first = false;
}
if (isSetTablets()) {
if (!first) sb.append(", ");
sb.append("tablets:");
if (this.tablets == null) {
sb.append("null");
} else {
sb.append(this.tablets);
}
first = false;
}
if (isSetNodes()) {
if (!first) sb.append(", ");
sb.append("nodes:");
if (this.nodes == null) {
sb.append("null");
} else {
sb.append(this.nodes);
}
first = false;
}
if (isSetSlaveTablets()) {
if (!first) sb.append(", ");
sb.append("slave_tablets:");
if (this.slave_tablets == null) {
sb.append("null");
} else {
sb.append(this.slave_tablets);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (status != null) {
status.validate();
}
}
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 {
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 TCreatePartitionResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCreatePartitionResultStandardScheme getScheme() {
return new TCreatePartitionResultStandardScheme();
}
}
private static class TCreatePartitionResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TCreatePartitionResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TCreatePartitionResult 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: // STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.status = new org.apache.doris.thrift.TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PARTITIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list650 = iprot.readListBegin();
struct.partitions = new java.util.ArrayList<org.apache.doris.thrift.TOlapTablePartition>(_list650.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTablePartition _elem651;
for (int _i652 = 0; _i652 < _list650.size; ++_i652)
{
_elem651 = new org.apache.doris.thrift.TOlapTablePartition();
_elem651.read(iprot);
struct.partitions.add(_elem651);
}
iprot.readListEnd();
}
struct.setPartitionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TABLETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list653 = iprot.readListBegin();
struct.tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>(_list653.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TTabletLocation _elem654;
for (int _i655 = 0; _i655 < _list653.size; ++_i655)
{
_elem654 = new org.apache.doris.thrift.TTabletLocation();
_elem654.read(iprot);
struct.tablets.add(_elem654);
}
iprot.readListEnd();
}
struct.setTabletsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // NODES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list656 = iprot.readListBegin();
struct.nodes = new java.util.ArrayList<org.apache.doris.thrift.TNodeInfo>(_list656.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNodeInfo _elem657;
for (int _i658 = 0; _i658 < _list656.size; ++_i658)
{
_elem657 = new org.apache.doris.thrift.TNodeInfo();
_elem657.read(iprot);
struct.nodes.add(_elem657);
}
iprot.readListEnd();
}
struct.setNodesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // SLAVE_TABLETS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list659 = iprot.readListBegin();
struct.slave_tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>(_list659.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TTabletLocation _elem660;
for (int _i661 = 0; _i661 < _list659.size; ++_i661)
{
_elem660 = new org.apache.doris.thrift.TTabletLocation();
_elem660.read(iprot);
struct.slave_tablets.add(_elem660);
}
iprot.readListEnd();
}
struct.setSlaveTabletsIsSet(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, TCreatePartitionResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.status != null) {
if (struct.isSetStatus()) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
struct.status.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.partitions != null) {
if (struct.isSetPartitions()) {
oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
for (org.apache.doris.thrift.TOlapTablePartition _iter662 : struct.partitions)
{
_iter662.write(oprot);
}
oprot.writeListEnd();
}
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 (org.apache.doris.thrift.TTabletLocation _iter663 : struct.tablets)
{
_iter663.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.nodes != null) {
if (struct.isSetNodes()) {
oprot.writeFieldBegin(NODES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.nodes.size()));
for (org.apache.doris.thrift.TNodeInfo _iter664 : struct.nodes)
{
_iter664.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.slave_tablets != null) {
if (struct.isSetSlaveTablets()) {
oprot.writeFieldBegin(SLAVE_TABLETS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.slave_tablets.size()));
for (org.apache.doris.thrift.TTabletLocation _iter665 : struct.slave_tablets)
{
_iter665.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TCreatePartitionResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TCreatePartitionResultTupleScheme getScheme() {
return new TCreatePartitionResultTupleScheme();
}
}
private static class TCreatePartitionResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TCreatePartitionResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TCreatePartitionResult 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.isSetStatus()) {
optionals.set(0);
}
if (struct.isSetPartitions()) {
optionals.set(1);
}
if (struct.isSetTablets()) {
optionals.set(2);
}
if (struct.isSetNodes()) {
optionals.set(3);
}
if (struct.isSetSlaveTablets()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetStatus()) {
struct.status.write(oprot);
}
if (struct.isSetPartitions()) {
{
oprot.writeI32(struct.partitions.size());
for (org.apache.doris.thrift.TOlapTablePartition _iter666 : struct.partitions)
{
_iter666.write(oprot);
}
}
}
if (struct.isSetTablets()) {
{
oprot.writeI32(struct.tablets.size());
for (org.apache.doris.thrift.TTabletLocation _iter667 : struct.tablets)
{
_iter667.write(oprot);
}
}
}
if (struct.isSetNodes()) {
{
oprot.writeI32(struct.nodes.size());
for (org.apache.doris.thrift.TNodeInfo _iter668 : struct.nodes)
{
_iter668.write(oprot);
}
}
}
if (struct.isSetSlaveTablets()) {
{
oprot.writeI32(struct.slave_tablets.size());
for (org.apache.doris.thrift.TTabletLocation _iter669 : struct.slave_tablets)
{
_iter669.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TCreatePartitionResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.status = new org.apache.doris.thrift.TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list670 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.partitions = new java.util.ArrayList<org.apache.doris.thrift.TOlapTablePartition>(_list670.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TOlapTablePartition _elem671;
for (int _i672 = 0; _i672 < _list670.size; ++_i672)
{
_elem671 = new org.apache.doris.thrift.TOlapTablePartition();
_elem671.read(iprot);
struct.partitions.add(_elem671);
}
}
struct.setPartitionsIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list673 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>(_list673.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TTabletLocation _elem674;
for (int _i675 = 0; _i675 < _list673.size; ++_i675)
{
_elem674 = new org.apache.doris.thrift.TTabletLocation();
_elem674.read(iprot);
struct.tablets.add(_elem674);
}
}
struct.setTabletsIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list676 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.nodes = new java.util.ArrayList<org.apache.doris.thrift.TNodeInfo>(_list676.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TNodeInfo _elem677;
for (int _i678 = 0; _i678 < _list676.size; ++_i678)
{
_elem677 = new org.apache.doris.thrift.TNodeInfo();
_elem677.read(iprot);
struct.nodes.add(_elem677);
}
}
struct.setNodesIsSet(true);
}
if (incoming.get(4)) {
{
org.apache.thrift.protocol.TList _list679 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.slave_tablets = new java.util.ArrayList<org.apache.doris.thrift.TTabletLocation>(_list679.size);
@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TTabletLocation _elem680;
for (int _i681 = 0; _i681 < _list679.size; ++_i681)
{
_elem680 = new org.apache.doris.thrift.TTabletLocation();
_elem680.read(iprot);
struct.slave_tablets.add(_elem680);
}
}
struct.setSlaveTabletsIsSet(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();
}
}