| 1870 | } |
| 1871 | |
| 1872 | Status TmpFileGroup::ScratchAllocationFailedStatus( |
| 1873 | const vector<int>& at_capacity_dirs) { |
| 1874 | vector<string> tmp_dir_paths; |
| 1875 | for (std::unique_ptr<TmpDir>& tmp_dir : tmp_file_mgr_->tmp_dirs_) { |
| 1876 | tmp_dir_paths.push_back(tmp_dir->path()); |
| 1877 | } |
| 1878 | vector<string> at_capacity_dir_paths; |
| 1879 | for (int dir_idx : at_capacity_dirs) { |
| 1880 | if (dir_idx >= tmp_file_mgr_->tmp_dirs_.size()) { |
| 1881 | at_capacity_dir_paths.push_back(tmp_file_mgr_->tmp_dirs_remote_->path()); |
| 1882 | } else { |
| 1883 | at_capacity_dir_paths.push_back(tmp_file_mgr_->tmp_dirs_[dir_idx]->path()); |
| 1884 | } |
| 1885 | } |
| 1886 | Status status(TErrorCode::SCRATCH_ALLOCATION_FAILED, join(tmp_dir_paths, ","), |
| 1887 | GetBackendString(), |
| 1888 | PrettyPrinter::PrintBytes( |
| 1889 | tmp_file_mgr_->scratch_bytes_used_metric_->current_value()->GetValue()), |
| 1890 | PrettyPrinter::PrintBytes(current_bytes_allocated_.Load()), |
| 1891 | join(at_capacity_dir_paths, ",")); |
| 1892 | // Include all previous errors that may have caused the failure. |
| 1893 | for (Status& err : scratch_errors_) status.MergeStatus(err); |
| 1894 | return status; |
| 1895 | } |
| 1896 | |
| 1897 | bool TmpFileGroup::IsSpillingDiskFaulty() { |
| 1898 | lock_guard<SpinLock> lock(lock_); |
nothing calls this directly
no test coverage detected