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

Method Close

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

Source from the content-addressed store, hash-verified

259}
260
261void BufferedTupleStream::Close(RowBatch* batch, FlushMode flush) {
262 for (Page& page : pages_) {
263 if (page.attached_to_output_batch) continue; // Already returned.
264 if (batch != nullptr && page.retrieved_buffer.Load()) {
265 // Subtle: We only need to attach buffers from pages that we may have returned
266 // references to.
267 page.AttachBufferToBatch(this, batch, flush);
268 } else {
269 buffer_pool_->DestroyPage(buffer_pool_client_, &page.handle);
270 }
271 }
272 read_page_reservation_.Close();
273 large_read_page_reservation_.Close();
274 write_page_reservation_.Close();
275 pages_.clear();
276 num_pages_ = 0;
277 bytes_pinned_ = 0;
278 bytes_unpinned_ = 0;
279 closed_ = true;
280}
281
282int64_t BufferedTupleStream::CalcBytesPinned() const {
283 int64_t result = 0;

Callers 1

Calls 4

AttachBufferToBatchMethod · 0.80
DestroyPageMethod · 0.80
clearMethod · 0.65
LoadMethod · 0.45

Tested by

no test coverage detected