public static QueryId getQueryIdFromString(final String queryId) { final UUID uuid = UUID.fromString(queryId); return QueryId.newBuilder().setPart1(uuid.getMostSignificantBits()).setPart2(uuid.getLeastSignificantBits()).build(); }
private QueryContext newQueryContext(SqlQuery query) { try (TimedBlock b = time("initParser")) { QueryId queryId = QueryId.newBuilder().setPart1(ID_MAJOR).setPart2(ID_MINOR.incrementAndGet()).build(); UserSession session = UserSession.Builder.newBuilder() .withCredentials(UserCredentials.newBuilder() .setUserName(query.getUsername()) .build()) .withUserProperties(UserProperties.getDefaultInstance()) .withOptionManager(sabotContext.getOptionManager()) .build(); return new QueryContext(session, sabotContext, queryId); } }
int baseNumAllocators = getNumAllocators(); UserBitShared.QueryId queryId = UserBitShared.QueryId.newBuilder().setPart1(12).setPart2(23).build(); QueryTicketGetter qtg1 = new QueryTicketGetter(); clerk.buildAndStartQuery(getDummyPlan(queryId,1,0), getDummySchedulingInfo(), qtg1);
public void mergeFrom(io.protostuff.Input input, com.dremio.exec.proto.UserBitShared.QueryId.Builder builder) throws java.io.IOException { for(int number = input.readFieldNumber(this);; number = input.readFieldNumber(this)) { switch(number) { case 0: return; case 1: builder.setPart1(input.readSFixed64()); break; case 2: builder.setPart2(input.readSFixed64()); break; default: input.handleUnknownField(number, this); } } } public boolean isInitialized(com.dremio.exec.proto.UserBitShared.QueryId.Builder builder)
/** * @return internal QueryId corresponding to this attempt id */ public QueryId toQueryId() { final long part1 = externalId.getPart1(); final long part2 = externalId.getPart2(); return QueryId.newBuilder() .setPart1(part1) .setPart2(part2 + ((byte) attempt & MASK)) .build(); }
public static QueryId toQueryId(final ExternalId externalId) { return QueryId.newBuilder() .setPart1(externalId.getPart1()) .setPart2(externalId.getPart2()) .build(); }
public Builder mergeFrom(com.dremio.exec.proto.UserBitShared.QueryId other) { if (other == com.dremio.exec.proto.UserBitShared.QueryId.getDefaultInstance()) return this; if (other.hasPart1()) { setPart1(other.getPart1()); } if (other.hasPart2()) { setPart2(other.getPart2()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }