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

Method ScratchAllocationFailedStatus

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

Source from the content-addressed store, hash-verified

1870}
1871
1872Status 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
1897bool TmpFileGroup::IsSpillingDiskFaulty() {
1898 lock_guard<SpinLock> lock(lock_);

Callers

nothing calls this directly

Calls 10

joinFunction · 0.85
GetBackendStringFunction · 0.85
PrintBytesFunction · 0.85
push_backMethod · 0.80
pathMethod · 0.80
MergeStatusMethod · 0.80
sizeMethod · 0.45
GetValueMethod · 0.45
current_valueMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected