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

Method closed

cpp/src/arrow/filesystem/gcsfs.cc:218–218  ·  view source on GitHub ↗

gcs::ObjectWriteStream can be "closed" without an explicit Close() call. At this time this class does not use any of the mechanisms [*] that trigger such behavior. Nevertheless, we defensively prepare for them by checking either condition. [*]: These mechanisms include: - resumable uploads that are "resumed" after the upload completed are born "closed", - uploads that prescribe their total size u

Source from the content-addressed store, hash-verified

216 // - uploads that prescribe their total size using the `x-upload-content-length` header
217 // are completed and "closed" as soon as the upload reaches that size.
218 bool closed() const override { return closed_ || !stream_.IsOpen(); }
219
220 Status Write(const void* data, int64_t nbytes) override {
221 if (closed()) return Status::Invalid("Cannot write to a closed stream");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected