hash = (53 * hash) + getPriority().hashCode();
protected QueueType getQueueNameFromSchedulingProperties(final ResourceSchedulingContext queryContext, final ResourceSchedulingProperties resourceSchedulingProperties) { final Double cost = resourceSchedulingProperties.getQueryCost(); Preconditions.checkNotNull(cost, "Queue Cost is not provided, Unable to determine " + "queue."); final long queueThreshold = queryContext.getOptions().getOption(BasicResourceConstants.QUEUE_THRESHOLD_SIZE); final QueueType queueType; if (queryContext.getQueryContextInfo().getPriority().getWorkloadClass().equals(UserBitShared.WorkloadClass.BACKGROUND)) { queueType = (cost > queueThreshold) ? QueueType.REFLECTION_LARGE : QueueType.REFLECTION_SMALL; } else { queueType = (cost > queueThreshold) ? QueueType.LARGE : QueueType.SMALL; } return queueType; }
.setCredentials(session.getCredentials()) .addAllCollector(CountRequiredFragments.getCollectors(root)) .setPriority(queryContextInfo.getPriority()) .setFragmentCodec(fragmentCodec) .addAllAllAssignment(assignments)
resourceSchedulingDecisionInfo.setQueueName(queueType.name()); resourceSchedulingDecisionInfo.setQueueId(queueType.name()); resourceSchedulingDecisionInfo.setWorkloadClass(queryContext.getQueryContextInfo().getPriority().getWorkloadClass());
result = result && getPriority() .equals(other.getPriority());
public Builder mergeFrom(com.dremio.exec.proto.CoordExecRPC.QueryContextInformation other) { if (other == com.dremio.exec.proto.CoordExecRPC.QueryContextInformation.getDefaultInstance()) return this; if (other.hasQueryStartTime()) { setQueryStartTime(other.getQueryStartTime()); } if (other.hasTimeZone()) { setTimeZone(other.getTimeZone()); } if (other.hasDefaultSchemaName()) { bitField0_ |= 0x00000004; defaultSchemaName_ = other.defaultSchemaName_; onChanged(); } if (other.hasPriority()) { mergePriority(other.getPriority()); } if (other.hasQueryMaxAllocation()) { setQueryMaxAllocation(other.getQueryMaxAllocation()); } if (other.hasExtra()) { setExtra(other.getExtra()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.CoordExecRPC.QueryContextInformation message) throws java.io.IOException { if(message.hasQueryStartTime()) output.writeInt64(1, message.getQueryStartTime(), false); if(message.hasTimeZone()) output.writeInt32(2, message.getTimeZone(), false); if(message.hasDefaultSchemaName()) output.writeString(3, message.getDefaultSchemaName(), false); if(message.hasPriority()) output.writeObject(4, message.getPriority(), com.dremio.exec.proto.SchemaCoordExecRPC.FragmentPriority.WRITE, false); if(message.hasQueryMaxAllocation()) output.writeInt64(5, message.getQueryMaxAllocation(), false); if(message.hasExtra()) output.writeByteArray(6, message.getExtra().toByteArray(), false); } public boolean isInitialized(com.dremio.exec.proto.CoordExecRPC.QueryContextInformation message)
protected void setQueueTypeFromPlan(PhysicalPlan plan) { final long queueThreshold = context.getOptions().getOption(BasicResourceConstants.QUEUE_THRESHOLD_SIZE); if (context.getQueryContextInfo().getPriority().getWorkloadClass().equals(WorkloadClass.BACKGROUND)) { setQueueType((plan.getCost() > queueThreshold) ? QueueType.REFLECTION_LARGE : QueueType.REFLECTION_SMALL); } else { setQueueType((plan.getCost() > queueThreshold) ? QueueType.LARGE : QueueType.SMALL); } }