/** * Maps internal low-level API protocol to {@link UserResultsListener}-level API protocol. * handles query data messages */ public void batchArrived( ConnectionThrottle throttle, ByteBuf pBody, ByteBuf dBody ) throws RpcException { final QueryData queryData = RpcBus.get( pBody, QueryData.PARSER ); // Current batch coming in. final DrillBuf drillBuf = (DrillBuf) dBody; final QueryDataBatch batch = new QueryDataBatch( queryData, drillBuf ); final QueryId queryId = queryData.getQueryId(); if (logger.isDebugEnabled()) { logger.debug("batchArrived: queryId = {}", QueryIdHelper.getQueryId(queryId)); } logger.trace( "batchArrived: batch = {}", batch ); final UserResultsListener resultsListener = newUserResultsListener(queryId); // A data case--pass on via dataArrived try { resultsListener.dataArrived(batch, throttle); // That releases batch if successful. } catch ( Exception e ) { batch.release(); resultsListener.submissionFailed(UserException.systemError(e).build(logger)); } }
public Builder mergeFrom(org.apache.drill.exec.proto.UserBitShared.QueryData other) { if (other == org.apache.drill.exec.proto.UserBitShared.QueryData.getDefaultInstance()) return this; if (other.hasQueryId()) { mergeQueryId(other.getQueryId()); } if (other.hasRowCount()) { setRowCount(other.getRowCount()); } if (other.hasDef()) { mergeDef(other.getDef()); } if (other.hasAffectedRowsCount()) { setAffectedRowsCount(other.getAffectedRowsCount()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.QueryData message) throws java.io.IOException { if(message.hasQueryId()) output.writeObject(1, message.getQueryId(), org.apache.drill.exec.proto.SchemaUserBitShared.QueryId.WRITE, false); if(message.hasRowCount()) output.writeInt32(2, message.getRowCount(), false); if(message.hasDef()) output.writeObject(3, message.getDef(), org.apache.drill.exec.proto.SchemaUserBitShared.RecordBatchDef.WRITE, false); if(message.hasAffectedRowsCount()) output.writeInt32(4, message.getAffectedRowsCount(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryData message)
public Builder mergeFrom(org.apache.drill.exec.proto.UserBitShared.QueryData other) { if (other == org.apache.drill.exec.proto.UserBitShared.QueryData.getDefaultInstance()) return this; if (other.hasQueryId()) { mergeQueryId(other.getQueryId()); } if (other.hasRowCount()) { setRowCount(other.getRowCount()); } if (other.hasDef()) { mergeDef(other.getDef()); } if (other.hasAffectedRowsCount()) { setAffectedRowsCount(other.getAffectedRowsCount()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.QueryData message) throws java.io.IOException { if(message.hasQueryId()) output.writeObject(1, message.getQueryId(), org.apache.drill.exec.proto.SchemaUserBitShared.QueryId.WRITE, false); if(message.hasRowCount()) output.writeInt32(2, message.getRowCount(), false); if(message.hasDef()) output.writeObject(3, message.getDef(), org.apache.drill.exec.proto.SchemaUserBitShared.RecordBatchDef.WRITE, false); if(message.hasAffectedRowsCount()) output.writeInt32(4, message.getAffectedRowsCount(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryData message)