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

Method TransferProbeStreamReservation

be/src/exec/partitioned-hash-join-builder.cc:690–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690Status PhjBuilder::TransferProbeStreamReservation(
691 BufferPool::ClientHandle* probe_client) {
692 DCHECK_EQ(is_separate_build_, probe_client != buffer_pool_client_);
693 int64_t probe_reservation = CalcProbeStreamReservation(state_);
694 VLOG(3) << "PHJ(node_id=" << join_node_id_ << ") will transfer " << probe_reservation
695 << " to probe client.";
696 if (probe_reservation == 0) return Status::OK();
697 DCHECK_GE(probe_stream_reservation_.GetReservation(), probe_reservation);
698
699 buffer_pool_client_->RestoreReservation(&probe_stream_reservation_, probe_reservation);
700 if (is_separate_build_) {
701 bool success;
702 RETURN_IF_ERROR(buffer_pool_client_->TransferReservationTo(
703 probe_client, probe_reservation, &success));
704 DCHECK(success) << "Transferring within query shouldn't violate reservation limits.";
705 }
706 return Status::OK();
707}
708
709int64_t PhjBuilder::CalcProbeStreamReservation(HashJoinState next_state) const {
710 // We need a read buffer if the input is a spilled partition (i.e. we are repartitioning

Callers

nothing calls this directly

Calls 4

OKFunction · 0.85
RestoreReservationMethod · 0.80
GetReservationMethod · 0.45
TransferReservationToMethod · 0.45

Tested by

no test coverage detected