| 619 | } |
| 620 | |
| 621 | Status TupleCacheMgr::DeleteExistingFiles() const { |
| 622 | vector<string> entries; |
| 623 | RETURN_IF_ERROR(FileSystemUtil::Directory::GetEntryNames(cache_dir_, &entries, 0, |
| 624 | FileSystemUtil::Directory::EntryType::DIR_ENTRY_REG)); |
| 625 | for (const string& entry : entries) { |
| 626 | if (entry.find(CACHE_FILE_PREFIX) == 0) { |
| 627 | const string file_path = JoinPathSegments(cache_dir_, entry); |
| 628 | KUDU_RETURN_IF_ERROR(kudu::Env::Default()->DeleteFile(file_path), |
| 629 | Substitute("Failed to delete old cache file $0", file_path)); |
| 630 | LOG(INFO) << Substitute("Deleted old cache file $0", file_path); |
| 631 | } |
| 632 | } |
| 633 | return Status::OK(); |
| 634 | } |
| 635 | |
| 636 | void TupleCacheMgr::SyncFileToDisk(const string& cache_key) { |
| 637 | Cache::UniqueHandle pos = cache_->Lookup(cache_key); |
nothing calls this directly
no test coverage detected