@Override public void clear() { this.operationHandle = null; this.orientation = org.apache.hive.service.cli.thrift.TFetchOrientation.FETCH_NEXT; setMaxRowsIsSet(false); this.maxRows = 0; }
public TFetchResultsReq( TOperationHandle operationHandle, TFetchOrientation orientation, long maxRows) { this(); this.operationHandle = operationHandle; this.orientation = orientation; this.maxRows = maxRows; setMaxRowsIsSet(true); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TFetchResultsReq struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.operationHandle = new TOperationHandle(); struct.operationHandle.read(iprot); struct.setOperationHandleIsSet(true); struct.orientation = TFetchOrientation.findByValue(iprot.readI32()); struct.setOrientationIsSet(true); struct.maxRows = iprot.readI64(); struct.setMaxRowsIsSet(true); }
public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchResultsReq 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; case 2: // ORIENTATION if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.orientation = TFetchOrientation.findByValue(iprot.readI32()); struct.setOrientationIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // MAX_ROWS if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.maxRows = iprot.readI64(); struct.setMaxRowsIsSet(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(); // check for required fields of primitive type, which can't be checked in the validate method if (!struct.isSetMaxRows()) { throw new org.apache.thrift.protocol.TProtocolException( "Required field 'maxRows' was not found in serialized data! Struct: " + toString()); } struct.validate(); }
public TFetchResultsReq setMaxRows(long maxRows) { this.maxRows = maxRows; setMaxRowsIsSet(true); return this; }