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

Method Commit

be/src/exec/tuple-file-writer.cc:185–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185Status TupleFileWriter::Commit(RuntimeState* state) {
186 DCHECK_EQ(state_, State::InProgress);
187 DCHECK(tmp_file_ != nullptr);
188
189 RETURN_IF_ERROR(DebugAction(state->query_options(), "TUPLE_FILE_WRITER_COMMIT"));
190
191 // Sync() is called asychnronously by TupleCacheMgr's sync thread pool.
192 KUDU_RETURN_IF_ERROR(tmp_file_->Close(), "Failed to close cache file");
193
194 std::string src = TempPath();
195 KUDU_RETURN_IF_ERROR(kudu::Env::Default()->RenameFile(src, path_),
196 "Failed to rename cache file");
197 tmp_file_.reset();
198 state_ = State::Committed;
199 return Status::OK();
200}
201
202std::ostream& operator<<(std::ostream& out, const TupleFileWriter::State& state) {
203 switch (state) {

Callers 2

GetNextMethod · 0.45
TEST_FFunction · 0.45

Calls 6

DebugActionFunction · 0.85
DefaultClass · 0.85
OKFunction · 0.85
RenameFileMethod · 0.80
resetMethod · 0.65
CloseMethod · 0.45

Tested by 1

TEST_FFunction · 0.36