TMCCommitData.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 TMCCommitData implements org.apache.thrift.TBase<TMCCommitData, TMCCommitData._Fields>, java.io.Serializable, Cloneable, Comparable<TMCCommitData> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMCCommitData");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("session_id", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PARTITION_SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("partition_spec", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField BLOCK_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("block_ids", org.apache.thrift.protocol.TType.LIST, (short)3);
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)4);
private static final org.apache.thrift.protocol.TField WRITTEN_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("written_bytes", org.apache.thrift.protocol.TType.I64, (short)5);
private static final org.apache.thrift.protocol.TField COMMIT_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("commit_message", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TMCCommitDataStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TMCCommitDataTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String session_id; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String partition_spec; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> block_ids; // optional
public long row_count; // optional
public long written_bytes; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String commit_message; // 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 {
SESSION_ID((short)1, "session_id"),
PARTITION_SPEC((short)2, "partition_spec"),
BLOCK_IDS((short)3, "block_ids"),
ROW_COUNT((short)4, "row_count"),
WRITTEN_BYTES((short)5, "written_bytes"),
COMMIT_MESSAGE((short)6, "commit_message");
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: // SESSION_ID
return SESSION_ID;
case 2: // PARTITION_SPEC
return PARTITION_SPEC;
case 3: // BLOCK_IDS
return BLOCK_IDS;
case 4: // ROW_COUNT
return ROW_COUNT;
case 5: // WRITTEN_BYTES
return WRITTEN_BYTES;
case 6: // COMMIT_MESSAGE
return COMMIT_MESSAGE;
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 __WRITTEN_BYTES_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.SESSION_ID,_Fields.PARTITION_SPEC,_Fields.BLOCK_IDS,_Fields.ROW_COUNT,_Fields.WRITTEN_BYTES,_Fields.COMMIT_MESSAGE};
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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("session_id", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PARTITION_SPEC, new org.apache.thrift.meta_data.FieldMetaData("partition_spec", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.BLOCK_IDS, new org.apache.thrift.meta_data.FieldMetaData("block_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.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.WRITTEN_BYTES, new org.apache.thrift.meta_data.FieldMetaData("written_bytes", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.COMMIT_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("commit_message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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(TMCCommitData.class, metaDataMap);
}
public TMCCommitData() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TMCCommitData(TMCCommitData other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetSessionId()) {
this.session_id = other.session_id;
}
if (other.isSetPartitionSpec()) {
this.partition_spec = other.partition_spec;
}
if (other.isSetBlockIds()) {
java.util.List<java.lang.Long> __this__block_ids = new java.util.ArrayList<java.lang.Long>(other.block_ids);
this.block_ids = __this__block_ids;
}
this.row_count = other.row_count;
this.written_bytes = other.written_bytes;
if (other.isSetCommitMessage()) {
this.commit_message = other.commit_message;
}
}
public TMCCommitData deepCopy() {
return new TMCCommitData(this);
}
@Override
public void clear() {
this.session_id = null;
this.partition_spec = null;
this.block_ids = null;
setRowCountIsSet(false);
this.row_count = 0;
setWrittenBytesIsSet(false);
this.written_bytes = 0;
this.commit_message = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getSessionId() {
return this.session_id;
}
public TMCCommitData setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String session_id) {
this.session_id = session_id;
return this;
}
public void unsetSessionId() {
this.session_id = null;
}
/** Returns true if field session_id is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return this.session_id != null;
}
public void setSessionIdIsSet(boolean value) {
if (!value) {
this.session_id = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getPartitionSpec() {
return this.partition_spec;
}
public TMCCommitData setPartitionSpec(@org.apache.thrift.annotation.Nullable java.lang.String partition_spec) {
this.partition_spec = partition_spec;
return this;
}
public void unsetPartitionSpec() {
this.partition_spec = null;
}
/** Returns true if field partition_spec is set (has been assigned a value) and false otherwise */
public boolean isSetPartitionSpec() {
return this.partition_spec != null;
}
public void setPartitionSpecIsSet(boolean value) {
if (!value) {
this.partition_spec = null;
}
}
public int getBlockIdsSize() {
return (this.block_ids == null) ? 0 : this.block_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getBlockIdsIterator() {
return (this.block_ids == null) ? null : this.block_ids.iterator();
}
public void addToBlockIds(long elem) {
if (this.block_ids == null) {
this.block_ids = new java.util.ArrayList<java.lang.Long>();
}
this.block_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getBlockIds() {
return this.block_ids;
}
public TMCCommitData setBlockIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> block_ids) {
this.block_ids = block_ids;
return this;
}
public void unsetBlockIds() {
this.block_ids = null;
}
/** Returns true if field block_ids is set (has been assigned a value) and false otherwise */
public boolean isSetBlockIds() {
return this.block_ids != null;
}
public void setBlockIdsIsSet(boolean value) {
if (!value) {
this.block_ids = null;
}
}
public long getRowCount() {
return this.row_count;
}
public TMCCommitData 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 getWrittenBytes() {
return this.written_bytes;
}
public TMCCommitData setWrittenBytes(long written_bytes) {
this.written_bytes = written_bytes;
setWrittenBytesIsSet(true);
return this;
}
public void unsetWrittenBytes() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WRITTEN_BYTES_ISSET_ID);
}
/** Returns true if field written_bytes is set (has been assigned a value) and false otherwise */
public boolean isSetWrittenBytes() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WRITTEN_BYTES_ISSET_ID);
}
public void setWrittenBytesIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WRITTEN_BYTES_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCommitMessage() {
return this.commit_message;
}
public TMCCommitData setCommitMessage(@org.apache.thrift.annotation.Nullable java.lang.String commit_message) {
this.commit_message = commit_message;
return this;
}
public void unsetCommitMessage() {
this.commit_message = null;
}
/** Returns true if field commit_message is set (has been assigned a value) and false otherwise */
public boolean isSetCommitMessage() {
return this.commit_message != null;
}
public void setCommitMessageIsSet(boolean value) {
if (!value) {
this.commit_message = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((java.lang.String)value);
}
break;
case PARTITION_SPEC:
if (value == null) {
unsetPartitionSpec();
} else {
setPartitionSpec((java.lang.String)value);
}
break;
case BLOCK_IDS:
if (value == null) {
unsetBlockIds();
} else {
setBlockIds((java.util.List<java.lang.Long>)value);
}
break;
case ROW_COUNT:
if (value == null) {
unsetRowCount();
} else {
setRowCount((java.lang.Long)value);
}
break;
case WRITTEN_BYTES:
if (value == null) {
unsetWrittenBytes();
} else {
setWrittenBytes((java.lang.Long)value);
}
break;
case COMMIT_MESSAGE:
if (value == null) {
unsetCommitMessage();
} else {
setCommitMessage((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case PARTITION_SPEC:
return getPartitionSpec();
case BLOCK_IDS:
return getBlockIds();
case ROW_COUNT:
return getRowCount();
case WRITTEN_BYTES:
return getWrittenBytes();
case COMMIT_MESSAGE:
return getCommitMessage();
}
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 SESSION_ID:
return isSetSessionId();
case PARTITION_SPEC:
return isSetPartitionSpec();
case BLOCK_IDS:
return isSetBlockIds();
case ROW_COUNT:
return isSetRowCount();
case WRITTEN_BYTES:
return isSetWrittenBytes();
case COMMIT_MESSAGE:
return isSetCommitMessage();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TMCCommitData)
return this.equals((TMCCommitData)that);
return false;
}
public boolean equals(TMCCommitData that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_session_id = true && this.isSetSessionId();
boolean that_present_session_id = true && that.isSetSessionId();
if (this_present_session_id || that_present_session_id) {
if (!(this_present_session_id && that_present_session_id))
return false;
if (!this.session_id.equals(that.session_id))
return false;
}
boolean this_present_partition_spec = true && this.isSetPartitionSpec();
boolean that_present_partition_spec = true && that.isSetPartitionSpec();
if (this_present_partition_spec || that_present_partition_spec) {
if (!(this_present_partition_spec && that_present_partition_spec))
return false;
if (!this.partition_spec.equals(that.partition_spec))
return false;
}
boolean this_present_block_ids = true && this.isSetBlockIds();
boolean that_present_block_ids = true && that.isSetBlockIds();
if (this_present_block_ids || that_present_block_ids) {
if (!(this_present_block_ids && that_present_block_ids))
return false;
if (!this.block_ids.equals(that.block_ids))
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_written_bytes = true && this.isSetWrittenBytes();
boolean that_present_written_bytes = true && that.isSetWrittenBytes();
if (this_present_written_bytes || that_present_written_bytes) {
if (!(this_present_written_bytes && that_present_written_bytes))
return false;
if (this.written_bytes != that.written_bytes)
return false;
}
boolean this_present_commit_message = true && this.isSetCommitMessage();
boolean that_present_commit_message = true && that.isSetCommitMessage();
if (this_present_commit_message || that_present_commit_message) {
if (!(this_present_commit_message && that_present_commit_message))
return false;
if (!this.commit_message.equals(that.commit_message))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
if (isSetSessionId())
hashCode = hashCode * 8191 + session_id.hashCode();
hashCode = hashCode * 8191 + ((isSetPartitionSpec()) ? 131071 : 524287);
if (isSetPartitionSpec())
hashCode = hashCode * 8191 + partition_spec.hashCode();
hashCode = hashCode * 8191 + ((isSetBlockIds()) ? 131071 : 524287);
if (isSetBlockIds())
hashCode = hashCode * 8191 + block_ids.hashCode();
hashCode = hashCode * 8191 + ((isSetRowCount()) ? 131071 : 524287);
if (isSetRowCount())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(row_count);
hashCode = hashCode * 8191 + ((isSetWrittenBytes()) ? 131071 : 524287);
if (isSetWrittenBytes())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(written_bytes);
hashCode = hashCode * 8191 + ((isSetCommitMessage()) ? 131071 : 524287);
if (isSetCommitMessage())
hashCode = hashCode * 8191 + commit_message.hashCode();
return hashCode;
}
@Override
public int compareTo(TMCCommitData other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.session_id, other.session_id);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPartitionSpec(), other.isSetPartitionSpec());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPartitionSpec()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition_spec, other.partition_spec);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetBlockIds(), other.isSetBlockIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetBlockIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.block_ids, other.block_ids);
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(isSetWrittenBytes(), other.isSetWrittenBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetWrittenBytes()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.written_bytes, other.written_bytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCommitMessage(), other.isSetCommitMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCommitMessage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.commit_message, other.commit_message);
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("TMCCommitData(");
boolean first = true;
if (isSetSessionId()) {
sb.append("session_id:");
if (this.session_id == null) {
sb.append("null");
} else {
sb.append(this.session_id);
}
first = false;
}
if (isSetPartitionSpec()) {
if (!first) sb.append(", ");
sb.append("partition_spec:");
if (this.partition_spec == null) {
sb.append("null");
} else {
sb.append(this.partition_spec);
}
first = false;
}
if (isSetBlockIds()) {
if (!first) sb.append(", ");
sb.append("block_ids:");
if (this.block_ids == null) {
sb.append("null");
} else {
sb.append(this.block_ids);
}
first = false;
}
if (isSetRowCount()) {
if (!first) sb.append(", ");
sb.append("row_count:");
sb.append(this.row_count);
first = false;
}
if (isSetWrittenBytes()) {
if (!first) sb.append(", ");
sb.append("written_bytes:");
sb.append(this.written_bytes);
first = false;
}
if (isSetCommitMessage()) {
if (!first) sb.append(", ");
sb.append("commit_message:");
if (this.commit_message == null) {
sb.append("null");
} else {
sb.append(this.commit_message);
}
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 TMCCommitDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMCCommitDataStandardScheme getScheme() {
return new TMCCommitDataStandardScheme();
}
}
private static class TMCCommitDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<TMCCommitData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TMCCommitData 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: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.session_id = iprot.readString();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PARTITION_SPEC
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.partition_spec = iprot.readString();
struct.setPartitionSpecIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // BLOCK_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list486 = iprot.readListBegin();
struct.block_ids = new java.util.ArrayList<java.lang.Long>(_list486.size);
long _elem487;
for (int _i488 = 0; _i488 < _list486.size; ++_i488)
{
_elem487 = iprot.readI64();
struct.block_ids.add(_elem487);
}
iprot.readListEnd();
}
struct.setBlockIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // 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 5: // WRITTEN_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.written_bytes = iprot.readI64();
struct.setWrittenBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // COMMIT_MESSAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.commit_message = iprot.readString();
struct.setCommitMessageIsSet(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, TMCCommitData struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.session_id != null) {
if (struct.isSetSessionId()) {
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeString(struct.session_id);
oprot.writeFieldEnd();
}
}
if (struct.partition_spec != null) {
if (struct.isSetPartitionSpec()) {
oprot.writeFieldBegin(PARTITION_SPEC_FIELD_DESC);
oprot.writeString(struct.partition_spec);
oprot.writeFieldEnd();
}
}
if (struct.block_ids != null) {
if (struct.isSetBlockIds()) {
oprot.writeFieldBegin(BLOCK_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.block_ids.size()));
for (long _iter489 : struct.block_ids)
{
oprot.writeI64(_iter489);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetRowCount()) {
oprot.writeFieldBegin(ROW_COUNT_FIELD_DESC);
oprot.writeI64(struct.row_count);
oprot.writeFieldEnd();
}
if (struct.isSetWrittenBytes()) {
oprot.writeFieldBegin(WRITTEN_BYTES_FIELD_DESC);
oprot.writeI64(struct.written_bytes);
oprot.writeFieldEnd();
}
if (struct.commit_message != null) {
if (struct.isSetCommitMessage()) {
oprot.writeFieldBegin(COMMIT_MESSAGE_FIELD_DESC);
oprot.writeString(struct.commit_message);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TMCCommitDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMCCommitDataTupleScheme getScheme() {
return new TMCCommitDataTupleScheme();
}
}
private static class TMCCommitDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<TMCCommitData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TMCCommitData 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.isSetSessionId()) {
optionals.set(0);
}
if (struct.isSetPartitionSpec()) {
optionals.set(1);
}
if (struct.isSetBlockIds()) {
optionals.set(2);
}
if (struct.isSetRowCount()) {
optionals.set(3);
}
if (struct.isSetWrittenBytes()) {
optionals.set(4);
}
if (struct.isSetCommitMessage()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetSessionId()) {
oprot.writeString(struct.session_id);
}
if (struct.isSetPartitionSpec()) {
oprot.writeString(struct.partition_spec);
}
if (struct.isSetBlockIds()) {
{
oprot.writeI32(struct.block_ids.size());
for (long _iter490 : struct.block_ids)
{
oprot.writeI64(_iter490);
}
}
}
if (struct.isSetRowCount()) {
oprot.writeI64(struct.row_count);
}
if (struct.isSetWrittenBytes()) {
oprot.writeI64(struct.written_bytes);
}
if (struct.isSetCommitMessage()) {
oprot.writeString(struct.commit_message);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TMCCommitData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.session_id = iprot.readString();
struct.setSessionIdIsSet(true);
}
if (incoming.get(1)) {
struct.partition_spec = iprot.readString();
struct.setPartitionSpecIsSet(true);
}
if (incoming.get(2)) {
{
org.apache.thrift.protocol.TList _list491 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.block_ids = new java.util.ArrayList<java.lang.Long>(_list491.size);
long _elem492;
for (int _i493 = 0; _i493 < _list491.size; ++_i493)
{
_elem492 = iprot.readI64();
struct.block_ids.add(_elem492);
}
}
struct.setBlockIdsIsSet(true);
}
if (incoming.get(3)) {
struct.row_count = iprot.readI64();
struct.setRowCountIsSet(true);
}
if (incoming.get(4)) {
struct.written_bytes = iprot.readI64();
struct.setWrittenBytesIsSet(true);
}
if (incoming.get(5)) {
struct.commit_message = iprot.readString();
struct.setCommitMessageIsSet(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();
}
}