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

Method NewFile

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

Source from the content-addressed store, hash-verified

443}
444
445void TmpFileMgr::NewFile(
446 TmpFileGroup* file_group, DeviceId device_id, unique_ptr<TmpFile>* new_file) {
447 DCHECK(initialized_);
448 DCHECK_GE(device_id, 0);
449 DCHECK_LT(device_id, tmp_dirs_.size());
450 DCHECK(file_group != nullptr);
451 // Generate the full file path.
452 string unique_name = lexical_cast<string>(random_generator()());
453 stringstream file_name;
454 file_name << PrintId(file_group->unique_id()) << "_" << unique_name;
455 path new_file_path(tmp_dirs_[device_id]->path_);
456 new_file_path /= file_name.str();
457
458 new_file->reset(new TmpFileLocal(file_group, device_id, new_file_path.string()));
459}
460
461static string ConstructRemoteDirPath(const string& base_dir, const string& hostname,
462 const string& backend_id = "", const string& query_id = "") {

Callers 1

CreateFilesMethod · 0.45

Calls 4

PrintIdFunction · 0.85
resetMethod · 0.65
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected