public static QueryId getQueryIdFromString(final String queryId) { final UUID uuid = UUID.fromString(queryId); return QueryId.newBuilder().setPart1(uuid.getMostSignificantBits()).setPart2(uuid.getLeastSignificantBits()).build(); }
/** * <code>optional .exec.shared.QueryId query_id = 1;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 13;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .exec.shared.QueryId prepare_id = 3;</code> */ public Builder setPrepareId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (prepareIdBuilder_ == null) { prepareId_ = builderForValue.build(); onChanged(); } else { prepareIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .exec.shared.QueryId prepare_id = 24;</code> */ public Builder setPrepareId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (prepareIdBuilder_ == null) { prepareId_ = builderForValue.build(); onChanged(); } else { prepareIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00080000; return this; } /**
/** * <code>optional .exec.shared.QueryId id = 1;</code> */ public Builder setId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (idBuilder_ == null) { id_ = builderForValue.build(); onChanged(); } else { idBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 13;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 13;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 13;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 2;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 1;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 3;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 1;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.shared.QueryId id = 1;</code> */ public Builder setId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (idBuilder_ == null) { id_ = builderForValue.build(); onChanged(); } else { idBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 13;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 1;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /**
/** * <code>optional .exec.shared.QueryId query_id = 13;</code> */ public Builder setQueryId( com.dremio.exec.proto.UserBitShared.QueryId.Builder builderForValue) { if (queryIdBuilder_ == null) { queryId_ = builderForValue.build(); onChanged(); } else { queryIdBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; return this; } /**
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); } }
/** * @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(); }