Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.apache.hive.service.rpc.thrift.TGetOperationStatusResp Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hive.service.rpc.thrift;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class TGetOperationStatusResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOperationStatusResp");
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField OPERATION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationState", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField SQL_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("sqlState", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCode", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField ERROR_MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorMessage", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField TASK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskStatus", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.protocol.TField OPERATION_STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("operationStarted", org.apache.thrift.protocol.TType.I64, (short)7);
private static final org.apache.thrift.protocol.TField OPERATION_COMPLETED_FIELD_DESC = new org.apache.thrift.protocol.TField("operationCompleted", org.apache.thrift.protocol.TType.I64, (short)8);
private static final org.apache.thrift.protocol.TField HAS_RESULT_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("hasResultSet", org.apache.thrift.protocol.TType.BOOL, (short)9);
private static final org.apache.thrift.protocol.TField PROGRESS_UPDATE_RESPONSE_FIELD_DESC = new org.apache.thrift.protocol.TField("progressUpdateResponse", org.apache.thrift.protocol.TType.STRUCT, (short)10);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new TGetOperationStatusRespStandardSchemeFactory());
schemes.put(TupleScheme.class, new TGetOperationStatusRespTupleSchemeFactory());
}
private TStatus status; // required
private TOperationState operationState; // optional
private String sqlState; // optional
private int errorCode; // optional
private String errorMessage; // optional
private String taskStatus; // optional
private long operationStarted; // optional
private long operationCompleted; // optional
private boolean hasResultSet; // optional
private TProgressUpdateResp progressUpdateResponse; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
STATUS((short)1, "status"),
/**
*
* @see TOperationState
*/
OPERATION_STATE((short)2, "operationState"),
SQL_STATE((short)3, "sqlState"),
ERROR_CODE((short)4, "errorCode"),
ERROR_MESSAGE((short)5, "errorMessage"),
TASK_STATUS((short)6, "taskStatus"),
OPERATION_STARTED((short)7, "operationStarted"),
OPERATION_COMPLETED((short)8, "operationCompleted"),
HAS_RESULT_SET((short)9, "hasResultSet"),
PROGRESS_UPDATE_RESPONSE((short)10, "progressUpdateResponse");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // STATUS
return STATUS;
case 2: // OPERATION_STATE
return OPERATION_STATE;
case 3: // SQL_STATE
return SQL_STATE;
case 4: // ERROR_CODE
return ERROR_CODE;
case 5: // ERROR_MESSAGE
return ERROR_MESSAGE;
case 6: // TASK_STATUS
return TASK_STATUS;
case 7: // OPERATION_STARTED
return OPERATION_STARTED;
case 8: // OPERATION_COMPLETED
return OPERATION_COMPLETED;
case 9: // HAS_RESULT_SET
return HAS_RESULT_SET;
case 10: // PROGRESS_UPDATE_RESPONSE
return PROGRESS_UPDATE_RESPONSE;
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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __ERRORCODE_ISSET_ID = 0;
private static final int __OPERATIONSTARTED_ISSET_ID = 1;
private static final int __OPERATIONCOMPLETED_ISSET_ID = 2;
private static final int __HASRESULTSET_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.OPERATION_STATE,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE,_Fields.TASK_STATUS,_Fields.OPERATION_STARTED,_Fields.OPERATION_COMPLETED,_Fields.HAS_RESULT_SET,_Fields.PROGRESS_UPDATE_RESPONSE};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStatus.class)));
tmpMap.put(_Fields.OPERATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("operationState", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TOperationState.class)));
tmpMap.put(_Fields.SQL_STATE, new org.apache.thrift.meta_data.FieldMetaData("sqlState", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.ERROR_MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("errorMessage", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TASK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("taskStatus", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.OPERATION_STARTED, new org.apache.thrift.meta_data.FieldMetaData("operationStarted", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.OPERATION_COMPLETED, new org.apache.thrift.meta_data.FieldMetaData("operationCompleted", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.PROGRESS_UPDATE_RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("progressUpdateResponse", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "TProgressUpdateResp")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetOperationStatusResp.class, metaDataMap);
}
public TGetOperationStatusResp() {
}
public TGetOperationStatusResp(
TStatus status)
{
this();
this.status = status;
}
/**
* Performs a deep copy on other .
*/
public TGetOperationStatusResp(TGetOperationStatusResp other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStatus()) {
this.status = new TStatus(other.status);
}
if (other.isSetOperationState()) {
this.operationState = other.operationState;
}
if (other.isSetSqlState()) {
this.sqlState = other.sqlState;
}
this.errorCode = other.errorCode;
if (other.isSetErrorMessage()) {
this.errorMessage = other.errorMessage;
}
if (other.isSetTaskStatus()) {
this.taskStatus = other.taskStatus;
}
this.operationStarted = other.operationStarted;
this.operationCompleted = other.operationCompleted;
this.hasResultSet = other.hasResultSet;
if (other.isSetProgressUpdateResponse()) {
this.progressUpdateResponse = other.progressUpdateResponse;
}
}
public TGetOperationStatusResp deepCopy() {
return new TGetOperationStatusResp(this);
}
@Override
public void clear() {
this.status = null;
this.operationState = null;
this.sqlState = null;
setErrorCodeIsSet(false);
this.errorCode = 0;
this.errorMessage = null;
this.taskStatus = null;
setOperationStartedIsSet(false);
this.operationStarted = 0;
setOperationCompletedIsSet(false);
this.operationCompleted = 0;
setHasResultSetIsSet(false);
this.hasResultSet = false;
this.progressUpdateResponse = null;
}
public TStatus getStatus() {
return this.status;
}
public void setStatus(TStatus status) {
this.status = status;
}
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;
}
}
/**
*
* @see TOperationState
*/
public TOperationState getOperationState() {
return this.operationState;
}
/**
*
* @see TOperationState
*/
public void setOperationState(TOperationState operationState) {
this.operationState = operationState;
}
public void unsetOperationState() {
this.operationState = null;
}
/** Returns true if field operationState is set (has been assigned a value) and false otherwise */
public boolean isSetOperationState() {
return this.operationState != null;
}
public void setOperationStateIsSet(boolean value) {
if (!value) {
this.operationState = null;
}
}
public String getSqlState() {
return this.sqlState;
}
public void setSqlState(String sqlState) {
this.sqlState = sqlState;
}
public void unsetSqlState() {
this.sqlState = null;
}
/** Returns true if field sqlState is set (has been assigned a value) and false otherwise */
public boolean isSetSqlState() {
return this.sqlState != null;
}
public void setSqlStateIsSet(boolean value) {
if (!value) {
this.sqlState = null;
}
}
public int getErrorCode() {
return this.errorCode;
}
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
setErrorCodeIsSet(true);
}
public void unsetErrorCode() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRORCODE_ISSET_ID);
}
/** Returns true if field errorCode is set (has been assigned a value) and false otherwise */
public boolean isSetErrorCode() {
return EncodingUtils.testBit(__isset_bitfield, __ERRORCODE_ISSET_ID);
}
public void setErrorCodeIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRORCODE_ISSET_ID, value);
}
public String getErrorMessage() {
return this.errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public void unsetErrorMessage() {
this.errorMessage = null;
}
/** Returns true if field errorMessage is set (has been assigned a value) and false otherwise */
public boolean isSetErrorMessage() {
return this.errorMessage != null;
}
public void setErrorMessageIsSet(boolean value) {
if (!value) {
this.errorMessage = null;
}
}
public String getTaskStatus() {
return this.taskStatus;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
public void unsetTaskStatus() {
this.taskStatus = null;
}
/** Returns true if field taskStatus is set (has been assigned a value) and false otherwise */
public boolean isSetTaskStatus() {
return this.taskStatus != null;
}
public void setTaskStatusIsSet(boolean value) {
if (!value) {
this.taskStatus = null;
}
}
public long getOperationStarted() {
return this.operationStarted;
}
public void setOperationStarted(long operationStarted) {
this.operationStarted = operationStarted;
setOperationStartedIsSet(true);
}
public void unsetOperationStarted() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID);
}
/** Returns true if field operationStarted is set (has been assigned a value) and false otherwise */
public boolean isSetOperationStarted() {
return EncodingUtils.testBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID);
}
public void setOperationStartedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATIONSTARTED_ISSET_ID, value);
}
public long getOperationCompleted() {
return this.operationCompleted;
}
public void setOperationCompleted(long operationCompleted) {
this.operationCompleted = operationCompleted;
setOperationCompletedIsSet(true);
}
public void unsetOperationCompleted() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID);
}
/** Returns true if field operationCompleted is set (has been assigned a value) and false otherwise */
public boolean isSetOperationCompleted() {
return EncodingUtils.testBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID);
}
public void setOperationCompletedIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OPERATIONCOMPLETED_ISSET_ID, value);
}
public boolean isHasResultSet() {
return this.hasResultSet;
}
public void setHasResultSet(boolean hasResultSet) {
this.hasResultSet = hasResultSet;
setHasResultSetIsSet(true);
}
public void unsetHasResultSet() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
}
/** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise */
public boolean isSetHasResultSet() {
return EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
}
public void setHasResultSetIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value);
}
public TProgressUpdateResp getProgressUpdateResponse() {
return this.progressUpdateResponse;
}
public void setProgressUpdateResponse(TProgressUpdateResp progressUpdateResponse) {
this.progressUpdateResponse = progressUpdateResponse;
}
public void unsetProgressUpdateResponse() {
this.progressUpdateResponse = null;
}
/** Returns true if field progressUpdateResponse is set (has been assigned a value) and false otherwise */
public boolean isSetProgressUpdateResponse() {
return this.progressUpdateResponse != null;
}
public void setProgressUpdateResponseIsSet(boolean value) {
if (!value) {
this.progressUpdateResponse = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((TStatus)value);
}
break;
case OPERATION_STATE:
if (value == null) {
unsetOperationState();
} else {
setOperationState((TOperationState)value);
}
break;
case SQL_STATE:
if (value == null) {
unsetSqlState();
} else {
setSqlState((String)value);
}
break;
case ERROR_CODE:
if (value == null) {
unsetErrorCode();
} else {
setErrorCode((Integer)value);
}
break;
case ERROR_MESSAGE:
if (value == null) {
unsetErrorMessage();
} else {
setErrorMessage((String)value);
}
break;
case TASK_STATUS:
if (value == null) {
unsetTaskStatus();
} else {
setTaskStatus((String)value);
}
break;
case OPERATION_STARTED:
if (value == null) {
unsetOperationStarted();
} else {
setOperationStarted((Long)value);
}
break;
case OPERATION_COMPLETED:
if (value == null) {
unsetOperationCompleted();
} else {
setOperationCompleted((Long)value);
}
break;
case HAS_RESULT_SET:
if (value == null) {
unsetHasResultSet();
} else {
setHasResultSet((Boolean)value);
}
break;
case PROGRESS_UPDATE_RESPONSE:
if (value == null) {
unsetProgressUpdateResponse();
} else {
setProgressUpdateResponse((TProgressUpdateResp)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return getStatus();
case OPERATION_STATE:
return getOperationState();
case SQL_STATE:
return getSqlState();
case ERROR_CODE:
return getErrorCode();
case ERROR_MESSAGE:
return getErrorMessage();
case TASK_STATUS:
return getTaskStatus();
case OPERATION_STARTED:
return getOperationStarted();
case OPERATION_COMPLETED:
return getOperationCompleted();
case HAS_RESULT_SET:
return isHasResultSet();
case PROGRESS_UPDATE_RESPONSE:
return getProgressUpdateResponse();
}
throw new 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 IllegalArgumentException();
}
switch (field) {
case STATUS:
return isSetStatus();
case OPERATION_STATE:
return isSetOperationState();
case SQL_STATE:
return isSetSqlState();
case ERROR_CODE:
return isSetErrorCode();
case ERROR_MESSAGE:
return isSetErrorMessage();
case TASK_STATUS:
return isSetTaskStatus();
case OPERATION_STARTED:
return isSetOperationStarted();
case OPERATION_COMPLETED:
return isSetOperationCompleted();
case HAS_RESULT_SET:
return isSetHasResultSet();
case PROGRESS_UPDATE_RESPONSE:
return isSetProgressUpdateResponse();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof TGetOperationStatusResp)
return this.equals((TGetOperationStatusResp)that);
return false;
}
public boolean equals(TGetOperationStatusResp that) {
if (that == null)
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_operationState = true && this.isSetOperationState();
boolean that_present_operationState = true && that.isSetOperationState();
if (this_present_operationState || that_present_operationState) {
if (!(this_present_operationState && that_present_operationState))
return false;
if (!this.operationState.equals(that.operationState))
return false;
}
boolean this_present_sqlState = true && this.isSetSqlState();
boolean that_present_sqlState = true && that.isSetSqlState();
if (this_present_sqlState || that_present_sqlState) {
if (!(this_present_sqlState && that_present_sqlState))
return false;
if (!this.sqlState.equals(that.sqlState))
return false;
}
boolean this_present_errorCode = true && this.isSetErrorCode();
boolean that_present_errorCode = true && that.isSetErrorCode();
if (this_present_errorCode || that_present_errorCode) {
if (!(this_present_errorCode && that_present_errorCode))
return false;
if (this.errorCode != that.errorCode)
return false;
}
boolean this_present_errorMessage = true && this.isSetErrorMessage();
boolean that_present_errorMessage = true && that.isSetErrorMessage();
if (this_present_errorMessage || that_present_errorMessage) {
if (!(this_present_errorMessage && that_present_errorMessage))
return false;
if (!this.errorMessage.equals(that.errorMessage))
return false;
}
boolean this_present_taskStatus = true && this.isSetTaskStatus();
boolean that_present_taskStatus = true && that.isSetTaskStatus();
if (this_present_taskStatus || that_present_taskStatus) {
if (!(this_present_taskStatus && that_present_taskStatus))
return false;
if (!this.taskStatus.equals(that.taskStatus))
return false;
}
boolean this_present_operationStarted = true && this.isSetOperationStarted();
boolean that_present_operationStarted = true && that.isSetOperationStarted();
if (this_present_operationStarted || that_present_operationStarted) {
if (!(this_present_operationStarted && that_present_operationStarted))
return false;
if (this.operationStarted != that.operationStarted)
return false;
}
boolean this_present_operationCompleted = true && this.isSetOperationCompleted();
boolean that_present_operationCompleted = true && that.isSetOperationCompleted();
if (this_present_operationCompleted || that_present_operationCompleted) {
if (!(this_present_operationCompleted && that_present_operationCompleted))
return false;
if (this.operationCompleted != that.operationCompleted)
return false;
}
boolean this_present_hasResultSet = true && this.isSetHasResultSet();
boolean that_present_hasResultSet = true && that.isSetHasResultSet();
if (this_present_hasResultSet || that_present_hasResultSet) {
if (!(this_present_hasResultSet && that_present_hasResultSet))
return false;
if (this.hasResultSet != that.hasResultSet)
return false;
}
boolean this_present_progressUpdateResponse = true && this.isSetProgressUpdateResponse();
boolean that_present_progressUpdateResponse = true && that.isSetProgressUpdateResponse();
if (this_present_progressUpdateResponse || that_present_progressUpdateResponse) {
if (!(this_present_progressUpdateResponse && that_present_progressUpdateResponse))
return false;
if (!this.progressUpdateResponse.equals(that.progressUpdateResponse))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_status = true && (isSetStatus());
list.add(present_status);
if (present_status)
list.add(status);
boolean present_operationState = true && (isSetOperationState());
list.add(present_operationState);
if (present_operationState)
list.add(operationState.getValue());
boolean present_sqlState = true && (isSetSqlState());
list.add(present_sqlState);
if (present_sqlState)
list.add(sqlState);
boolean present_errorCode = true && (isSetErrorCode());
list.add(present_errorCode);
if (present_errorCode)
list.add(errorCode);
boolean present_errorMessage = true && (isSetErrorMessage());
list.add(present_errorMessage);
if (present_errorMessage)
list.add(errorMessage);
boolean present_taskStatus = true && (isSetTaskStatus());
list.add(present_taskStatus);
if (present_taskStatus)
list.add(taskStatus);
boolean present_operationStarted = true && (isSetOperationStarted());
list.add(present_operationStarted);
if (present_operationStarted)
list.add(operationStarted);
boolean present_operationCompleted = true && (isSetOperationCompleted());
list.add(present_operationCompleted);
if (present_operationCompleted)
list.add(operationCompleted);
boolean present_hasResultSet = true && (isSetHasResultSet());
list.add(present_hasResultSet);
if (present_hasResultSet)
list.add(hasResultSet);
boolean present_progressUpdateResponse = true && (isSetProgressUpdateResponse());
list.add(present_progressUpdateResponse);
if (present_progressUpdateResponse)
list.add(progressUpdateResponse);
return list.hashCode();
}
@Override
public int compareTo(TGetOperationStatusResp other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetStatus()).compareTo(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 = Boolean.valueOf(isSetOperationState()).compareTo(other.isSetOperationState());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOperationState()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationState, other.operationState);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(other.isSetSqlState());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSqlState()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetErrorCode()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetErrorMessage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTaskStatus()).compareTo(other.isSetTaskStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTaskStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskStatus, other.taskStatus);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOperationStarted()).compareTo(other.isSetOperationStarted());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOperationStarted()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationStarted, other.operationStarted);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetOperationCompleted()).compareTo(other.isSetOperationCompleted());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetOperationCompleted()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationCompleted, other.operationCompleted);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHasResultSet()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetProgressUpdateResponse()).compareTo(other.isSetProgressUpdateResponse());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetProgressUpdateResponse()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.progressUpdateResponse, other.progressUpdateResponse);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("TGetOperationStatusResp(");
boolean first = true;
sb.append("status:");
if (this.status == null) {
sb.append("null");
} else {
sb.append(this.status);
}
first = false;
if (isSetOperationState()) {
if (!first) sb.append(", ");
sb.append("operationState:");
if (this.operationState == null) {
sb.append("null");
} else {
sb.append(this.operationState);
}
first = false;
}
if (isSetSqlState()) {
if (!first) sb.append(", ");
sb.append("sqlState:");
if (this.sqlState == null) {
sb.append("null");
} else {
sb.append(this.sqlState);
}
first = false;
}
if (isSetErrorCode()) {
if (!first) sb.append(", ");
sb.append("errorCode:");
sb.append(this.errorCode);
first = false;
}
if (isSetErrorMessage()) {
if (!first) sb.append(", ");
sb.append("errorMessage:");
if (this.errorMessage == null) {
sb.append("null");
} else {
sb.append(this.errorMessage);
}
first = false;
}
if (isSetTaskStatus()) {
if (!first) sb.append(", ");
sb.append("taskStatus:");
if (this.taskStatus == null) {
sb.append("null");
} else {
sb.append(this.taskStatus);
}
first = false;
}
if (isSetOperationStarted()) {
if (!first) sb.append(", ");
sb.append("operationStarted:");
sb.append(this.operationStarted);
first = false;
}
if (isSetOperationCompleted()) {
if (!first) sb.append(", ");
sb.append("operationCompleted:");
sb.append(this.operationCompleted);
first = false;
}
if (isSetHasResultSet()) {
if (!first) sb.append(", ");
sb.append("hasResultSet:");
sb.append(this.hasResultSet);
first = false;
}
if (isSetProgressUpdateResponse()) {
if (!first) sb.append(", ");
sb.append("progressUpdateResponse:");
if (this.progressUpdateResponse == null) {
sb.append("null");
} else {
sb.append(this.progressUpdateResponse);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (!isSetStatus()) {
throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString());
}
// check for sub-struct validity
if (status != null) {
status.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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 TGetOperationStatusRespStandardSchemeFactory implements SchemeFactory {
public TGetOperationStatusRespStandardScheme getScheme() {
return new TGetOperationStatusRespStandardScheme();
}
}
private static class TGetOperationStatusRespStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.status = new TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPERATION_STATE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.operationState = org.apache.hive.service.rpc.thrift.TOperationState.findByValue(iprot.readI32());
struct.setOperationStateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // SQL_STATE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sqlState = iprot.readString();
struct.setSqlStateIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // ERROR_CODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.errorCode = iprot.readI32();
struct.setErrorCodeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // ERROR_MESSAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.errorMessage = iprot.readString();
struct.setErrorMessageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // TASK_STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.taskStatus = iprot.readString();
struct.setTaskStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // OPERATION_STARTED
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.operationStarted = iprot.readI64();
struct.setOperationStartedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // OPERATION_COMPLETED
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.operationCompleted = iprot.readI64();
struct.setOperationCompletedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // HAS_RESULT_SET
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.hasResultSet = iprot.readBool();
struct.setHasResultSetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 10: // PROGRESS_UPDATE_RESPONSE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.progressUpdateResponse = new TProgressUpdateResp();
struct.progressUpdateResponse.read(iprot);
struct.setProgressUpdateResponseIsSet(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();
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.status != null) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
struct.status.write(oprot);
oprot.writeFieldEnd();
}
if (struct.operationState != null) {
if (struct.isSetOperationState()) {
oprot.writeFieldBegin(OPERATION_STATE_FIELD_DESC);
oprot.writeI32(struct.operationState.getValue());
oprot.writeFieldEnd();
}
}
if (struct.sqlState != null) {
if (struct.isSetSqlState()) {
oprot.writeFieldBegin(SQL_STATE_FIELD_DESC);
oprot.writeString(struct.sqlState);
oprot.writeFieldEnd();
}
}
if (struct.isSetErrorCode()) {
oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
oprot.writeI32(struct.errorCode);
oprot.writeFieldEnd();
}
if (struct.errorMessage != null) {
if (struct.isSetErrorMessage()) {
oprot.writeFieldBegin(ERROR_MESSAGE_FIELD_DESC);
oprot.writeString(struct.errorMessage);
oprot.writeFieldEnd();
}
}
if (struct.taskStatus != null) {
if (struct.isSetTaskStatus()) {
oprot.writeFieldBegin(TASK_STATUS_FIELD_DESC);
oprot.writeString(struct.taskStatus);
oprot.writeFieldEnd();
}
}
if (struct.isSetOperationStarted()) {
oprot.writeFieldBegin(OPERATION_STARTED_FIELD_DESC);
oprot.writeI64(struct.operationStarted);
oprot.writeFieldEnd();
}
if (struct.isSetOperationCompleted()) {
oprot.writeFieldBegin(OPERATION_COMPLETED_FIELD_DESC);
oprot.writeI64(struct.operationCompleted);
oprot.writeFieldEnd();
}
if (struct.isSetHasResultSet()) {
oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC);
oprot.writeBool(struct.hasResultSet);
oprot.writeFieldEnd();
}
if (struct.progressUpdateResponse != null) {
if (struct.isSetProgressUpdateResponse()) {
oprot.writeFieldBegin(PROGRESS_UPDATE_RESPONSE_FIELD_DESC);
struct.progressUpdateResponse.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetOperationStatusRespTupleSchemeFactory implements SchemeFactory {
public TGetOperationStatusRespTupleScheme getScheme() {
return new TGetOperationStatusRespTupleScheme();
}
}
private static class TGetOperationStatusRespTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
struct.status.write(oprot);
BitSet optionals = new BitSet();
if (struct.isSetOperationState()) {
optionals.set(0);
}
if (struct.isSetSqlState()) {
optionals.set(1);
}
if (struct.isSetErrorCode()) {
optionals.set(2);
}
if (struct.isSetErrorMessage()) {
optionals.set(3);
}
if (struct.isSetTaskStatus()) {
optionals.set(4);
}
if (struct.isSetOperationStarted()) {
optionals.set(5);
}
if (struct.isSetOperationCompleted()) {
optionals.set(6);
}
if (struct.isSetHasResultSet()) {
optionals.set(7);
}
if (struct.isSetProgressUpdateResponse()) {
optionals.set(8);
}
oprot.writeBitSet(optionals, 9);
if (struct.isSetOperationState()) {
oprot.writeI32(struct.operationState.getValue());
}
if (struct.isSetSqlState()) {
oprot.writeString(struct.sqlState);
}
if (struct.isSetErrorCode()) {
oprot.writeI32(struct.errorCode);
}
if (struct.isSetErrorMessage()) {
oprot.writeString(struct.errorMessage);
}
if (struct.isSetTaskStatus()) {
oprot.writeString(struct.taskStatus);
}
if (struct.isSetOperationStarted()) {
oprot.writeI64(struct.operationStarted);
}
if (struct.isSetOperationCompleted()) {
oprot.writeI64(struct.operationCompleted);
}
if (struct.isSetHasResultSet()) {
oprot.writeBool(struct.hasResultSet);
}
if (struct.isSetProgressUpdateResponse()) {
struct.progressUpdateResponse.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.status = new TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.operationState = org.apache.hive.service.rpc.thrift.TOperationState.findByValue(iprot.readI32());
struct.setOperationStateIsSet(true);
}
if (incoming.get(1)) {
struct.sqlState = iprot.readString();
struct.setSqlStateIsSet(true);
}
if (incoming.get(2)) {
struct.errorCode = iprot.readI32();
struct.setErrorCodeIsSet(true);
}
if (incoming.get(3)) {
struct.errorMessage = iprot.readString();
struct.setErrorMessageIsSet(true);
}
if (incoming.get(4)) {
struct.taskStatus = iprot.readString();
struct.setTaskStatusIsSet(true);
}
if (incoming.get(5)) {
struct.operationStarted = iprot.readI64();
struct.setOperationStartedIsSet(true);
}
if (incoming.get(6)) {
struct.operationCompleted = iprot.readI64();
struct.setOperationCompletedIsSet(true);
}
if (incoming.get(7)) {
struct.hasResultSet = iprot.readBool();
struct.setHasResultSetIsSet(true);
}
if (incoming.get(8)) {
struct.progressUpdateResponse = new TProgressUpdateResp();
struct.progressUpdateResponse.read(iprot);
struct.setProgressUpdateResponseIsSet(true);
}
}
}
}