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

Function CommitBlockList

cpp/src/arrow/filesystem/azurefs.cc:978–993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976}
977
978Status CommitBlockList(std::shared_ptr<Storage::Blobs::BlockBlobClient> block_blob_client,
979 const std::vector<std::string>& block_ids,
980 const Blobs::CommitBlockListOptions& options) {
981 try {
982 // CommitBlockList puts all block_ids in the latest element. That means in the case
983 // of overlapping block_ids the newly staged block ids will always replace the
984 // previously committed blocks.
985 // https://learn.microsoft.com/en-us/rest/api/storageservices/put-block-list?tabs=microsoft-entra-id#request-body
986 block_blob_client->CommitBlockList(block_ids, options);
987 } catch (const Core::RequestFailedException& exception) {
988 return ExceptionToStatus(
989 exception, "CommitBlockList failed for '", block_blob_client->GetUrl(),
990 "'. Committing is required to flush an output/append stream.");
991 }
992 return Status::OK();
993}
994
995Status StageBlock(Blobs::BlockBlobClient* block_blob_client, const std::string& id,
996 Core::IO::MemoryBodyStream& content) {

Callers 2

FlushMethod · 0.85
FlushAsyncMethod · 0.85

Calls 2

ExceptionToStatusFunction · 0.85
OKFunction · 0.50

Tested by

no test coverage detected