TMasterOpResult.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 TMasterOpResult implements org.apache.thrift.TBase<TMasterOpResult, TMasterOpResult._Fields>, java.io.Serializable, Cloneable, Comparable<TMasterOpResult> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMasterOpResult");
private static final org.apache.thrift.protocol.TField MAX_JOURNAL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("maxJournalId", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField PACKET_FIELD_DESC = new org.apache.thrift.protocol.TField("packet", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField RESULT_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("resultSet", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryId", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField STATUS_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("statusCode", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField ERR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("errMessage", org.apache.thrift.protocol.TType.STRING, (short)7);
private static final org.apache.thrift.protocol.TField QUERY_RESULT_BUF_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("queryResultBufList", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField TXN_LOAD_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("txnLoadInfo", org.apache.thrift.protocol.TType.STRUCT, (short)9);
private static final org.apache.thrift.protocol.TField GROUP_COMMIT_LOAD_BE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("groupCommitLoadBeId", org.apache.thrift.protocol.TType.I64, (short)10);
private static final org.apache.thrift.protocol.TField AFFECTED_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("affectedRows", org.apache.thrift.protocol.TType.I64, (short)11);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TMasterOpResultStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TMasterOpResultTupleSchemeFactory();
public long maxJournalId; // required
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer packet; // required
public @org.apache.thrift.annotation.Nullable TShowResultSet resultSet; // optional
public @org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId queryId; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String status; // optional
public int statusCode; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String errMessage; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> queryResultBufList; // optional
public @org.apache.thrift.annotation.Nullable TTxnLoadInfo txnLoadInfo; // optional
public long groupCommitLoadBeId; // optional
public long affectedRows; // 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 {
MAX_JOURNAL_ID((short)1, "maxJournalId"),
PACKET((short)2, "packet"),
RESULT_SET((short)3, "resultSet"),
QUERY_ID((short)4, "queryId"),
STATUS((short)5, "status"),
STATUS_CODE((short)6, "statusCode"),
ERR_MESSAGE((short)7, "errMessage"),
QUERY_RESULT_BUF_LIST((short)8, "queryResultBufList"),
TXN_LOAD_INFO((short)9, "txnLoadInfo"),
GROUP_COMMIT_LOAD_BE_ID((short)10, "groupCommitLoadBeId"),
AFFECTED_ROWS((short)11, "affectedRows");
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: // MAX_JOURNAL_ID
return MAX_JOURNAL_ID;
case 2: // PACKET
return PACKET;
case 3: // RESULT_SET
return RESULT_SET;
case 4: // QUERY_ID
return QUERY_ID;
case 5: // STATUS
return STATUS;
case 6: // STATUS_CODE
return STATUS_CODE;
case 7: // ERR_MESSAGE
return ERR_MESSAGE;
case 8: // QUERY_RESULT_BUF_LIST
return QUERY_RESULT_BUF_LIST;
case 9: // TXN_LOAD_INFO
return TXN_LOAD_INFO;
case 10: // GROUP_COMMIT_LOAD_BE_ID
return GROUP_COMMIT_LOAD_BE_ID;
case 11: // AFFECTED_ROWS
return AFFECTED_ROWS;
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 __MAXJOURNALID_ISSET_ID = 0;
private static final int __STATUSCODE_ISSET_ID = 1;
private static final int __GROUPCOMMITLOADBEID_ISSET_ID = 2;
private static final int __AFFECTEDROWS_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.RESULT_SET,_Fields.QUERY_ID,_Fields.STATUS,_Fields.STATUS_CODE,_Fields.ERR_MESSAGE,_Fields.QUERY_RESULT_BUF_LIST,_Fields.TXN_LOAD_INFO,_Fields.GROUP_COMMIT_LOAD_BE_ID,_Fields.AFFECTED_ROWS};
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.MAX_JOURNAL_ID, new org.apache.thrift.meta_data.FieldMetaData("maxJournalId", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.PACKET, new org.apache.thrift.meta_data.FieldMetaData("packet", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("resultSet", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TShowResultSet.class)));
tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.doris.thrift.TUniqueId.class)));
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STATUS_CODE, new org.apache.thrift.meta_data.FieldMetaData("statusCode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.ERR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("errMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.QUERY_RESULT_BUF_LIST, new org.apache.thrift.meta_data.FieldMetaData("queryResultBufList", 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 , true))));
tmpMap.put(_Fields.TXN_LOAD_INFO, new org.apache.thrift.meta_data.FieldMetaData("txnLoadInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTxnLoadInfo.class)));
tmpMap.put(_Fields.GROUP_COMMIT_LOAD_BE_ID, new org.apache.thrift.meta_data.FieldMetaData("groupCommitLoadBeId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.AFFECTED_ROWS, new org.apache.thrift.meta_data.FieldMetaData("affectedRows", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TMasterOpResult.class, metaDataMap);
}
public TMasterOpResult() {
}
public TMasterOpResult(
long maxJournalId,
java.nio.ByteBuffer packet)
{
this();
this.maxJournalId = maxJournalId;
setMaxJournalIdIsSet(true);
this.packet = org.apache.thrift.TBaseHelper.copyBinary(packet);
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TMasterOpResult(TMasterOpResult other) {
__isset_bitfield = other.__isset_bitfield;
this.maxJournalId = other.maxJournalId;
if (other.isSetPacket()) {
this.packet = org.apache.thrift.TBaseHelper.copyBinary(other.packet);
}
if (other.isSetResultSet()) {
this.resultSet = new TShowResultSet(other.resultSet);
}
if (other.isSetQueryId()) {
this.queryId = new org.apache.doris.thrift.TUniqueId(other.queryId);
}
if (other.isSetStatus()) {
this.status = other.status;
}
this.statusCode = other.statusCode;
if (other.isSetErrMessage()) {
this.errMessage = other.errMessage;
}
if (other.isSetQueryResultBufList()) {
java.util.List<java.nio.ByteBuffer> __this__queryResultBufList = new java.util.ArrayList<java.nio.ByteBuffer>(other.queryResultBufList);
this.queryResultBufList = __this__queryResultBufList;
}
if (other.isSetTxnLoadInfo()) {
this.txnLoadInfo = new TTxnLoadInfo(other.txnLoadInfo);
}
this.groupCommitLoadBeId = other.groupCommitLoadBeId;
this.affectedRows = other.affectedRows;
}
public TMasterOpResult deepCopy() {
return new TMasterOpResult(this);
}
@Override
public void clear() {
setMaxJournalIdIsSet(false);
this.maxJournalId = 0;
this.packet = null;
this.resultSet = null;
this.queryId = null;
this.status = null;
setStatusCodeIsSet(false);
this.statusCode = 0;
this.errMessage = null;
this.queryResultBufList = null;
this.txnLoadInfo = null;
setGroupCommitLoadBeIdIsSet(false);
this.groupCommitLoadBeId = 0;
setAffectedRowsIsSet(false);
this.affectedRows = 0;
}
public long getMaxJournalId() {
return this.maxJournalId;
}
public TMasterOpResult setMaxJournalId(long maxJournalId) {
this.maxJournalId = maxJournalId;
setMaxJournalIdIsSet(true);
return this;
}
public void unsetMaxJournalId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXJOURNALID_ISSET_ID);
}
/** Returns true if field maxJournalId is set (has been assigned a value) and false otherwise */
public boolean isSetMaxJournalId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXJOURNALID_ISSET_ID);
}
public void setMaxJournalIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXJOURNALID_ISSET_ID, value);
}
public byte[] getPacket() {
setPacket(org.apache.thrift.TBaseHelper.rightSize(packet));
return packet == null ? null : packet.array();
}
public java.nio.ByteBuffer bufferForPacket() {
return org.apache.thrift.TBaseHelper.copyBinary(packet);
}
public TMasterOpResult setPacket(byte[] packet) {
this.packet = packet == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(packet.clone());
return this;
}
public TMasterOpResult setPacket(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer packet) {
this.packet = org.apache.thrift.TBaseHelper.copyBinary(packet);
return this;
}
public void unsetPacket() {
this.packet = null;
}
/** Returns true if field packet is set (has been assigned a value) and false otherwise */
public boolean isSetPacket() {
return this.packet != null;
}
public void setPacketIsSet(boolean value) {
if (!value) {
this.packet = null;
}
}
@org.apache.thrift.annotation.Nullable
public TShowResultSet getResultSet() {
return this.resultSet;
}
public TMasterOpResult setResultSet(@org.apache.thrift.annotation.Nullable TShowResultSet resultSet) {
this.resultSet = resultSet;
return this;
}
public void unsetResultSet() {
this.resultSet = null;
}
/** Returns true if field resultSet is set (has been assigned a value) and false otherwise */
public boolean isSetResultSet() {
return this.resultSet != null;
}
public void setResultSetIsSet(boolean value) {
if (!value) {
this.resultSet = null;
}
}
@org.apache.thrift.annotation.Nullable
public org.apache.doris.thrift.TUniqueId getQueryId() {
return this.queryId;
}
public TMasterOpResult setQueryId(@org.apache.thrift.annotation.Nullable org.apache.doris.thrift.TUniqueId queryId) {
this.queryId = queryId;
return this;
}
public void unsetQueryId() {
this.queryId = null;
}
/** Returns true if field queryId is set (has been assigned a value) and false otherwise */
public boolean isSetQueryId() {
return this.queryId != null;
}
public void setQueryIdIsSet(boolean value) {
if (!value) {
this.queryId = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getStatus() {
return this.status;
}
public TMasterOpResult setStatus(@org.apache.thrift.annotation.Nullable java.lang.String 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 getStatusCode() {
return this.statusCode;
}
public TMasterOpResult setStatusCode(int statusCode) {
this.statusCode = statusCode;
setStatusCodeIsSet(true);
return this;
}
public void unsetStatusCode() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATUSCODE_ISSET_ID);
}
/** Returns true if field statusCode is set (has been assigned a value) and false otherwise */
public boolean isSetStatusCode() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUSCODE_ISSET_ID);
}
public void setStatusCodeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATUSCODE_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getErrMessage() {
return this.errMessage;
}
public TMasterOpResult setErrMessage(@org.apache.thrift.annotation.Nullable java.lang.String errMessage) {
this.errMessage = errMessage;
return this;
}
public void unsetErrMessage() {
this.errMessage = null;
}
/** Returns true if field errMessage is set (has been assigned a value) and false otherwise */
public boolean isSetErrMessage() {
return this.errMessage != null;
}
public void setErrMessageIsSet(boolean value) {
if (!value) {
this.errMessage = null;
}
}
public int getQueryResultBufListSize() {
return (this.queryResultBufList == null) ? 0 : this.queryResultBufList.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.nio.ByteBuffer> getQueryResultBufListIterator() {
return (this.queryResultBufList == null) ? null : this.queryResultBufList.iterator();
}
public void addToQueryResultBufList(java.nio.ByteBuffer elem) {
if (this.queryResultBufList == null) {
this.queryResultBufList = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.queryResultBufList.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.nio.ByteBuffer> getQueryResultBufList() {
return this.queryResultBufList;
}
public TMasterOpResult setQueryResultBufList(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> queryResultBufList) {
this.queryResultBufList = queryResultBufList;
return this;
}
public void unsetQueryResultBufList() {
this.queryResultBufList = null;
}
/** Returns true if field queryResultBufList is set (has been assigned a value) and false otherwise */
public boolean isSetQueryResultBufList() {
return this.queryResultBufList != null;
}
public void setQueryResultBufListIsSet(boolean value) {
if (!value) {
this.queryResultBufList = null;
}
}
@org.apache.thrift.annotation.Nullable
public TTxnLoadInfo getTxnLoadInfo() {
return this.txnLoadInfo;
}
public TMasterOpResult setTxnLoadInfo(@org.apache.thrift.annotation.Nullable TTxnLoadInfo txnLoadInfo) {
this.txnLoadInfo = txnLoadInfo;
return this;
}
public void unsetTxnLoadInfo() {
this.txnLoadInfo = null;
}
/** Returns true if field txnLoadInfo is set (has been assigned a value) and false otherwise */
public boolean isSetTxnLoadInfo() {
return this.txnLoadInfo != null;
}
public void setTxnLoadInfoIsSet(boolean value) {
if (!value) {
this.txnLoadInfo = null;
}
}
public long getGroupCommitLoadBeId() {
return this.groupCommitLoadBeId;
}
public TMasterOpResult setGroupCommitLoadBeId(long groupCommitLoadBeId) {
this.groupCommitLoadBeId = groupCommitLoadBeId;
setGroupCommitLoadBeIdIsSet(true);
return this;
}
public void unsetGroupCommitLoadBeId() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __GROUPCOMMITLOADBEID_ISSET_ID);
}
/** Returns true if field groupCommitLoadBeId is set (has been assigned a value) and false otherwise */
public boolean isSetGroupCommitLoadBeId() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __GROUPCOMMITLOADBEID_ISSET_ID);
}
public void setGroupCommitLoadBeIdIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __GROUPCOMMITLOADBEID_ISSET_ID, value);
}
public long getAffectedRows() {
return this.affectedRows;
}
public TMasterOpResult setAffectedRows(long affectedRows) {
this.affectedRows = affectedRows;
setAffectedRowsIsSet(true);
return this;
}
public void unsetAffectedRows() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AFFECTEDROWS_ISSET_ID);
}
/** Returns true if field affectedRows is set (has been assigned a value) and false otherwise */
public boolean isSetAffectedRows() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AFFECTEDROWS_ISSET_ID);
}
public void setAffectedRowsIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AFFECTEDROWS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MAX_JOURNAL_ID:
if (value == null) {
unsetMaxJournalId();
} else {
setMaxJournalId((java.lang.Long)value);
}
break;
case PACKET:
if (value == null) {
unsetPacket();
} else {
if (value instanceof byte[]) {
setPacket((byte[])value);
} else {
setPacket((java.nio.ByteBuffer)value);
}
}
break;
case RESULT_SET:
if (value == null) {
unsetResultSet();
} else {
setResultSet((TShowResultSet)value);
}
break;
case QUERY_ID:
if (value == null) {
unsetQueryId();
} else {
setQueryId((org.apache.doris.thrift.TUniqueId)value);
}
break;
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((java.lang.String)value);
}
break;
case STATUS_CODE:
if (value == null) {
unsetStatusCode();
} else {
setStatusCode((java.lang.Integer)value);
}
break;
case ERR_MESSAGE:
if (value == null) {
unsetErrMessage();
} else {
setErrMessage((java.lang.String)value);
}
break;
case QUERY_RESULT_BUF_LIST:
if (value == null) {
unsetQueryResultBufList();
} else {
setQueryResultBufList((java.util.List<java.nio.ByteBuffer>)value);
}
break;
case TXN_LOAD_INFO:
if (value == null) {
unsetTxnLoadInfo();
} else {
setTxnLoadInfo((TTxnLoadInfo)value);
}
break;
case GROUP_COMMIT_LOAD_BE_ID:
if (value == null) {
unsetGroupCommitLoadBeId();
} else {
setGroupCommitLoadBeId((java.lang.Long)value);
}
break;
case AFFECTED_ROWS:
if (value == null) {
unsetAffectedRows();
} else {
setAffectedRows((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MAX_JOURNAL_ID:
return getMaxJournalId();
case PACKET:
return getPacket();
case RESULT_SET:
return getResultSet();
case QUERY_ID:
return getQueryId();
case STATUS:
return getStatus();
case STATUS_CODE:
return getStatusCode();
case ERR_MESSAGE:
return getErrMessage();
case QUERY_RESULT_BUF_LIST:
return getQueryResultBufList();
case TXN_LOAD_INFO:
return getTxnLoadInfo();
case GROUP_COMMIT_LOAD_BE_ID:
return getGroupCommitLoadBeId();
case AFFECTED_ROWS:
return getAffectedRows();
}
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 MAX_JOURNAL_ID:
return isSetMaxJournalId();
case PACKET:
return isSetPacket();
case RESULT_SET:
return isSetResultSet();
case QUERY_ID:
return isSetQueryId();
case STATUS:
return isSetStatus();
case STATUS_CODE:
return isSetStatusCode();
case ERR_MESSAGE:
return isSetErrMessage();
case QUERY_RESULT_BUF_LIST:
return isSetQueryResultBufList();
case TXN_LOAD_INFO:
return isSetTxnLoadInfo();
case GROUP_COMMIT_LOAD_BE_ID:
return isSetGroupCommitLoadBeId();
case AFFECTED_ROWS:
return isSetAffectedRows();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TMasterOpResult)
return this.equals((TMasterOpResult)that);
return false;
}
public boolean equals(TMasterOpResult that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_maxJournalId = true;
boolean that_present_maxJournalId = true;
if (this_present_maxJournalId || that_present_maxJournalId) {
if (!(this_present_maxJournalId && that_present_maxJournalId))
return false;
if (this.maxJournalId != that.maxJournalId)
return false;
}
boolean this_present_packet = true && this.isSetPacket();
boolean that_present_packet = true && that.isSetPacket();
if (this_present_packet || that_present_packet) {
if (!(this_present_packet && that_present_packet))
return false;
if (!this.packet.equals(that.packet))
return false;
}
boolean this_present_resultSet = true && this.isSetResultSet();
boolean that_present_resultSet = true && that.isSetResultSet();
if (this_present_resultSet || that_present_resultSet) {
if (!(this_present_resultSet && that_present_resultSet))
return false;
if (!this.resultSet.equals(that.resultSet))
return false;
}
boolean this_present_queryId = true && this.isSetQueryId();
boolean that_present_queryId = true && that.isSetQueryId();
if (this_present_queryId || that_present_queryId) {
if (!(this_present_queryId && that_present_queryId))
return false;
if (!this.queryId.equals(that.queryId))
return false;
}
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_statusCode = true && this.isSetStatusCode();
boolean that_present_statusCode = true && that.isSetStatusCode();
if (this_present_statusCode || that_present_statusCode) {
if (!(this_present_statusCode && that_present_statusCode))
return false;
if (this.statusCode != that.statusCode)
return false;
}
boolean this_present_errMessage = true && this.isSetErrMessage();
boolean that_present_errMessage = true && that.isSetErrMessage();
if (this_present_errMessage || that_present_errMessage) {
if (!(this_present_errMessage && that_present_errMessage))
return false;
if (!this.errMessage.equals(that.errMessage))
return false;
}
boolean this_present_queryResultBufList = true && this.isSetQueryResultBufList();
boolean that_present_queryResultBufList = true && that.isSetQueryResultBufList();
if (this_present_queryResultBufList || that_present_queryResultBufList) {
if (!(this_present_queryResultBufList && that_present_queryResultBufList))
return false;
if (!this.queryResultBufList.equals(that.queryResultBufList))
return false;
}
boolean this_present_txnLoadInfo = true && this.isSetTxnLoadInfo();
boolean that_present_txnLoadInfo = true && that.isSetTxnLoadInfo();
if (this_present_txnLoadInfo || that_present_txnLoadInfo) {
if (!(this_present_txnLoadInfo && that_present_txnLoadInfo))
return false;
if (!this.txnLoadInfo.equals(that.txnLoadInfo))
return false;
}
boolean this_present_groupCommitLoadBeId = true && this.isSetGroupCommitLoadBeId();
boolean that_present_groupCommitLoadBeId = true && that.isSetGroupCommitLoadBeId();
if (this_present_groupCommitLoadBeId || that_present_groupCommitLoadBeId) {
if (!(this_present_groupCommitLoadBeId && that_present_groupCommitLoadBeId))
return false;
if (this.groupCommitLoadBeId != that.groupCommitLoadBeId)
return false;
}
boolean this_present_affectedRows = true && this.isSetAffectedRows();
boolean that_present_affectedRows = true && that.isSetAffectedRows();
if (this_present_affectedRows || that_present_affectedRows) {
if (!(this_present_affectedRows && that_present_affectedRows))
return false;
if (this.affectedRows != that.affectedRows)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(maxJournalId);
hashCode = hashCode * 8191 + ((isSetPacket()) ? 131071 : 524287);
if (isSetPacket())
hashCode = hashCode * 8191 + packet.hashCode();
hashCode = hashCode * 8191 + ((isSetResultSet()) ? 131071 : 524287);
if (isSetResultSet())
hashCode = hashCode * 8191 + resultSet.hashCode();
hashCode = hashCode * 8191 + ((isSetQueryId()) ? 131071 : 524287);
if (isSetQueryId())
hashCode = hashCode * 8191 + queryId.hashCode();
hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
if (isSetStatus())
hashCode = hashCode * 8191 + status.hashCode();
hashCode = hashCode * 8191 + ((isSetStatusCode()) ? 131071 : 524287);
if (isSetStatusCode())
hashCode = hashCode * 8191 + statusCode;
hashCode = hashCode * 8191 + ((isSetErrMessage()) ? 131071 : 524287);
if (isSetErrMessage())
hashCode = hashCode * 8191 + errMessage.hashCode();
hashCode = hashCode * 8191 + ((isSetQueryResultBufList()) ? 131071 : 524287);
if (isSetQueryResultBufList())
hashCode = hashCode * 8191 + queryResultBufList.hashCode();
hashCode = hashCode * 8191 + ((isSetTxnLoadInfo()) ? 131071 : 524287);
if (isSetTxnLoadInfo())
hashCode = hashCode * 8191 + txnLoadInfo.hashCode();
hashCode = hashCode * 8191 + ((isSetGroupCommitLoadBeId()) ? 131071 : 524287);
if (isSetGroupCommitLoadBeId())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(groupCommitLoadBeId);
hashCode = hashCode * 8191 + ((isSetAffectedRows()) ? 131071 : 524287);
if (isSetAffectedRows())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(affectedRows);
return hashCode;
}
@Override
public int compareTo(TMasterOpResult other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetMaxJournalId(), other.isSetMaxJournalId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaxJournalId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxJournalId, other.maxJournalId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetPacket(), other.isSetPacket());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPacket()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.packet, other.packet);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetResultSet(), other.isSetResultSet());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResultSet()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.resultSet, other.resultSet);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryId(), other.isSetQueryId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryId, other.queryId);
if (lastComparison != 0) {
return lastComparison;
}
}
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(isSetStatusCode(), other.isSetStatusCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatusCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusCode, other.statusCode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetErrMessage(), other.isSetErrMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetErrMessage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errMessage, other.errMessage);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryResultBufList(), other.isSetQueryResultBufList());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryResultBufList()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryResultBufList, other.queryResultBufList);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetTxnLoadInfo(), other.isSetTxnLoadInfo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTxnLoadInfo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnLoadInfo, other.txnLoadInfo);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetGroupCommitLoadBeId(), other.isSetGroupCommitLoadBeId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGroupCommitLoadBeId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.groupCommitLoadBeId, other.groupCommitLoadBeId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetAffectedRows(), other.isSetAffectedRows());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAffectedRows()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.affectedRows, other.affectedRows);
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("TMasterOpResult(");
boolean first = true;
sb.append("maxJournalId:");
sb.append(this.maxJournalId);
first = false;
if (!first) sb.append(", ");
sb.append("packet:");
if (this.packet == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.packet, sb);
}
first = false;
if (isSetResultSet()) {
if (!first) sb.append(", ");
sb.append("resultSet:");
if (this.resultSet == null) {
sb.append("null");
} else {
sb.append(this.resultSet);
}
first = false;
}
if (isSetQueryId()) {
if (!first) sb.append(", ");
sb.append("queryId:");
if (this.queryId == null) {
sb.append("null");
} else {
sb.append(this.queryId);
}
first = false;
}
if (isSetStatus()) {
if (!first) sb.append(", ");
sb.append("status:");
if (this.status == null) {
sb.append("null");
} else {
sb.append(this.status);
}
first = false;
}
if (isSetStatusCode()) {
if (!first) sb.append(", ");
sb.append("statusCode:");
sb.append(this.statusCode);
first = false;
}
if (isSetErrMessage()) {
if (!first) sb.append(", ");
sb.append("errMessage:");
if (this.errMessage == null) {
sb.append("null");
} else {
sb.append(this.errMessage);
}
first = false;
}
if (isSetQueryResultBufList()) {
if (!first) sb.append(", ");
sb.append("queryResultBufList:");
if (this.queryResultBufList == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.queryResultBufList, sb);
}
first = false;
}
if (isSetTxnLoadInfo()) {
if (!first) sb.append(", ");
sb.append("txnLoadInfo:");
if (this.txnLoadInfo == null) {
sb.append("null");
} else {
sb.append(this.txnLoadInfo);
}
first = false;
}
if (isSetGroupCommitLoadBeId()) {
if (!first) sb.append(", ");
sb.append("groupCommitLoadBeId:");
sb.append(this.groupCommitLoadBeId);
first = false;
}
if (isSetAffectedRows()) {
if (!first) sb.append(", ");
sb.append("affectedRows:");
sb.append(this.affectedRows);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// alas, we cannot check 'maxJournalId' because it's a primitive and you chose the non-beans generator.
if (packet == null) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'packet' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (resultSet != null) {
resultSet.validate();
}
if (queryId != null) {
queryId.validate();
}
if (txnLoadInfo != null) {
txnLoadInfo.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 TMasterOpResultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMasterOpResultStandardScheme getScheme() {
return new TMasterOpResultStandardScheme();
}
}
private static class TMasterOpResultStandardScheme extends org.apache.thrift.scheme.StandardScheme<TMasterOpResult> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TMasterOpResult 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: // MAX_JOURNAL_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.maxJournalId = iprot.readI64();
struct.setMaxJournalIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PACKET
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.packet = iprot.readBinary();
struct.setPacketIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // RESULT_SET
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.resultSet = new TShowResultSet();
struct.resultSet.read(iprot);
struct.setResultSetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // QUERY_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.queryId = new org.apache.doris.thrift.TUniqueId();
struct.queryId.read(iprot);
struct.setQueryIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.status = iprot.readString();
struct.setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // STATUS_CODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.statusCode = iprot.readI32();
struct.setStatusCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // ERR_MESSAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.errMessage = iprot.readString();
struct.setErrMessageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // QUERY_RESULT_BUF_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list344 = iprot.readListBegin();
struct.queryResultBufList = new java.util.ArrayList<java.nio.ByteBuffer>(_list344.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem345;
for (int _i346 = 0; _i346 < _list344.size; ++_i346)
{
_elem345 = iprot.readBinary();
struct.queryResultBufList.add(_elem345);
}
iprot.readListEnd();
}
struct.setQueryResultBufListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // TXN_LOAD_INFO
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.txnLoadInfo = new TTxnLoadInfo();
struct.txnLoadInfo.read(iprot);
struct.setTxnLoadInfoIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // GROUP_COMMIT_LOAD_BE_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.groupCommitLoadBeId = iprot.readI64();
struct.setGroupCommitLoadBeIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // AFFECTED_ROWS
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.affectedRows = iprot.readI64();
struct.setAffectedRowsIsSet(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
if (!struct.isSetMaxJournalId()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxJournalId' was not found in serialized data! Struct: " + toString());
}
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TMasterOpResult struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(MAX_JOURNAL_ID_FIELD_DESC);
oprot.writeI64(struct.maxJournalId);
oprot.writeFieldEnd();
if (struct.packet != null) {
oprot.writeFieldBegin(PACKET_FIELD_DESC);
oprot.writeBinary(struct.packet);
oprot.writeFieldEnd();
}
if (struct.resultSet != null) {
if (struct.isSetResultSet()) {
oprot.writeFieldBegin(RESULT_SET_FIELD_DESC);
struct.resultSet.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.queryId != null) {
if (struct.isSetQueryId()) {
oprot.writeFieldBegin(QUERY_ID_FIELD_DESC);
struct.queryId.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.status != null) {
if (struct.isSetStatus()) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
oprot.writeString(struct.status);
oprot.writeFieldEnd();
}
}
if (struct.isSetStatusCode()) {
oprot.writeFieldBegin(STATUS_CODE_FIELD_DESC);
oprot.writeI32(struct.statusCode);
oprot.writeFieldEnd();
}
if (struct.errMessage != null) {
if (struct.isSetErrMessage()) {
oprot.writeFieldBegin(ERR_MESSAGE_FIELD_DESC);
oprot.writeString(struct.errMessage);
oprot.writeFieldEnd();
}
}
if (struct.queryResultBufList != null) {
if (struct.isSetQueryResultBufList()) {
oprot.writeFieldBegin(QUERY_RESULT_BUF_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.queryResultBufList.size()));
for (java.nio.ByteBuffer _iter347 : struct.queryResultBufList)
{
oprot.writeBinary(_iter347);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.txnLoadInfo != null) {
if (struct.isSetTxnLoadInfo()) {
oprot.writeFieldBegin(TXN_LOAD_INFO_FIELD_DESC);
struct.txnLoadInfo.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.isSetGroupCommitLoadBeId()) {
oprot.writeFieldBegin(GROUP_COMMIT_LOAD_BE_ID_FIELD_DESC);
oprot.writeI64(struct.groupCommitLoadBeId);
oprot.writeFieldEnd();
}
if (struct.isSetAffectedRows()) {
oprot.writeFieldBegin(AFFECTED_ROWS_FIELD_DESC);
oprot.writeI64(struct.affectedRows);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TMasterOpResultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TMasterOpResultTupleScheme getScheme() {
return new TMasterOpResultTupleScheme();
}
}
private static class TMasterOpResultTupleScheme extends org.apache.thrift.scheme.TupleScheme<TMasterOpResult> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TMasterOpResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI64(struct.maxJournalId);
oprot.writeBinary(struct.packet);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetResultSet()) {
optionals.set(0);
}
if (struct.isSetQueryId()) {
optionals.set(1);
}
if (struct.isSetStatus()) {
optionals.set(2);
}
if (struct.isSetStatusCode()) {
optionals.set(3);
}
if (struct.isSetErrMessage()) {
optionals.set(4);
}
if (struct.isSetQueryResultBufList()) {
optionals.set(5);
}
if (struct.isSetTxnLoadInfo()) {
optionals.set(6);
}
if (struct.isSetGroupCommitLoadBeId()) {
optionals.set(7);
}
if (struct.isSetAffectedRows()) {
optionals.set(8);
}
oprot.writeBitSet(optionals, 9);
if (struct.isSetResultSet()) {
struct.resultSet.write(oprot);
}
if (struct.isSetQueryId()) {
struct.queryId.write(oprot);
}
if (struct.isSetStatus()) {
oprot.writeString(struct.status);
}
if (struct.isSetStatusCode()) {
oprot.writeI32(struct.statusCode);
}
if (struct.isSetErrMessage()) {
oprot.writeString(struct.errMessage);
}
if (struct.isSetQueryResultBufList()) {
{
oprot.writeI32(struct.queryResultBufList.size());
for (java.nio.ByteBuffer _iter348 : struct.queryResultBufList)
{
oprot.writeBinary(_iter348);
}
}
}
if (struct.isSetTxnLoadInfo()) {
struct.txnLoadInfo.write(oprot);
}
if (struct.isSetGroupCommitLoadBeId()) {
oprot.writeI64(struct.groupCommitLoadBeId);
}
if (struct.isSetAffectedRows()) {
oprot.writeI64(struct.affectedRows);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TMasterOpResult struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.maxJournalId = iprot.readI64();
struct.setMaxJournalIdIsSet(true);
struct.packet = iprot.readBinary();
struct.setPacketIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.resultSet = new TShowResultSet();
struct.resultSet.read(iprot);
struct.setResultSetIsSet(true);
}
if (incoming.get(1)) {
struct.queryId = new org.apache.doris.thrift.TUniqueId();
struct.queryId.read(iprot);
struct.setQueryIdIsSet(true);
}
if (incoming.get(2)) {
struct.status = iprot.readString();
struct.setStatusIsSet(true);
}
if (incoming.get(3)) {
struct.statusCode = iprot.readI32();
struct.setStatusCodeIsSet(true);
}
if (incoming.get(4)) {
struct.errMessage = iprot.readString();
struct.setErrMessageIsSet(true);
}
if (incoming.get(5)) {
{
org.apache.thrift.protocol.TList _list349 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.queryResultBufList = new java.util.ArrayList<java.nio.ByteBuffer>(_list349.size);
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem350;
for (int _i351 = 0; _i351 < _list349.size; ++_i351)
{
_elem350 = iprot.readBinary();
struct.queryResultBufList.add(_elem350);
}
}
struct.setQueryResultBufListIsSet(true);
}
if (incoming.get(6)) {
struct.txnLoadInfo = new TTxnLoadInfo();
struct.txnLoadInfo.read(iprot);
struct.setTxnLoadInfoIsSet(true);
}
if (incoming.get(7)) {
struct.groupCommitLoadBeId = iprot.readI64();
struct.setGroupCommitLoadBeIdIsSet(true);
}
if (incoming.get(8)) {
struct.affectedRows = iprot.readI64();
struct.setAffectedRowsIsSet(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();
}
}