MCPcopy Create free account
hub / github.com/bytedance/bolt / closeFile

Method closeFile

bolt/exec/SpillFile.cpp:243–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void SpillWriter::closeFile() {
244 if (currentFile_ == nullptr) {
245 return;
246 }
247 currentFile_->finish();
248 updateSpilledFileStats(currentFile_->size());
249 finishedFiles_.push_back(SpillFileInfo{
250 .id = currentFile_->id(),
251 .type = type_,
252 .path = currentFile_->path(),
253 .size = currentFile_->size(),
254 .rowCount = rowsInCurrentFile_,
255 .sortingKeys = sortingKeys_,
256 .compressionKind = compressionKind_,
257 .serdeKind = spillSerdeKind_,
258 .rowInfo = rowInfo_});
259 rowsInCurrentFile_ = 0;
260 currentFile_.reset();
261}
262
263size_t SpillWriter::numFinishedFiles() const {
264 return finishedFiles_.size();

Callers

nothing calls this directly

Calls 6

finishMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
idMethod · 0.45
pathMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected