Marks a gs:// URL for the zarrs Rust backend. All I/O is delegated to
object_store, so this class requires the gcs compiled feature
(r-universe tier).
Details
GcsStore is a dispatch marker, not a full store: it carries a URL and
implements no key-level I/O of its own. Reads go through
zarrs_open_array_metadata() and zarrs_get_subset(), which take the
gs:// URL directly. Calling get_item(), contains_item() or
listdir() on this object raises an error pointing at those functions and
at HttpStore.
Configuration mirrors S3Store, with GOOGLE_ variables:
GOOGLE_SKIP_SIGNATURESet to
"true"for anonymous access to a public bucket. Unlike S3, GCS does not infer this from the absence of credentials — without it, a world-readable bucket still fails.GOOGLE_APPLICATION_CREDENTIALS,GOOGLE_SERVICE_ACCOUNT,GOOGLE_SERVICE_ACCOUNT_KEYCredentials. The GCE metadata server is used when none are set.
GOOGLE_BASE_URLAlternate endpoint, e.g. a local
fake-gcs-serverinstance.
Public GCS data is also reachable over HTTPS at
https://storage.googleapis.com/bucket/path using HttpStore, which needs
no configuration and works on both distribution tiers.
Store handles are cached by URL on the Rust side, so changing credentials
has no effect on an already-open store until you call zarrs_close_store().
Writes to GCS are not supported.
See also
HttpStore for public GCS data over HTTPS, which works on both
distribution tiers. vignette("remote-stores") for worked examples.
Other Store classes:
DirectoryStore,
HttpStore,
MemoryStore,
S3Store,
Store
Super class
pizzarr::Store -> GcsStore
Methods
Method print()
Print a human-readable summary of the store.
Examples
if (FALSE) { # \dontrun{
# Public bucket, no credentials. Requires the gcs feature.
Sys.setenv(GOOGLE_SKIP_SIGNATURE = "true")
url <- "gs://pangeo-data/ECCO_basins.zarr"
zarrs_open_array_metadata(url, "basin_mask")
zarrs_close_store(url)
# Public GCS data needs no credentials over HTTPS:
z <- zarr_open(HttpStore$new(
"https://storage.googleapis.com/pangeo-data/ECCO_basins.zarr"
))
} # }
