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

Method Open

be/src/runtime/spillable-row-batch-queue.cc:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49Status SpillableRowBatchQueue::Open() {
50 // Initialize the ResevationManager and then claim the initial reservation.
51 reservation_manager_.Init(name_, profile_, state_->instance_buffer_reservation(),
52 mem_tracker_, resource_profile_, debug_options_);
53 RETURN_IF_ERROR(reservation_manager_.ClaimBufferReservation(state_));
54
55 // Create the BufferedTupleStream, initialize it, and then create the read and write
56 // buffer pages.
57 batch_queue_ = make_unique<BufferedTupleStream>(state_, row_desc_,
58 reservation_manager_.buffer_pool_client(), resource_profile_.spillable_buffer_size,
59 resource_profile_.max_row_buffer_size);
60 RETURN_IF_ERROR(batch_queue_->Init(name_, true));
61 bool got_reservation = false;
62 RETURN_IF_ERROR(batch_queue_->PrepareForReadWrite(true, &got_reservation));
63 DCHECK(got_reservation) << "SpillableRowBatchQueue failed to get reservation using "
64 << "buffer pool client: "
65 << reservation_manager_.buffer_pool_client()->DebugString();
66 return Status::OK();
67}
68
69Status SpillableRowBatchQueue::AddBatch(RowBatch* batch) {
70 DCHECK(!IsFull()) << "Cannot AddBatch on a full SpillableRowBatchQueue";

Callers

nothing calls this directly

Calls 7

OKFunction · 0.85
PrepareForReadWriteMethod · 0.80
InitMethod · 0.45
buffer_pool_clientMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected