Skip to content

Commit

Permalink
PR comments2: move DoAppend to private
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Nov 19, 2023
1 parent 2c0364a commit b04e14c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cpp/src/arrow/filesystem/azurefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,12 @@ class ObjectAppendStream final : public io::OutputStream {
return DoAppend(data, nbytes);
}

Status Flush() override {
RETURN_NOT_OK(CheckClosed("flush"));
return CommitBlockList(block_blob_client_, block_ids_, metadata_);
}

private:
Status DoAppend(const void* data, int64_t nbytes,
std::shared_ptr<Buffer> owned_buffer = nullptr) {
RETURN_NOT_OK(CheckClosed("append"));
Expand Down Expand Up @@ -661,12 +667,6 @@ class ObjectAppendStream final : public io::OutputStream {
return Status::OK();
}

Status Flush() override {
RETURN_NOT_OK(CheckClosed("flush"));
return CommitBlockList(block_blob_client_, block_ids_, metadata_);
}

private:
std::shared_ptr<Azure::Storage::Blobs::BlockBlobClient> block_blob_client_;
const io::IOContext io_context_;
const AzureLocation location_;
Expand Down Expand Up @@ -955,10 +955,10 @@ class AzureFileSystem::Impl {
if (truncate) {
RETURN_NOT_OK(CreateEmptyBlockBlob(block_blob_client));
stream = std::make_shared<ObjectAppendStream>(block_blob_client, fs->io_context(),
location, metadata, options_, 0);
location, metadata, options_, 0);
} else {
stream = std::make_shared<ObjectAppendStream>(block_blob_client, fs->io_context(),
location, metadata, options_);
location, metadata, options_);
}
RETURN_NOT_OK(stream->Init());
return stream;
Expand Down

0 comments on commit b04e14c

Please sign in to comment.