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

Method PrepareForWrite

be/src/runtime/buffered-tuple-stream.cc:225–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225Status BufferedTupleStream::PrepareForWrite(bool* got_reservation) {
226 // This must be the first iterator created.
227 DCHECK(pages_.empty());
228 DCHECK(!read_it_.attach_on_read_);
229 DCHECK(!has_write_iterator());
230 DCHECK(!has_read_iterator());
231 CHECK_CONSISTENCY_FULL(read_it_);
232
233 *got_reservation = buffer_pool_client_->IncreaseReservationToFit(default_page_len_);
234 if (!*got_reservation) return Status::OK();
235 has_write_iterator_ = true;
236 // Save reservation for the write iterators.
237 buffer_pool_client_->SaveReservation(&write_page_reservation_, default_page_len_);
238 CHECK_CONSISTENCY_FULL(read_it_);
239 return Status::OK();
240}
241
242Status BufferedTupleStream::PrepareForReadWrite(
243 bool attach_on_read, bool* got_reservation) {

Callers 7

TestValuesMethod · 0.45
TestUnpinPinMethod · 0.45
TestTransferMemoryMethod · 0.45
TestAttachMemoryMethod · 0.45
TEST_FFunction · 0.45
TestShortDebugStringMethod · 0.45

Calls 4

OKFunction · 0.85
SaveReservationMethod · 0.80
emptyMethod · 0.45

Tested by 7

TestValuesMethod · 0.36
TestUnpinPinMethod · 0.36
TestTransferMemoryMethod · 0.36
TestAttachMemoryMethod · 0.36
TEST_FFunction · 0.36
TestShortDebugStringMethod · 0.36