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

Method OpenOutputStream

cpp/src/arrow/filesystem/s3fs.cc:3452–3464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3450}
3451
3452Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenOutputStream(
3453 const std::string& s, const std::shared_ptr<const KeyValueMetadata>& metadata) {
3454 ARROW_RETURN_NOT_OK(internal::AssertNoTrailingSlash(s));
3455 ARROW_ASSIGN_OR_RAISE(auto path, S3Path::FromString(s));
3456 RETURN_NOT_OK(ValidateFilePath(path));
3457
3458 RETURN_NOT_OK(CheckS3Initialized());
3459
3460 auto ptr = std::make_shared<ObjectOutputStream>(impl_->holder_, io_context(), path,
3461 impl_->options(), metadata);
3462 RETURN_NOT_OK(ptr->Init());
3463 return ptr;
3464}
3465
3466Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenAppendStream(
3467 const std::string& path, const std::shared_ptr<const KeyValueMetadata>& metadata) {

Callers 15

TEST_FFunction · 0.45
OpenWriterFunction · 0.45
TestOpenOutputStreamFunction · 0.45
ASSERT_OK_AND_ASSIGNFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 6

AssertNoTrailingSlashFunction · 0.85
ValidateFilePathFunction · 0.85
CheckS3InitializedFunction · 0.85
io_contextFunction · 0.85
optionsMethod · 0.45
InitMethod · 0.45

Tested by 15

TEST_FFunction · 0.36
TestOpenOutputStreamFunction · 0.36
ASSERT_OK_AND_ASSIGNFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36