@Override public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new TExecuteStatementReq(); struct.req.read(iprot); struct.setReqIsSet(true); } } }
case SESSION_HANDLE: if (value == null) { unsetSessionHandle(); } else { setSessionHandle((TSessionHandle)value); unsetStatement(); } else { setStatement((String)value); unsetConfOverlay(); } else { setConfOverlay((Map<String,String>)value); unsetRunAsync(); } else { setRunAsync((Boolean)value);
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TExecuteStatementReq) return this.equals((TExecuteStatementReq)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case SESSION_HANDLE: return getSessionHandle(); case STATEMENT: return getStatement(); case CONF_OVERLAY: return getConfOverlay(); case RUN_ASYNC: return Boolean.valueOf(isRunAsync()); } 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 SESSION_HANDLE: return isSetSessionHandle(); case STATEMENT: return isSetStatement(); case CONF_OVERLAY: return isSetConfOverlay(); case RUN_ASYNC: return isSetRunAsync(); } throw new IllegalStateException(); }
private OperationHandle executeStatementInternal(SessionHandle sessionHandle, String statement, Map<String, String> confOverlay, boolean isAsync) throws HiveSQLException { try { TExecuteStatementReq req = new TExecuteStatementReq(sessionHandle.toTSessionHandle(), statement); req.setConfOverlay(confOverlay); req.setRunAsync(isAsync); TExecuteStatementResp resp = cliService.ExecuteStatement(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
/** * Performs a deep copy on <i>other</i>. */ public TExecuteStatementReq(TExecuteStatementReq other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSessionHandle()) { this.sessionHandle = new TSessionHandle(other.sessionHandle); } if (other.isSetStatement()) { this.statement = other.statement; } if (other.isSetConfOverlay()) { Map<String,String> __this__confOverlay = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.confOverlay.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__confOverlay_copy_key = other_element_key; String __this__confOverlay_copy_value = other_element_value; __this__confOverlay.put(__this__confOverlay_copy_key, __this__confOverlay_copy_value); } this.confOverlay = __this__confOverlay; } this.runAsync = other.runAsync; }
public void write(org.apache.thrift.protocol.TProtocol oprot, TExecuteStatementReq struct) throws org.apache.thrift.TException { struct.validate(); if (struct.isSetConfOverlay()) { oprot.writeFieldBegin(CONF_OVERLAY_FIELD_DESC); if (struct.isSetRunAsync()) { oprot.writeFieldBegin(RUN_ASYNC_FIELD_DESC); oprot.writeBool(struct.runAsync);
if (isSetConfOverlay()) { if (!first) sb.append(", "); sb.append("confOverlay:"); if (isSetRunAsync()) { if (!first) sb.append(", "); sb.append("runAsync:");
public TExecuteStatementReq deepCopy() { return new TExecuteStatementReq(this); }
/** 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 SESSION_HANDLE: return isSetSessionHandle(); case STATEMENT: return isSetStatement(); case CONF_OVERLAY: return isSetConfOverlay(); case RUN_ASYNC: return isSetRunAsync(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case SESSION_HANDLE: return getSessionHandle(); case STATEMENT: return getStatement(); case CONF_OVERLAY: return getConfOverlay(); case RUN_ASYNC: return Boolean.valueOf(isRunAsync()); } throw new IllegalStateException(); }
private OperationHandle executeStatementInternal(SessionHandle sessionHandle, String statement, Map<String, String> confOverlay, boolean isAsync) throws HiveSQLException { try { TExecuteStatementReq req = new TExecuteStatementReq(sessionHandle.toTSessionHandle(), statement); req.setConfOverlay(confOverlay); req.setRunAsync(isAsync); TExecuteStatementResp resp = cliService.ExecuteStatement(req); checkStatus(resp.getStatus()); TProtocolVersion protocol = sessionHandle.getProtocolVersion(); return new OperationHandle(resp.getOperationHandle(), protocol); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
/** * Performs a deep copy on <i>other</i>. */ public TExecuteStatementReq(TExecuteStatementReq other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetSessionHandle()) { this.sessionHandle = new TSessionHandle(other.sessionHandle); } if (other.isSetStatement()) { this.statement = other.statement; } if (other.isSetConfOverlay()) { Map<String,String> __this__confOverlay = new HashMap<String,String>(); for (Map.Entry<String, String> other_element : other.confOverlay.entrySet()) { String other_element_key = other_element.getKey(); String other_element_value = other_element.getValue(); String __this__confOverlay_copy_key = other_element_key; String __this__confOverlay_copy_value = other_element_value; __this__confOverlay.put(__this__confOverlay_copy_key, __this__confOverlay_copy_value); } this.confOverlay = __this__confOverlay; } this.runAsync = other.runAsync; }
public void write(org.apache.thrift.protocol.TProtocol oprot, TExecuteStatementReq struct) throws org.apache.thrift.TException { struct.validate(); if (struct.isSetConfOverlay()) { oprot.writeFieldBegin(CONF_OVERLAY_FIELD_DESC); if (struct.isSetRunAsync()) { oprot.writeFieldBegin(RUN_ASYNC_FIELD_DESC); oprot.writeBool(struct.runAsync);
if (isSetConfOverlay()) { if (!first) sb.append(", "); sb.append("confOverlay:"); if (isSetRunAsync()) { if (!first) sb.append(", "); sb.append("runAsync:");
public TExecuteStatementReq deepCopy() { return new TExecuteStatementReq(this); }
case SESSION_HANDLE: if (value == null) { unsetSessionHandle(); } else { setSessionHandle((TSessionHandle)value); unsetStatement(); } else { setStatement((String)value); unsetConfOverlay(); } else { setConfOverlay((Map<String,String>)value); unsetRunAsync(); } else { setRunAsync((Boolean)value);
/** 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 SESSION_HANDLE: return isSetSessionHandle(); case STATEMENT: return isSetStatement(); case CONF_OVERLAY: return isSetConfOverlay(); case RUN_ASYNC: return isSetRunAsync(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case SESSION_HANDLE: return getSessionHandle(); case STATEMENT: return getStatement(); case CONF_OVERLAY: return getConfOverlay(); case RUN_ASYNC: return Boolean.valueOf(isRunAsync()); } throw new IllegalStateException(); }