MCPcopy Create free account
hub / github.com/apache/arrow / MakeExample

Method MakeExample

cpp/src/arrow/io/buffered_test.cc:761–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759 }
760
761 void MakeExample(int64_t buffer_size,
762 std::optional<int64_t> read_bound = std::nullopt) {
763 test_data_ = kExample1;
764 MemoryPool* pool = default_memory_pool();
765
766 ASSERT_OK_AND_ASSIGN(auto file_out, FileOutputStream::Open(path_));
767 ASSERT_OK(file_out->Write(test_data_));
768 ASSERT_OK(file_out->Close());
769
770 ASSERT_OK_AND_ASSIGN(auto file_in, ReadableFile::Open(path_));
771 raw_ = file_in;
772 tracked_ = TrackedRandomAccessFile::Make(dynamic_cast<RandomAccessFile*>(raw_.get()));
773 ASSERT_OK_AND_ASSIGN(buffered_,
774 BufferedInputStream::Create(buffer_size, pool, tracked_,
775 read_bound.value_or(-1)));
776 }
777
778 protected:
779 std::shared_ptr<TrackedRandomAccessFile> tracked_;

Callers

nothing calls this directly

Calls 6

default_memory_poolFunction · 0.85
MakeFunction · 0.50
ASSERT_OK_AND_ASSIGNFunction · 0.50
WriteMethod · 0.45
CloseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected