public TCloseOperationReq deepCopy() { return new TCloseOperationReq(this); }
public Object getFieldValue(_Fields field) { switch (field) { case OPERATION_HANDLE: return getOperationHandle(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case OPERATION_HANDLE: if (value == null) { unsetOperationHandle(); } else { setOperationHandle((TOperationHandle)value); } break; } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, CloseOperation_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new TCloseOperationReq(); struct.req.read(iprot); struct.setReqIsSet(true); } } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetOperationHandle()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString()); } // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); } }
TCloseOperationReq closeReq = new TCloseOperationReq(); closeReq.setOperationHandle(stmtHandle); client.CloseOperation(closeReq); TCloseSessionReq closeConnectionReq = new TCloseSessionReq(sessHandle);
public void read(org.apache.thrift.protocol.TProtocol iprot, TCloseOperationReq 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: // OPERATION_HANDLE if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.operationHandle = new TOperationHandle(); struct.operationHandle.read(iprot); struct.setOperationHandleIsSet(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(); }
/** 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 OPERATION_HANDLE: return isSetOperationHandle(); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TCloseOperationReq) return this.equals((TCloseOperationReq)that); return false; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { 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); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TCloseOperationReq struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.operationHandle = new TOperationHandle(); struct.operationHandle.read(iprot); struct.setOperationHandleIsSet(true); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, CloseOperation_args 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: // REQ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.req = new TCloseOperationReq(); struct.req.read(iprot); struct.setReqIsSet(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 boolean equals(TCloseOperationReq that) { if (that == null) return false; boolean this_present_operationHandle = true && this.isSetOperationHandle(); boolean that_present_operationHandle = true && that.isSetOperationHandle(); if (this_present_operationHandle || that_present_operationHandle) { if (!(this_present_operationHandle && that_present_operationHandle)) return false; if (!this.operationHandle.equals(that.operationHandle)) return false; } return true; }
public boolean equals(CloseOperation_args that) { if (that == null) return false; boolean this_present_req = true && this.isSetReq(); boolean that_present_req = true && that.isSetReq(); if (this_present_req || that_present_req) { if (!(this_present_req && that_present_req)) return false; if (!this.req.equals(that.req)) return false; } return true; }
/** * Performs a deep copy on <i>other</i>. */ public CloseOperation_args(CloseOperation_args other) { if (other.isSetReq()) { this.req = new TCloseOperationReq(other.req); } }
@Override public TCloseOperationResp CloseOperation(TCloseOperationReq req) throws TException { TCloseOperationResp resp = new TCloseOperationResp(); try { cliService.closeOperation(new OperationHandle(req.getOperationHandle())); resp.setStatus(OK_STATUS); } catch (Exception e) { LOG.warn("Error closing operation: ", e); resp.setStatus(HiveSQLException.toTStatus(e)); } return resp; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_operationHandle = true && (isSetOperationHandle()); list.add(present_operationHandle); if (present_operationHandle) list.add(operationHandle); return list.hashCode(); }
private void closeOperationHandle(TOperationHandle stmtHandle) throws SQLException { try { if (stmtHandle != null) { TCloseOperationReq closeReq = new TCloseOperationReq(stmtHandle); TCloseOperationResp closeResp = client.CloseOperation(closeReq); Utils.verifySuccessWithInfo(closeResp.getStatus()); } } catch (SQLException e) { throw e; } catch (Exception e) { throw new SQLException(e.toString(), "08S01", e); } }
@Override public TCloseOperationResp CloseOperation(TCloseOperationReq req) throws TException { TCloseOperationResp resp = new TCloseOperationResp(); try { cliService.closeOperation(new OperationHandle(req.getOperationHandle())); resp.setStatus(OK_STATUS); } catch (Exception e) { LOG.warn("Error closing operation: ", e); resp.setStatus(HiveSQLException.toTStatus(e)); } return resp; }
/** * Performs a deep copy on <i>other</i>. */ public TCloseOperationReq(TCloseOperationReq other) { if (other.isSetOperationHandle()) { this.operationHandle = new TOperationHandle(other.operationHandle); } }