public static String getQueryId(final QueryId queryId) { return (new UUID(queryId.getPart1(), queryId.getPart2())).toString(); }
final QueryId id = profile.getPrepareId(); zip.putNextEntry(new ZipEntry(String.format("prepare_profile_attempt_%d.json", attemptIndex))); JobId prepareId = new JobId(new UUID(id.getPart1(), id.getPart2()).toString()); recordProfile(zip, prepareId, 0);
private JobId toId(QueryId id){ return new JobId(new UUID(id.getPart1(), id.getPart2()).toString()); }
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.UserBitShared.QueryId message) throws java.io.IOException { if(message.hasPart1()) output.writeSFixed64(1, message.getPart1(), false); if(message.hasPart2()) output.writeSFixed64(2, message.getPart2(), false); } public boolean isInitialized(com.dremio.exec.proto.UserBitShared.QueryId message)
/** * Convert a query id to an attemp id * @param queryId * @return */ public static AttemptId of(final QueryId queryId) { ExternalId externalId = ExternalIdHelper.toExternal(queryId); int attempt = (int) (queryId.getPart2() & MASK); return new AttemptId(externalId, attempt); }
@Deprecated // Dremio still uses QueryId internally, once we switch to using AttemptId we can get rid of this public static ExternalId toExternal(final QueryId queryId) { return ExternalId.newBuilder() .setPart1(queryId.getPart1()) .setPart2(queryId.getPart2() & MASK) .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; }