MCPcopy Create free account
hub / github.com/apache/impala / GetMaxReservation

Method GetMaxReservation

be/src/runtime/query-state.cc:325–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325int64_t QueryState::GetMaxReservation() {
326 int64_t mem_limit = query_mem_tracker_->GetLowestLimit(MemLimit::HARD);
327 int64_t max_reservation;
328 if (query_options().__isset.buffer_pool_limit
329 && query_options().buffer_pool_limit > 0) {
330 max_reservation = query_options().buffer_pool_limit;
331 } else if (mem_limit == -1) {
332 // No query mem limit. The process-wide reservation limit is the only limit on
333 // reservations.
334 max_reservation = numeric_limits<int64_t>::max();
335 } else {
336 DCHECK_GE(mem_limit, 0);
337 max_reservation = ReservationUtil::GetReservationLimitFromMemLimit(mem_limit);
338 }
339 return max_reservation;
340}
341
342Status QueryState::InitBufferPoolState() {
343 ExecEnv* exec_env = ExecEnv::GetInstance();

Callers 1

ComputeSpillEstimateMethod · 0.80

Calls 2

maxFunction · 0.85
GetLowestLimitMethod · 0.80

Tested by

no test coverage detected