Commit 46a51ee
authored
feat(vortex-python): Add OpenDAL-backed CosStore to the Python object-store API (#8845)
- **Bump `opendal` / `object_store_opendal` to 0.57.0** (in the new
`vortex-object-store-opendal` crate); this version enables COS
versioning by default.
- **Use the upstream `pyo3-object_store` 0.11.0** from crates.io (no
longer vendored via `[patch.crates-io]`). The built-in store classes
(S3/Azure/GCS/HTTP/Local/Memory) keep their `PyObjectStore` interop, and
obstore users can still pass external stores.
- **Introduce `vortex-object-store-opendal`**, a new workspace crate
that builds an `object_store::ObjectStore` from an OpenDAL
`services::Cos` `OpendalStore` (`make_opendal_store(url, properties)`),
reused by both the URL registry and the Python store class.
- **Add a `CosStore` pyclass (opendal feature)** that wraps an
OpenDAL-backed Tencent COS `OpendalStore` and holds it as `Arc<dyn
object_store::ObjectStore>`. It is constructed with explicit config
(`bucket`, `endpoint`, `secret_id`, `secret_key`, `root`,
`disable_config_load`) and can be handed to
`vortex.io.read_url(store=...)` / `vortex.io.write(..., store=...)`.
- **Introduce `AnyVortexStore` in `io.rs`** so `read_url` / `write`
accept both the built-in `pyo3-object_store` classes and the new
OpenDAL-backed `CosStore` via a single `store=` argument.
- **`cos://` and `oss://` URL resolution** now go through the
OpenDAL-backed store, configured via OpenDAL environment variables
(`TENCENTCLOUD_SECRET_ID` / `TENCENTCLOUD_SECRET_KEY` / `COS_ENDPOINT`,
and `ALIBABACLOUD_ACCESS_KEY_ID` / `ALIBABACLOUD_ACCESS_KEY_SECRET` /
`OSS_ENDPOINT`).
- **Document the standalone-store usage and add unit tests**
(`cos_store_builds_object_store`).
**Rationale for this change**
Closes: #8844
Vortex's Python API already exposes concrete, standalone store objects
for S3/Azure/GCS/HTTP/Local/Memory, but Tencent COS and Alibaba OSS were
only reachable through URL-based resolution that relied on environment
variables. This adds first-class OpenDAL-backed stores so COS/OSS can be
used exactly like the other stores (construct once, pass via `store=`),
with better ergonomics and type checking.
**What changes are included in this PR?**
- new `vortex-object-store-opendal` crate (OpenDAL `services-cos`,
`opendal`/`object_store_opendal` 0.57.0)
- `pyo3-object_store` pinned to the upstream 0.11.0 (object_store
0.13.x, matching the workspace) — vendored fork removed
- new `CosStore` pyclass (gated on the `opendal` feature) wrapping an
OpenDAL COS `OpendalStore`, holding `Arc<dyn object_store::ObjectStore>`
- `AnyVortexStore` extractor in `io.rs` so `read_url` / `write` accept
the new store
- `cos://` / `oss://` URL resolution backed by OpenDAL
- docs + unit tests for the standalone-store path
**What APIs are changed? Are there any user-facing changes?**
New public API (Python, `opendal` feature):
- `vortex._lib.CosStore(bucket, endpoint, *, secret_id=None,
secret_key=None, root=None, disable_config_load=False)` — a standalone
`ObjectStore` you can pass to `vortex.io.read_url(url, store=...)` /
`vortex.io.write(arrays, path, store=...)`.
- `vortex.store.CosStore` / `vortex.store.from_url` now document
`cos://` and `oss://` OpenDAL-backed support.
---------
Signed-off-by: forwardxu <forwardxu@apache.org>1 parent b4f8d34 commit 46a51ee
18 files changed
Lines changed: 1007 additions & 40 deletions
File tree
- docs
- api/python
- store
- vortex-jni
- src
- vortex-object-store-opendal
- src
- vortex-python
- python/vortex
- _lib
- store
- store
- src
- object_store
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
0 commit comments