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

Method FinalizePages

be/src/runtime/sorter.cc:350–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348}
349
350Status Sorter::Run::FinalizePages(vector<Page>* pages) {
351 DCHECK_GT(pages->size(), 0);
352 Page* last_page = &pages->back();
353 if (last_page->valid_data_len() > 0) {
354 DCHECK_EQ(initial_run_, is_pinned_);
355 if (!is_pinned_) {
356 // Unpin the last page of this unpinned run. We've finished writing the run so
357 // all pages in the run can now be unpinned.
358 last_page->Unpin(sorter_->buffer_pool_client_);
359 }
360 } else {
361 last_page->Close(sorter_->buffer_pool_client_);
362 pages->pop_back();
363 }
364 return Status::OK();
365}
366
367void Sorter::Run::CloseAllPages() {
368 DeleteAndClearPages(&fixed_len_pages_);

Callers

nothing calls this directly

Calls 5

OKFunction · 0.85
valid_data_lenMethod · 0.80
sizeMethod · 0.45
UnpinMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected