/** * <code>optional .exec.bit.control.QueryContextInformation context = 16;</code> */ public Builder mergeContext(com.dremio.exec.proto.CoordExecRPC.QueryContextInformation value) { if (contextBuilder_ == null) { if (((bitField0_ & 0x00002000) == 0x00002000) && context_ != com.dremio.exec.proto.CoordExecRPC.QueryContextInformation.getDefaultInstance()) { context_ = com.dremio.exec.proto.CoordExecRPC.QueryContextInformation.newBuilder(context_).mergeFrom(value).buildPartial(); } else { context_ = value; } onChanged(); } else { contextBuilder_.mergeFrom(value); } bitField0_ |= 0x00002000; return this; } /**
/** * Create QueryContextInformation with given <i>defaultSchemaName</i>. Rest of the members of the * QueryContextInformation is derived from the current state of the process. * * @param defaultSchemaName * @return */ public static QueryContextInformation createQueryContextInfo(final String defaultSchemaName, QueryPriority priority, long maxAllocation) { final long queryStartTime = System.currentTimeMillis(); final int timeZone = DateUtility.getIndex(System.getProperty("user.timezone")); FragmentPriority.Builder priorityBuilder = FragmentPriority.newBuilder(); if(priority != null){ priorityBuilder.setWorkloadClass(priority.getWorkloadClass()); } else { priorityBuilder.setWorkloadClass(WorkloadClass.GENERAL); } return QueryContextInformation.newBuilder() .setDefaultSchemaName(defaultSchemaName) .setQueryStartTime(queryStartTime) .setTimeZone(timeZone) .setPriority(priorityBuilder) .setQueryMaxAllocation(maxAllocation) .build(); }
CoordExecRPC.QueryContextInformation queryContextInformation = CoordExecRPC.QueryContextInformation.newBuilder (queryContextInfo) .setQueryMaxAllocation(wrapper.getMaxAllocation()).build();
break; case 16: builder.setContext(input.mergeObject(com.dremio.exec.proto.CoordExecRPC.QueryContextInformation.newBuilder(), com.dremio.exec.proto.SchemaCoordExecRPC.QueryContextInformation.MERGE));
if (memoryControlEnabled && memoryLimit > 0) { final long queryMaxAllocation = queryContext.getQueryContextInfo().getQueryMaxAllocation(); queryContextInformation = CoordExecRPC.QueryContextInformation.newBuilder(queryContextInformation) .setQueryMaxAllocation(Math.min(memoryLimit, queryMaxAllocation)).build();
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.dremio.exec.proto.CoordExecRPC.QueryContextInformation prototype) {
public static Builder newBuilder(com.dremio.exec.proto.CoordExecRPC.QueryContextInformation prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public com.dremio.exec.proto.CoordExecRPC.QueryContextInformation.Builder newMessage() { return com.dremio.exec.proto.CoordExecRPC.QueryContextInformation.newBuilder(); } public java.lang.String getFieldName(int number)
@Override public CoordExecRPC.QueryContextInformation getQueryContextInfo() { return CoordExecRPC.QueryContextInformation.newBuilder() .setQueryMaxAllocation(Long.MAX_VALUE) .setPriority ( CoordExecRPC.FragmentPriority.newBuilder().setWorkloadClass(UserBitShared.WorkloadClass.GENERAL).build() ) .build(); }