public Builder mergeFrom(org.apache.drill.exec.proto.UserBitShared.QueryResult other) { if (other == org.apache.drill.exec.proto.UserBitShared.QueryResult.getDefaultInstance()) return this; if (other.hasQueryState()) { setQueryState(other.getQueryState()); if (other.hasQueryId()) { mergeQueryId(other.getQueryId()); this.mergeUnknownFields(other.getUnknownFields()); return this;
public org.apache.drill.exec.proto.UserBitShared.QueryResult buildPartial() { org.apache.drill.exec.proto.UserBitShared.QueryResult result = new org.apache.drill.exec.proto.UserBitShared.QueryResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.queryState_ = queryState_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (queryIdBuilder_ == null) { result.queryId_ = queryId_; } else { result.queryId_ = queryIdBuilder_.build(); } if (errorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004)) { error_ = java.util.Collections.unmodifiableList(error_); bitField0_ = (bitField0_ & ~0x00000004); } result.error_ = error_; } else { result.error_ = errorBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.apache.drill.exec.proto.UserBitShared.QueryResult.getDescriptor().getEnumTypes().get(0); }
final QueryResult.Builder resultBuilder = QueryResult.newBuilder() .setQueryId(queryId) .setQueryState(resultState);
final QueryResult queryResult = RpcBus.get( pBody, QueryResult.PARSER ); final QueryId queryId = queryResult.getQueryId(); final QueryState queryState = queryResult.getQueryState(); assert queryResult.hasQueryState() : "received query result without QueryState"; assert isFailureResult || queryResult.getErrorCount() == 0 : "Error count for the query batch is non-zero but QueryState != FAILED"; resultsListener.submissionFailed(new UserRemoteException(queryResult.getError(0)));
return QueryId.getDefaultInstance(); case RpcType.QUERY_RESULT_VALUE: return QueryResult.getDefaultInstance(); case RpcType.QUERY_DATA_VALUE: return QueryData.getDefaultInstance();
public Builder mergeFrom(org.apache.drill.exec.proto.UserBitShared.QueryResult other) { if (other == org.apache.drill.exec.proto.UserBitShared.QueryResult.getDefaultInstance()) return this; if (other.hasQueryState()) { setQueryState(other.getQueryState()); if (other.hasQueryId()) { mergeQueryId(other.getQueryId()); this.mergeUnknownFields(other.getUnknownFields()); return this;
public org.apache.drill.exec.proto.UserBitShared.QueryResult buildPartial() { org.apache.drill.exec.proto.UserBitShared.QueryResult result = new org.apache.drill.exec.proto.UserBitShared.QueryResult(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.queryState_ = queryState_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } if (queryIdBuilder_ == null) { result.queryId_ = queryId_; } else { result.queryId_ = queryIdBuilder_.build(); } if (errorBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004)) { error_ = java.util.Collections.unmodifiableList(error_); bitField0_ = (bitField0_ & ~0x00000004); } result.error_ = error_; } else { result.error_ = errorBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@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); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.QueryResult prototype) {
public org.apache.drill.exec.proto.UserBitShared.QueryResult getDefaultInstanceForType() { return org.apache.drill.exec.proto.UserBitShared.QueryResult.getDefaultInstance(); }
public Builder toBuilder() { return newBuilder(this); }
public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.QueryResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public org.apache.drill.exec.proto.UserBitShared.QueryResult.Builder newMessage() { return org.apache.drill.exec.proto.UserBitShared.QueryResult.newBuilder(); } public java.lang.String getFieldName(int number)
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.apache.drill.exec.proto.UserBitShared.QueryResult.getDescriptor().getEnumTypes().get(0); }
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 Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.QueryResult prototype) {
public org.apache.drill.exec.proto.UserBitShared.QueryResult getDefaultInstanceForType() { return org.apache.drill.exec.proto.UserBitShared.QueryResult.getDefaultInstance(); }
public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.QueryResult prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }