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

Method InitTmpFileMgr

be/src/runtime/bufferpool/buffer-pool-test.cc:132–149  ·  view source on GitHub ↗

Init a new tmp file manager with additional options.

Source from the content-addressed store, hash-verified

130
131 /// Init a new tmp file manager with additional options.
132 vector<string> InitTmpFileMgr(
133 int num_dirs, const string& compression, bool punch_holes) {
134 vector<string> tmp_dirs;
135 for (int i = 0; i < num_dirs; ++i) {
136 const string& dir = Substitute("/tmp/buffer-pool-test.$0", i);
137 // Fix permissions in case old directories were left from previous runs of test.
138 chmod((dir + SCRATCH_SUFFIX).c_str(), S_IRWXU);
139 EXPECT_OK(FileSystemUtil::RemoveAndCreateDirectory(dir));
140 tmp_dirs.push_back(dir);
141 created_tmp_dirs_.push_back(dir);
142 }
143 test_env_.reset(new TestEnv);
144 test_env_->DisableBufferPool();
145 test_env_->SetTmpFileMgrArgs(tmp_dirs, false, compression, punch_holes);
146 EXPECT_OK(test_env_->Init());
147 EXPECT_EQ(num_dirs, test_env_->tmp_file_mgr()->NumActiveTmpDevices());
148 return tmp_dirs;
149 }
150
151 /// Init a new tmp file manager with spill to remote options.
152 vector<string> InitTmpFileMgrSpillToRemote(

Callers

nothing calls this directly

Calls 8

SubstituteFunction · 0.85
push_backMethod · 0.80
DisableBufferPoolMethod · 0.80
SetTmpFileMgrArgsMethod · 0.80
NumActiveTmpDevicesMethod · 0.80
resetMethod · 0.65
InitMethod · 0.45
tmp_file_mgrMethod · 0.45

Tested by

no test coverage detected