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

Method AllocateBuffersForRange

be/src/runtime/io/scan-range.cc:680–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678}
679
680Status ScanRange::AllocateBuffersForRange(
681 BufferPool::ClientHandle* bp_client, int64_t max_bytes,
682 int64_t min_buffer_size, int64_t max_buffer_size) {
683 vector<unique_ptr<BufferDescriptor>> buffers;
684 Status status = buffer_manager_->AllocateBuffersForRange(bp_client, max_bytes, buffers,
685 min_buffer_size, max_buffer_size);
686 if (!status.ok() && !buffers.empty()) {
687 unique_lock<mutex> lock(lock_);
688 buffer_manager_->CleanUpBuffers(lock, move(buffers));
689 } else {
690 AddUnusedBuffers(move(buffers), false);
691 }
692 return status;
693}
694
695void ScanRange::ScheduleScanRange() {
696 unique_lock<mutex> reader_lock(reader_->lock_);

Callers 7

AddAndStartStreamMethod · 0.45
GetNextBufferMethod · 0.45
StartNextScanRangeMethod · 0.45
ValidateSyncReadMethod · 0.45
ScanRangeThreadMethod · 0.45
TEST_FFunction · 0.45
ClientThreadMethod · 0.45

Calls 4

moveFunction · 0.85
CleanUpBuffersMethod · 0.80
okMethod · 0.45
emptyMethod · 0.45

Tested by 3

ValidateSyncReadMethod · 0.36
ScanRangeThreadMethod · 0.36
TEST_FFunction · 0.36