THivePartitionUpdate.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 THivePartitionUpdate implements org.apache.thrift.TBase<THivePartitionUpdate, THivePartitionUpdate._Fields>, java.io.Serializable, Cloneable, Comparable<THivePartitionUpdate> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THivePartitionUpdate");
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField UPDATE_MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("update_mode", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField LOCATION_FIELD_DESC = new org.apache.thrift.protocol.TField("location", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField FILE_NAMES_FIELD_DESC = new org.apache.thrift.protocol.TField("file_names", org.apache.thrift.protocol.TType.LIST, (short)4);
private static final org.apache.thrift.protocol.TField ROW_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("row_count", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField FILE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("file_size", org.apache.thrift.protocol.TType.I64, (short)6);
private static final org.apache.thrift.protocol.TField S3_MPU_PENDING_UPLOADS_FIELD_DESC = new org.apache.thrift.protocol.TField("s3_mpu_pending_uploads", org.apache.thrift.protocol.TType.LIST, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new THivePartitionUpdateStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new THivePartitionUpdateTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String name; // optional
/**
*
* @see TUpdateMode
*/
public @org.apache.thrift.annotation.Nullable TUpdateMode update_mode; // optional
public @org.apache.thrift.annotation.Nullable THiveLocationParams location; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> file_names; // optional
public long row_count; // optional
public long file_size; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<TS3MPUPendingUpload> s3_mpu_pending_uploads; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
NAME((short)1, "name"),
/**
*
* @see TUpdateMode
*/
UPDATE_MODE((short)2, "update_mode"),
LOCATION((short)3, "location"),
FILE_NAMES((short)4, "file_names"),
ROW_COUNT((short)5, "row_count"),
FILE_SIZE((short)6, "file_size"),
S3_MPU_PENDING_UPLOADS((short)7, "s3_mpu_pending_uploads");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // NAME
return NAME;
case 2: // UPDATE_MODE
return UPDATE_MODE;
case 3: // LOCATION
return LOCATION;
case 4: // FILE_NAMES
return FILE_NAMES;
case 5: // ROW_COUNT
return ROW_COUNT;
case 6: // FILE_SIZE
return FILE_SIZE;
case 7: // S3_MPU_PENDING_UPLOADS
return S3_MPU_PENDING_UPLOADS;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ROW_COUNT_ISSET_ID = 0;
private static final int __FILE_SIZE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NAME,_Fields.UPDATE_MODE,_Fields.LOCATION,_Fields.FILE_NAMES,_Fields.ROW_COUNT,_Fields.FILE_SIZE,_Fields.S3_MPU_PENDING_UPLOADS};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.UPDATE_MODE, new org.apache.thrift.meta_data.FieldMetaData("update_mode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TUpdateMode.class)));
tmpMap.put(_Fields.LOCATION, new org.apache.thrift.meta_data.FieldMetaData("location", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THiveLocationParams.class)));
tmpMap.put(_Fields.FILE_NAMES, new org.apache.thrift.meta_data.FieldMetaData("file_names", 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.STRING))));
tmpMap.put(_Fields.ROW_COUNT, new org.apache.thrift.meta_data.FieldMetaData("row_count", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.FILE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("file_size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.S3_MPU_PENDING_UPLOADS, new org.apache.thrift.meta_data.FieldMetaData("s3_mpu_pending_uploads", 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, TS3MPUPendingUpload.class))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(THivePartitionUpdate.class, metaDataMap);
}
public THivePartitionUpdate() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public THivePartitionUpdate(THivePartitionUpdate other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetName()) {
this.name = other.name;
}
if (other.isSetUpdateMode()) {
this.update_mode = other.update_mode;
}
if (other.isSetLocation()) {
this.location = new THiveLocationParams(other.location);
}
if (other.isSetFileNames()) {
java.util.List<java.lang.String> __this__file_names = new java.util.ArrayList<java.lang.String>(other.file_names);
this.file_names = __this__file_names;
}
this.row_count = other.row_count;
this.file_size = other.file_size;
if (other.isSetS3MpuPendingUploads()) {
java.util.List<TS3MPUPendingUpload> __this__s3_mpu_pending_uploads = new java.util.ArrayList<TS3MPUPendingUpload>(other.s3_mpu_pending_uploads.size());
for (TS3MPUPendingUpload other_element : other.s3_mpu_pending_uploads) {
__this__s3_mpu_pending_uploads.add(new TS3MPUPendingUpload(other_element));
}
this.s3_mpu_pending_uploads = __this__s3_mpu_pending_uploads;
}
}
public THivePartitionUpdate deepCopy() {
return new THivePartitionUpdate(this);
}
@Override
public void clear() {
this.name = null;
this.update_mode = null;
this.location = null;
this.file_names = null;
setRowCountIsSet(false);
this.row_count = 0;
setFileSizeIsSet(false);
this.file_size = 0;
this.s3_mpu_pending_uploads = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getName() {
return this.name;
}
public THivePartitionUpdate setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
this.name = name;
return this;
}
public void unsetName() {
this.name = null;
}
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
public void setNameIsSet(boolean value) {
if (!value) {
this.name = null;
}
}
/**
*
* @see TUpdateMode
*/
@org.apache.thrift.annotation.Nullable
public TUpdateMode getUpdateMode() {
return this.update_mode;
}
/**
*
* @see TUpdateMode
*/
public THivePartitionUpdate setUpdateMode(@org.apache.thrift.annotation.Nullable TUpdateMode update_mode) {
this.update_mode = update_mode;
return this;
}
public void unsetUpdateMode() {
this.update_mode = null;
}
/** Returns true if field update_mode is set (has been assigned a value) and false otherwise */
public boolean isSetUpdateMode() {
return this.update_mode != null;
}
public void setUpdateModeIsSet(boolean value) {
if (!value) {
this.update_mode = null;
}
}
@org.apache.thrift.annotation.Nullable
public THiveLocationParams getLocation() {
return this.location;
}
public THivePartitionUpdate setLocation(@org.apache.thrift.annotation.Nullable THiveLocationParams location) {
this.location = location;
return this;
}
public void unsetLocation() {
this.location = null;
}
/** Returns true if field location is set (has been assigned a value) and false otherwise */
public boolean isSetLocation() {
return this.location != null;
}
public void setLocationIsSet(boolean value) {
if (!value) {
this.location = null;
}
}
public int getFileNamesSize() {
return (this.file_names == null) ? 0 : this.file_names.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.String> getFileNamesIterator() {
return (this.file_names == null) ? null : this.file_names.iterator();
}
public void addToFileNames(java.lang.String elem) {
if (this.file_names == null) {
this.file_names = new java.util.ArrayList<java.lang.String>();
}
this.file_names.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.String> getFileNames() {
return this.file_names;
}
public THivePartitionUpdate setFileNames(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> file_names) {
this.file_names = file_names;
return this;
}
public void unsetFileNames() {
this.file_names = null;
}
/** Returns true if field file_names is set (has been assigned a value) and false otherwise */
public boolean isSetFileNames() {
return this.file_names != null;
}
public void setFileNamesIsSet(boolean value) {
if (!value) {
this.file_names = null;
}
}
public long getRowCount() {
return this.row_count;
}
public THivePartitionUpdate setRowCount(long row_count) {
this.row_count = row_count;
setRowCountIsSet(true);
return this;
}
public void unsetRowCount() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ROW_COUNT_ISSET_ID);
}
/** Returns true if field row_count is set (has been assigned a value) and false otherwise */
public boolean isSetRowCount() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ROW_COUNT_ISSET_ID);
}
public void setRowCountIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ROW_COUNT_ISSET_ID, value);
}
public long getFileSize() {
return this.file_size;
}
public THivePartitionUpdate setFileSize(long file_size) {
this.file_size = file_size;
setFileSizeIsSet(true);
return this;
}
public void unsetFileSize() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FILE_SIZE_ISSET_ID);
}
/** Returns true if field file_size is set (has been assigned a value) and false otherwise */
public boolean isSetFileSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILE_SIZE_ISSET_ID);
}
public void setFileSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILE_SIZE_ISSET_ID, value);
}
public int getS3MpuPendingUploadsSize() {
return (this.s3_mpu_pending_uploads == null) ? 0 : this.s3_mpu_pending_uploads.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TS3MPUPendingUpload> getS3MpuPendingUploadsIterator() {
return (this.s3_mpu_pending_uploads == null) ? null : this.s3_mpu_pending_uploads.iterator();
}
public void addToS3MpuPendingUploads(TS3MPUPendingUpload elem) {
if (this.s3_mpu_pending_uploads == null) {
this.s3_mpu_pending_uploads = new java.util.ArrayList<TS3MPUPendingUpload>();
}
this.s3_mpu_pending_uploads.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TS3MPUPendingUpload> getS3MpuPendingUploads() {
return this.s3_mpu_pending_uploads;
}
public THivePartitionUpdate setS3MpuPendingUploads(@org.apache.thrift.annotation.Nullable java.util.List<TS3MPUPendingUpload> s3_mpu_pending_uploads) {
this.s3_mpu_pending_uploads = s3_mpu_pending_uploads;
return this;
}
public void unsetS3MpuPendingUploads() {
this.s3_mpu_pending_uploads = null;
}
/** Returns true if field s3_mpu_pending_uploads is set (has been assigned a value) and false otherwise */
public boolean isSetS3MpuPendingUploads() {
return this.s3_mpu_pending_uploads != null;
}
public void setS3MpuPendingUploadsIsSet(boolean value) {
if (!value) {
this.s3_mpu_pending_uploads = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NAME:
if (value == null) {
unsetName();
} else {
setName((java.lang.String)value);
}
break;
case UPDATE_MODE:
if (value == null) {
unsetUpdateMode();
} else {
setUpdateMode((TUpdateMode)value);
}
break;
case LOCATION:
if (value == null) {
unsetLocation();
} else {
setLocation((THiveLocationParams)value);
}
break;
case FILE_NAMES:
if (value == null) {
unsetFileNames();
} else {
setFileNames((java.util.List<java.lang.String>)value);
}
break;
case ROW_COUNT:
if (value == null) {
unsetRowCount();
} else {
setRowCount((java.lang.Long)value);
}
break;
case FILE_SIZE:
if (value == null) {
unsetFileSize();
} else {
setFileSize((java.lang.Long)value);
}
break;
case S3_MPU_PENDING_UPLOADS:
if (value == null) {
unsetS3MpuPendingUploads();
} else {
setS3MpuPendingUploads((java.util.List<TS3MPUPendingUpload>)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NAME:
return getName();
case UPDATE_MODE:
return getUpdateMode();
case LOCATION:
return getLocation();
case FILE_NAMES:
return getFileNames();
case ROW_COUNT:
return getRowCount();
case FILE_SIZE:
return getFileSize();
case S3_MPU_PENDING_UPLOADS:
return getS3MpuPendingUploads();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case NAME:
return isSetName();
case UPDATE_MODE:
return isSetUpdateMode();
case LOCATION:
return isSetLocation();
case FILE_NAMES:
return isSetFileNames();
case ROW_COUNT:
return isSetRowCount();
case FILE_SIZE:
return isSetFileSize();
case S3_MPU_PENDING_UPLOADS:
return isSetS3MpuPendingUploads();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof THivePartitionUpdate)
return this.equals((THivePartitionUpdate)that);
return false;
}
public boolean equals(THivePartitionUpdate that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
if (!this.name.equals(that.name))
return false;
}
boolean this_present_update_mode = true && this.isSetUpdateMode();
boolean that_present_update_mode = true && that.isSetUpdateMode();
if (this_present_update_mode || that_present_update_mode) {
if (!(this_present_update_mode && that_present_update_mode))
return false;
if (!this.update_mode.equals(that.update_mode))
return false;
}
boolean this_present_location = true && this.isSetLocation();
boolean that_present_location = true && that.isSetLocation();
if (this_present_location || that_present_location) {
if (!(this_present_location && that_present_location))
return false;
if (!this.location.equals(that.location))
return false;
}
boolean this_present_file_names = true && this.isSetFileNames();
boolean that_present_file_names = true && that.isSetFileNames();
if (this_present_file_names || that_present_file_names) {
if (!(this_present_file_names && that_present_file_names))
return false;
if (!this.file_names.equals(that.file_names))
return false;
}
boolean this_present_row_count = true && this.isSetRowCount();
boolean that_present_row_count = true && that.isSetRowCount();
if (this_present_row_count || that_present_row_count) {
if (!(this_present_row_count && that_present_row_count))
return false;
if (this.row_count != that.row_count)
return false;
}
boolean this_present_file_size = true && this.isSetFileSize();
boolean that_present_file_size = true && that.isSetFileSize();
if (this_present_file_size || that_present_file_size) {
if (!(this_present_file_size && that_present_file_size))
return false;
if (this.file_size != that.file_size)
return false;
}
boolean this_present_s3_mpu_pending_uploads = true && this.isSetS3MpuPendingUploads();
boolean that_present_s3_mpu_pending_uploads = true && that.isSetS3MpuPendingUploads();
if (this_present_s3_mpu_pending_uploads || that_present_s3_mpu_pending_uploads) {
if (!(this_present_s3_mpu_pending_uploads && that_present_s3_mpu_pending_uploads))
return false;
if (!this.s3_mpu_pending_uploads.equals(that.s3_mpu_pending_uploads))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
if (isSetName())
hashCode = hashCode * 8191 + name.hashCode();
hashCode = hashCode * 8191 + ((isSetUpdateMode()) ? 131071 : 524287);
if (isSetUpdateMode())
hashCode = hashCode * 8191 + update_mode.getValue();
hashCode = hashCode * 8191 + ((isSetLocation()) ? 131071 : 524287);
if (isSetLocation())
hashCode = hashCode * 8191 + location.hashCode();
hashCode = hashCode * 8191 + ((isSetFileNames()) ? 131071 : 524287);
if (isSetFileNames())
hashCode = hashCode * 8191 + file_names.hashCode();
hashCode = hashCode * 8191 + ((isSetRowCount()) ? 131071 : 524287);
if (isSetRowCount())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(row_count);
hashCode = hashCode * 8191 + ((isSetFileSize()) ? 131071 : 524287);
if (isSetFileSize())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(file_size);
hashCode = hashCode * 8191 + ((isSetS3MpuPendingUploads()) ? 131071 : 524287);
if (isSetS3MpuPendingUploads())
hashCode = hashCode * 8191 + s3_mpu_pending_uploads.hashCode();
return hashCode;
}
@Override
public int compareTo(THivePartitionUpdate other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetName(), other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetUpdateMode(), other.isSetUpdateMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUpdateMode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.update_mode, other.update_mode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLocation(), other.isSetLocation());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLocation()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.location, other.location);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFileNames(), other.isSetFileNames());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileNames()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_names, other.file_names);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRowCount(), other.isSetRowCount());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRowCount()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row_count, other.row_count);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFileSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.file_size, other.file_size);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetS3MpuPendingUploads(), other.isSetS3MpuPendingUploads());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetS3MpuPendingUploads()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s3_mpu_pending_uploads, other.s3_mpu_pending_uploads);
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("THivePartitionUpdate(");
boolean first = true;
if (isSetName()) {
sb.append("name:");
if (this.name == null) {
sb.append("null");
} else {
sb.append(this.name);
}
first = false;
}
if (isSetUpdateMode()) {
if (!first) sb.append(", ");
sb.append("update_mode:");
if (this.update_mode == null) {
sb.append("null");
} else {
sb.append(this.update_mode);
}
first = false;
}
if (isSetLocation()) {
if (!first) sb.append(", ");
sb.append("location:");
if (this.location == null) {
sb.append("null");
} else {
sb.append(this.location);
}
first = false;
}
if (isSetFileNames()) {
if (!first) sb.append(", ");
sb.append("file_names:");
if (this.file_names == null) {
sb.append("null");
} else {
sb.append(this.file_names);
}
first = false;
}
if (isSetRowCount()) {
if (!first) sb.append(", ");
sb.append("row_count:");
sb.append(this.row_count);
first = false;
}
if (isSetFileSize()) {
if (!first) sb.append(", ");
sb.append("file_size:");
sb.append(this.file_size);
first = false;
}
if (isSetS3MpuPendingUploads()) {
if (!first) sb.append(", ");
sb.append("s3_mpu_pending_uploads:");
if (this.s3_mpu_pending_uploads == null) {
sb.append("null");
} else {
sb.append(this.s3_mpu_pending_uploads);
}
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 (location != null) {
location.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 {
// 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 THivePartitionUpdateStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THivePartitionUpdateStandardScheme getScheme() {
return new THivePartitionUpdateStandardScheme();
}
}
private static class THivePartitionUpdateStandardScheme extends org.apache.thrift.scheme.StandardScheme<THivePartitionUpdate> {
public void read(org.apache.thrift.protocol.TProtocol iprot, THivePartitionUpdate struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // UPDATE_MODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.update_mode = org.apache.doris.thrift.TUpdateMode.findByValue(iprot.readI32());
struct.setUpdateModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // LOCATION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.location = new THiveLocationParams();
struct.location.read(iprot);
struct.setLocationIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // FILE_NAMES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list202 = iprot.readListBegin();
struct.file_names = new java.util.ArrayList<java.lang.String>(_list202.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem203;
for (int _i204 = 0; _i204 < _list202.size; ++_i204)
{
_elem203 = iprot.readString();
struct.file_names.add(_elem203);
}
iprot.readListEnd();
}
struct.setFileNamesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // ROW_COUNT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.row_count = iprot.readI64();
struct.setRowCountIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // FILE_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.file_size = iprot.readI64();
struct.setFileSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // S3_MPU_PENDING_UPLOADS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list205 = iprot.readListBegin();
struct.s3_mpu_pending_uploads = new java.util.ArrayList<TS3MPUPendingUpload>(_list205.size);
@org.apache.thrift.annotation.Nullable TS3MPUPendingUpload _elem206;
for (int _i207 = 0; _i207 < _list205.size; ++_i207)
{
_elem206 = new TS3MPUPendingUpload();
_elem206.read(iprot);
struct.s3_mpu_pending_uploads.add(_elem206);
}
iprot.readListEnd();
}
struct.setS3MpuPendingUploadsIsSet(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, THivePartitionUpdate struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.name != null) {
if (struct.isSetName()) {
oprot.writeFieldBegin(NAME_FIELD_DESC);
oprot.writeString(struct.name);
oprot.writeFieldEnd();
}
}
if (struct.update_mode != null) {
if (struct.isSetUpdateMode()) {
oprot.writeFieldBegin(UPDATE_MODE_FIELD_DESC);
oprot.writeI32(struct.update_mode.getValue());
oprot.writeFieldEnd();
}
}
if (struct.location != null) {
if (struct.isSetLocation()) {
oprot.writeFieldBegin(LOCATION_FIELD_DESC);
struct.location.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.file_names != null) {
if (struct.isSetFileNames()) {
oprot.writeFieldBegin(FILE_NAMES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.file_names.size()));
for (java.lang.String _iter208 : struct.file_names)
{
oprot.writeString(_iter208);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetRowCount()) {
oprot.writeFieldBegin(ROW_COUNT_FIELD_DESC);
oprot.writeI64(struct.row_count);
oprot.writeFieldEnd();
}
if (struct.isSetFileSize()) {
oprot.writeFieldBegin(FILE_SIZE_FIELD_DESC);
oprot.writeI64(struct.file_size);
oprot.writeFieldEnd();
}
if (struct.s3_mpu_pending_uploads != null) {
if (struct.isSetS3MpuPendingUploads()) {
oprot.writeFieldBegin(S3_MPU_PENDING_UPLOADS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.s3_mpu_pending_uploads.size()));
for (TS3MPUPendingUpload _iter209 : struct.s3_mpu_pending_uploads)
{
_iter209.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class THivePartitionUpdateTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THivePartitionUpdateTupleScheme getScheme() {
return new THivePartitionUpdateTupleScheme();
}
}
private static class THivePartitionUpdateTupleScheme extends org.apache.thrift.scheme.TupleScheme<THivePartitionUpdate> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, THivePartitionUpdate 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.isSetName()) {
optionals.set(0);
}
if (struct.isSetUpdateMode()) {
optionals.set(1);
}
if (struct.isSetLocation()) {
optionals.set(2);
}
if (struct.isSetFileNames()) {
optionals.set(3);
}
if (struct.isSetRowCount()) {
optionals.set(4);
}
if (struct.isSetFileSize()) {
optionals.set(5);
}
if (struct.isSetS3MpuPendingUploads()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
if (struct.isSetUpdateMode()) {
oprot.writeI32(struct.update_mode.getValue());
}
if (struct.isSetLocation()) {
struct.location.write(oprot);
}
if (struct.isSetFileNames()) {
{
oprot.writeI32(struct.file_names.size());
for (java.lang.String _iter210 : struct.file_names)
{
oprot.writeString(_iter210);
}
}
}
if (struct.isSetRowCount()) {
oprot.writeI64(struct.row_count);
}
if (struct.isSetFileSize()) {
oprot.writeI64(struct.file_size);
}
if (struct.isSetS3MpuPendingUploads()) {
{
oprot.writeI32(struct.s3_mpu_pending_uploads.size());
for (TS3MPUPendingUpload _iter211 : struct.s3_mpu_pending_uploads)
{
_iter211.write(oprot);
}
}
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, THivePartitionUpdate struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
}
if (incoming.get(1)) {
struct.update_mode = org.apache.doris.thrift.TUpdateMode.findByValue(iprot.readI32());
struct.setUpdateModeIsSet(true);
}
if (incoming.get(2)) {
struct.location = new THiveLocationParams();
struct.location.read(iprot);
struct.setLocationIsSet(true);
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list212 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.file_names = new java.util.ArrayList<java.lang.String>(_list212.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem213;
for (int _i214 = 0; _i214 < _list212.size; ++_i214)
{
_elem213 = iprot.readString();
struct.file_names.add(_elem213);
}
}
struct.setFileNamesIsSet(true);
}
if (incoming.get(4)) {
struct.row_count = iprot.readI64();
struct.setRowCountIsSet(true);
}
if (incoming.get(5)) {
struct.file_size = iprot.readI64();
struct.setFileSizeIsSet(true);
}
if (incoming.get(6)) {
{
org.apache.thrift.protocol.TList _list215 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.s3_mpu_pending_uploads = new java.util.ArrayList<TS3MPUPendingUpload>(_list215.size);
@org.apache.thrift.annotation.Nullable TS3MPUPendingUpload _elem216;
for (int _i217 = 0; _i217 < _list215.size; ++_i217)
{
_elem216 = new TS3MPUPendingUpload();
_elem216.read(iprot);
struct.s3_mpu_pending_uploads.add(_elem216);
}
}
struct.setS3MpuPendingUploadsIsSet(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();
}
}