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

Method CloseReader

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

Source from the content-addressed store, hash-verified

703}
704
705void ScanRange::CloseReader(const unique_lock<mutex>& scan_range_lock) {
706 if (all_buffers_returned(scan_range_lock) &&
707 buffer_manager_->num_buffers_in_reader() == 0) {
708 // Close the readers if there are no more buffers in the reader and no more buffers
709 // will be returned to readers in future. Close() is idempotent so it is ok to call
710 // multiple times during cleanup so long as the range is actually finished.
711 if (!use_local_buffer_) {
712 file_reader_->Close();
713 } else {
714 local_buffer_reader_->Close();
715 }
716 }
717}
718
719BufferDescriptor::BufferDescriptor(ScanRange* scan_range,
720 uint8_t* buffer, int64_t buffer_len)

Callers 1

CleanUpBufferMethod · 0.80

Calls 2

num_buffers_in_readerMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected