mergeQueryId(other.getQueryId());
mergeQueryId(other.getQueryId());
@Override public void sendResult(RpcOutcomeListener<Ack> listener, QueryResult result) { Preconditions.checkState(result.hasQueryState()); // Release the wait latch if the query is terminated. final QueryState state = result.getQueryState(); final QueryId queryId = result.getQueryId(); if (logger.isDebugEnabled()) { logger.debug("Result arrived for QueryId: {} with QueryState: {}", QueryIdHelper.getQueryId(queryId), state); } switch (state) { case FAILED: error = result.getError(0); exception = new UserRemoteException(error); latch.countDown(); break; case CANCELED: case COMPLETED: Preconditions.checkState(result.getErrorCount() == 0); latch.countDown(); break; default: logger.error("Query with QueryId: {} is in unexpected state: {}", queryId, state); } // Notify the listener with ACK listener.success(Acks.OK, null); }
final QueryResult queryResult = RpcBus.get( pBody, QueryResult.PARSER ); final QueryId queryId = queryResult.getQueryId(); final QueryState queryState = queryResult.getQueryState();
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.QueryResult message) throws java.io.IOException { if(message.hasQueryState()) output.writeEnum(1, message.getQueryState().getNumber(), false); if(message.hasQueryId()) output.writeObject(2, message.getQueryId(), org.apache.drill.exec.proto.SchemaUserBitShared.QueryId.WRITE, false); for(org.apache.drill.exec.proto.UserBitShared.DrillPBError error : message.getErrorList()) output.writeObject(3, error, org.apache.drill.exec.proto.SchemaUserBitShared.DrillPBError.WRITE, true); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryResult message)
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.QueryResult message) throws java.io.IOException { if(message.hasQueryState()) output.writeEnum(1, message.getQueryState().getNumber(), false); if(message.hasQueryId()) output.writeObject(2, message.getQueryId(), org.apache.drill.exec.proto.SchemaUserBitShared.QueryId.WRITE, false); for(org.apache.drill.exec.proto.UserBitShared.DrillPBError error : message.getErrorList()) output.writeObject(3, error, org.apache.drill.exec.proto.SchemaUserBitShared.DrillPBError.WRITE, true); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.QueryResult message)