hash = (53 * hash) + hashLong(getQueryMaxAllocation());
options.getOption(BasicResourceConstants.SMALL_QUEUE_MEMORY_LIMIT): options.getOption(BasicResourceConstants.LARGE_QUEUE_MEMORY_LIMIT); long queryMaxAllocation = queryContext.getQueryContextInfo().getQueryMaxAllocation(); if (memoryControlEnabled && memoryLimit > 0) { queryMaxAllocation = Math.min(memoryLimit, queryMaxAllocation);
options.getOption(BasicResourceConstants.LARGE_QUEUE_MEMORY_LIMIT); if (memoryControlEnabled && memoryLimit > 0) { final long queryMaxAllocation = queryContext.getQueryContextInfo().getQueryMaxAllocation(); queryContextInformation = CoordExecRPC.QueryContextInformation.newBuilder(queryContextInformation) .setQueryMaxAllocation(Math.min(memoryLimit, queryMaxAllocation)).build();
result = result && (getQueryMaxAllocation() == other.getQueryMaxAllocation());
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; }
/** * Builds and starts a new query, if sufficient resources are available. * In case resources are not available immediately, the query will be started later, when resources become available */ public void buildAndStartQuery(final PlanFragment firstFragment, final SchedulingInfo schedulingInfo, final QueryStarter queryStarter) { final QueryId queryId = firstFragment.getHandle().getQueryId(); // Note: The temporary reference count (released in the finally clause, below) is necessary to guard against races // between potential workload ticket modifications and this function (creation of fragments for queries on the workload) WorkloadTicket workloadTicket = workloadTicketDepot.getWorkloadTicket(schedulingInfo); try { final long queryMaxAllocation = workloadTicket.getChildMaxAllocation(firstFragment.getContext().getQueryMaxAllocation()); workloadTicket.buildAndStartQuery(queryId, queryMaxAllocation, firstFragment.getForeman(), firstFragment.getAssignment(), tunnelCreator, queryStarter); } finally { workloadTicket.release(); } }
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)