/** * <code>optional .exec.bit.control.FragmentPriority priority = 18;</code> */ public Builder mergePriority(com.dremio.exec.proto.CoordExecRPC.FragmentPriority value) { if (priorityBuilder_ == null) { if (((bitField0_ & 0x00008000) == 0x00008000) && priority_ != com.dremio.exec.proto.CoordExecRPC.FragmentPriority.getDefaultInstance()) { priority_ = com.dremio.exec.proto.CoordExecRPC.FragmentPriority.newBuilder(priority_).mergeFrom(value).buildPartial(); } else { priority_ = value; } onChanged(); } else { priorityBuilder_.mergeFrom(value); } bitField0_ |= 0x00008000; return this; } /**
/** * <code>optional .exec.bit.control.FragmentPriority priority = 4;</code> */ public Builder mergePriority(com.dremio.exec.proto.CoordExecRPC.FragmentPriority value) { if (priorityBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008) && priority_ != com.dremio.exec.proto.CoordExecRPC.FragmentPriority.getDefaultInstance()) { priority_ = com.dremio.exec.proto.CoordExecRPC.FragmentPriority.newBuilder(priority_).mergeFrom(value).buildPartial(); } else { priority_ = value; } onChanged(); } else { priorityBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; 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(); }
builder.setPriority(input.mergeObject(com.dremio.exec.proto.CoordExecRPC.FragmentPriority.newBuilder(), com.dremio.exec.proto.SchemaCoordExecRPC.FragmentPriority.MERGE));
break; case 4: builder.setPriority(input.mergeObject(com.dremio.exec.proto.CoordExecRPC.FragmentPriority.newBuilder(), com.dremio.exec.proto.SchemaCoordExecRPC.FragmentPriority.MERGE));
protected CoordExecRPC.PlanFragment getDummyPlan(UserBitShared.QueryId queryId, int majorFragmentId, int minorFragmentId){ ExecProtos.FragmentHandle handle = ExecProtos.FragmentHandle .newBuilder() .setQueryId(queryId) .setMajorFragmentId(majorFragmentId) .setMinorFragmentId(minorFragmentId) .build(); CoordExecRPC.FragmentPriority priority = CoordExecRPC.FragmentPriority .newBuilder() .setWorkloadClass(UserBitShared.WorkloadClass.GENERAL) .build(); return CoordExecRPC.PlanFragment .newBuilder() .setHandle(handle) .setPriority(priority) .build(); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.dremio.exec.proto.CoordExecRPC.FragmentPriority prototype) {
public Builder toBuilder() { return newBuilder(this); }
public static Builder newBuilder(com.dremio.exec.proto.CoordExecRPC.FragmentPriority prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }
public com.dremio.exec.proto.CoordExecRPC.FragmentPriority.Builder newMessage() { return com.dremio.exec.proto.CoordExecRPC.FragmentPriority.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(); }