@Override public void read(org.apache.thrift.protocol.TProtocol prot, FetchResults_args struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.req = new TFetchResultsReq(); struct.req.read(iprot); struct.setReqIsSet(true); } } }
case OPERATION_HANDLE: if (value == null) { unsetOperationHandle(); } else { setOperationHandle((TOperationHandle)value); unsetOrientation(); } else { setOrientation((TFetchOrientation)value); unsetMaxRows(); } else { setMaxRows((Long)value); unsetFetchType(); } else { setFetchType((Short)value);
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TFetchResultsReq) return this.equals((TFetchResultsReq)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case OPERATION_HANDLE: return getOperationHandle(); case ORIENTATION: return getOrientation(); case MAX_ROWS: return Long.valueOf(getMaxRows()); case FETCH_TYPE: return Short.valueOf(getFetchType()); } 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 OPERATION_HANDLE: return isSetOperationHandle(); case ORIENTATION: return isSetOrientation(); case MAX_ROWS: return isSetMaxRows(); case FETCH_TYPE: return isSetFetchType(); } throw new IllegalStateException(); }
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
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)) boolean this_present_orientation = true && this.isSetOrientation(); boolean that_present_orientation = true && that.isSetOrientation(); if (this_present_orientation || that_present_orientation) { if (!(this_present_orientation && that_present_orientation)) boolean this_present_fetchType = true && this.isSetFetchType(); boolean that_present_fetchType = true && that.isSetFetchType(); if (this_present_fetchType || that_present_fetchType) { if (!(this_present_fetchType && that_present_fetchType))
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()); } if (!isSetOrientation()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'orientation' is unset! Struct:" + toString()); } if (!isSetMaxRows()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxRows' is unset! Struct:" + toString()); } // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); } }
public TFetchResultsReq deepCopy() { return new TFetchResultsReq(this); }
try { if (stmtHandle != null) { TFetchResultsReq tFetchResultsReq = new TFetchResultsReq(stmtHandle, getFetchOrientation(incremental), fetchSize); tFetchResultsReq.setFetchType((short)1); tFetchResultsResp = client.FetchResults(tFetchResultsReq); Utils.verifySuccessWithInfo(tFetchResultsResp.getStatus());
/** * Performs a deep copy on <i>other</i>. */ public TFetchResultsReq(TFetchResultsReq other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetOperationHandle()) { this.operationHandle = new TOperationHandle(other.operationHandle); } if (other.isSetOrientation()) { this.orientation = other.orientation; } this.maxRows = other.maxRows; this.fetchType = other.fetchType; }
public void write(org.apache.thrift.protocol.TProtocol oprot, TFetchResultsReq struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.operationHandle != null) { oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC); struct.operationHandle.write(oprot); oprot.writeFieldEnd(); } if (struct.orientation != null) { oprot.writeFieldBegin(ORIENTATION_FIELD_DESC); oprot.writeI32(struct.orientation.getValue()); oprot.writeFieldEnd(); } oprot.writeFieldBegin(MAX_ROWS_FIELD_DESC); oprot.writeI64(struct.maxRows); oprot.writeFieldEnd(); if (struct.isSetFetchType()) { oprot.writeFieldBegin(FETCH_TYPE_FIELD_DESC); oprot.writeI16(struct.fetchType); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
sb.append(this.maxRows); first = false; if (isSetFetchType()) { if (!first) sb.append(", "); sb.append("fetchType:");
@Override public RowSet fetchResults(OperationHandle opHandle, FetchOrientation orientation, long maxRows, FetchType fetchType) throws HiveSQLException { try { TFetchResultsReq req = new TFetchResultsReq(); req.setOperationHandle(opHandle.toTOperationHandle()); req.setOrientation(orientation.toTFetchOrientation()); req.setMaxRows(maxRows); req.setFetchType(fetchType.toTFetchType()); TFetchResultsResp resp = cliService.FetchResults(req); checkStatus(resp.getStatus()); return RowSetFactory.create(resp.getResults(), opHandle.getProtocolVersion()); } catch (HiveSQLException e) { throw e; } catch (Exception e) { throw new HiveSQLException(e); } }
public Object getFieldValue(_Fields field) { switch (field) { case OPERATION_HANDLE: return getOperationHandle(); case ORIENTATION: return getOrientation(); case MAX_ROWS: return Long.valueOf(getMaxRows()); case FETCH_TYPE: return Short.valueOf(getFetchType()); } 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 OPERATION_HANDLE: return isSetOperationHandle(); case ORIENTATION: return isSetOrientation(); case MAX_ROWS: return isSetMaxRows(); case FETCH_TYPE: return isSetFetchType(); } throw new IllegalStateException(); }
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)) boolean this_present_orientation = true && this.isSetOrientation(); boolean that_present_orientation = true && that.isSetOrientation(); if (this_present_orientation || that_present_orientation) { if (!(this_present_orientation && that_present_orientation)) boolean this_present_fetchType = true && this.isSetFetchType(); boolean that_present_fetchType = true && that.isSetFetchType(); if (this_present_fetchType || that_present_fetchType) { if (!(this_present_fetchType && that_present_fetchType))
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()); } if (!isSetOrientation()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'orientation' is unset! Struct:" + toString()); } if (!isSetMaxRows()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxRows' is unset! Struct:" + toString()); } // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); } }
public TFetchResultsReq deepCopy() { return new TFetchResultsReq(this); }
try { if (stmtHandle != null) { TFetchResultsReq tFetchResultsReq = new TFetchResultsReq(stmtHandle, getFetchOrientation(incremental), fetchSize); tFetchResultsReq.setFetchType((short)1); tFetchResultsResp = client.FetchResults(tFetchResultsReq); Utils.verifySuccessWithInfo(tFetchResultsResp.getStatus());