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

Method InsertOrUpdate

be/src/scheduling/scheduler.cc:1915–1928  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1913}
1914
1915void Scheduler::AddressableAssignmentHeap::InsertOrUpdate(
1916 const IpAddr& ip, int64_t assigned_bytes, int rank) {
1917 auto handle_it = executor_handles_.find(ip);
1918 if (handle_it == executor_handles_.end()) {
1919 AssignmentHeap::handle_type handle = executor_heap_.push({assigned_bytes, rank, ip});
1920 executor_handles_.emplace(ip, handle);
1921 } else {
1922 // We need to rebuild the heap after every update operation. Calling decrease once is
1923 // sufficient as both assignments decrease the key.
1924 AssignmentHeap::handle_type handle = handle_it->second;
1925 (*handle).assigned_bytes += assigned_bytes;
1926 executor_heap_.decrease(handle);
1927 }
1928}
1929}

Callers 1

Calls 3

pushMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected