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

Method OpenOutputStream

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

Source from the content-addressed store, hash-verified

3381}
3382
3383Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenOutputStream(
3384 const std::string& s, const std::shared_ptr<const KeyValueMetadata>& metadata) {
3385 ARROW_RETURN_NOT_OK(internal::AssertNoTrailingSlash(s));
3386 ARROW_ASSIGN_OR_RAISE(auto path, S3Path::FromString(s));
3387 RETURN_NOT_OK(ValidateFilePath(path));
3388
3389 RETURN_NOT_OK(CheckS3Initialized());
3390
3391 auto ptr = std::make_shared<ObjectOutputStream>(impl_->holder_, io_context(), path,
3392 impl_->options(), metadata);
3393 RETURN_NOT_OK(ptr->Init());
3394 return ptr;
3395}
3396
3397Result<std::shared_ptr<io::OutputStream>> S3FileSystem::OpenAppendStream(
3398 const std::string& path, const std::shared_ptr<const KeyValueMetadata>& metadata) {

Callers 15

TEST_FFunction · 0.45
OpenWriterFunction · 0.45
TestOpenOutputStreamMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TYPED_TESTFunction · 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
TestOpenOutputStreamMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TYPED_TESTFunction · 0.36
TESTFunction · 0.36
TEST_FFunction · 0.36