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

Method RemoveRemoteDirForQuery

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

Source from the content-addressed store, hash-verified

482}
483
484void TmpFileMgr::RemoveRemoteDirForQuery(TmpFileGroup* file_group) {
485 if (tmp_dirs_remote_ == nullptr) return;
486 const string& dir = tmp_dirs_remote_->path_;
487 const string& hostname = ExecEnv::GetInstance()->configured_backend_address().hostname;
488 const string backend_id = PrintId(ExecEnv::GetInstance()->backend_id(), "_");
489 const string query_id = PrintId(file_group->unique_id(), "_");
490 const string querylevel_dir =
491 ConstructRemoteDirPath(dir, hostname, backend_id, query_id);
492 hdfsFS hdfs_conn;
493 Status status =
494 HdfsFsCache::instance()->GetConnection(querylevel_dir, &hdfs_conn, &hdfs_conns_);
495 if (status.ok()) {
496 DCHECK(hdfs_conn != nullptr);
497 hdfsDelete(hdfs_conn, querylevel_dir.c_str(), 1);
498 LOG(INFO) << "Called to remove the query-level remote directory " << querylevel_dir;
499 } else {
500 LOG(WARNING) << "Failed to remove the remote directory because unable to create a "
501 "connection to "
502 << querylevel_dir;
503 }
504}
505
506Status TmpFileMgr::AsyncWriteRange(WriteRange* write_range, TmpFile* tmp_file) {
507 if (write_range->disk_file()->disk_type() == io::DiskFileType::LOCAL) {

Callers 1

CloseMethod · 0.80

Calls 4

PrintIdFunction · 0.85
ConstructRemoteDirPathFunction · 0.85
GetConnectionMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected