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

Method OpenExisting

be/src/kudu/util/pb_util.cc:731–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729}
730
731Status WritablePBContainerFile::OpenExisting() {
732 DCHECK_EQ(FileState::NOT_INITIALIZED, state_);
733 optional<uint64_t> size;
734 RETURN_NOT_OK(ParsePBFileHeader(writer_.get(), &size, &offset_, &version_));
735 ContainerSupHeaderPB sup_header;
736 RETURN_NOT_OK(ReadSupplementalHeader(writer_.get(), version_, &size,
737 &offset_, &sup_header));
738 offset_ = *size; // Reset the write offset to the end of the file.
739 state_ = FileState::OPEN;
740 return Status::OK();
741}
742
743Status WritablePBContainerFile::AppendBytes(const Slice& data) {
744 std::lock_guard<Mutex> l(offset_lock_);

Callers 1

TEST_PFunction · 0.80

Calls 4

ParsePBFileHeaderFunction · 0.85
ReadSupplementalHeaderFunction · 0.85
OKFunction · 0.85
getMethod · 0.65

Tested by 1

TEST_PFunction · 0.64