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

Method RestoreData

be/src/runtime/tmp-file-mgr.cc:1774–1794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1772}
1773
1774Status TmpFileGroup::RestoreData(unique_ptr<TmpWriteHandle> handle, MemRange buffer,
1775 const BufferPoolClientCounters* counters) {
1776 DCHECK_EQ(handle->data_len(), buffer.len());
1777 if (!handle->is_compressed()) DCHECK_EQ(handle->write_range_->data(), buffer.data());
1778 DCHECK(!handle->write_in_flight_);
1779 DCHECK(handle->read_range_ == nullptr);
1780
1781 VLOG(3) << "Restore " << handle->TmpFilePath() << " " << handle->write_range_->offset()
1782 << " " << handle->data_len();
1783 Status status;
1784 if (handle->is_compressed()) {
1785 // 'buffer' already contains the data needed, because the compressed data was written
1786 // to 'compressed_' and (optionally) encrypted over there.
1787 } else if (FLAGS_disk_spill_encryption) {
1788 // Decrypt after the write is finished, so that we don't accidentally write decrypted
1789 // data to disk.
1790 status = handle->CheckHashAndDecrypt(buffer, counters);
1791 }
1792 RecycleFileRange(move(handle));
1793 return status;
1794}
1795
1796void TmpFileGroup::DestroyWriteHandle(unique_ptr<TmpWriteHandle> handle) {
1797 handle->Cancel();

Callers 4

TEST_FFunction · 0.80
TestBlockVerificationMethod · 0.80
StartMoveToPinnedMethod · 0.80

Calls 8

moveFunction · 0.85
data_lenMethod · 0.80
is_compressedMethod · 0.80
CheckHashAndDecryptMethod · 0.80
lenMethod · 0.45
dataMethod · 0.45
TmpFilePathMethod · 0.45
offsetMethod · 0.45

Tested by 3

TEST_FFunction · 0.64
TestBlockVerificationMethod · 0.64