示例#1
0
 @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);
   }
 }
示例#2
0
 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();
 }
示例#3
0
 @Override
 public void clear() {
   this.status = null;
   this.operationState = null;
   this.sqlState = null;
   setErrorCodeIsSet(false);
   this.errorCode = 0;
   this.errorMessage = null;
 }
示例#4
0
 public void setErrorCode(int errorCode) {
   this.errorCode = errorCode;
   setErrorCodeIsSet(true);
 }