@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(4); if (incoming.get(0)) { struct.operationState = org.apache.hive.service.cli.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); } }
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.cli.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; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); struct.validate(); }
@Override public void clear() { this.status = null; this.operationState = null; this.sqlState = null; setErrorCodeIsSet(false); this.errorCode = 0; this.errorMessage = null; }
public void setErrorCode(int errorCode) { this.errorCode = errorCode; setErrorCodeIsSet(true); }