Apache OpenDAL: access data freely.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by Xuanwo over 1 year ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.27.0...v0.27.1
Published by Xuanwo over 1 year ago
In v0.27, we refactored our list
related logic and added scan
support. So make Pager
and BlockingPager
associated types in Accessor
too!
pub trait Accessor: Send + Sync + Debug + Unpin + 'static {
type Reader: output::Read;
type BlockingReader: output::BlockingRead;
+ type Pager: output::Page;
+ type BlockingPager: output::BlockingPage;
}
Due to this change, all layers implementation should be changed. If there is not changed over pager, they can by changed like the following:
impl<A: Accessor> LayeredAccessor for MyAccessor<A> {
type Inner = A;
type Reader = MyReader<A::Reader>;
type BlockingReader = MyReader<A::BlockingReader>;
+ type Pager = A::Pager;
+ type BlockingPager = A::BlockingPager;
+ async fn list(&self, path: &str, args: OpList) -> Result<(RpList, Self::Pager)> {
+ self.inner.list(path, args).await
+ }
+ async fn scan(&self, path: &str, args: OpScan) -> Result<(RpScan, Self::Pager)> {
+ self.inner.scan(path, args).await
+ }
+ fn blocking_list(&self, path: &str, args: OpList) -> Result<(RpList, Self::BlockingPager)> {
+ self.inner.blocking_list(path, args)
+ }
+ fn blocking_scan(&self, path: &str, args: OpScan) -> Result<(RpScan, Self::BlockingPager)> {
+ self.inner.blocking_scan(path, args)
+ }
}
To reduce the understanding overhead, we move all OpXxx
into opendal::ops
now. User may need to change:
- use opendal::OpWrite;
+ use opendal::ops::OpWrite;
backon
is the implementation detail of our RetryLayer
, so we hide it from our public API. Users of RetryLayer
need to change the code like:
- RetryLayer::new(backon::ExponentialBackoff::default())
+ RetryLayer::new()
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.26.2...v0.27.0
Published by Xuanwo over 1 year ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.26.1...v0.26.2
Published by Xuanwo over 1 year ago
Published by Xuanwo over 1 year ago
In v0.26 we have replaced all internal dynamic dispatch usage with static dispatch. With this change, we can ensure that all operations performed inside OpenDAL are zero cost.
Due to this change, we have to refactor the logic of Operator
's init logic. In v0.26, we added opendal::Builder
trait and opendal::OperatorBuilder
. For the first glance, the only change to existing code will be like:
- let op = Operator::new(builder.build()?);
+ let op = Operator::new(builder.build()?).finish();
By adding a finish()
call, we will erase all generic types so that Operator
can still be easily to used everywhere as before.
In v0.26, Accessor
has been changed into trait with associated types.
All services need to decalare the types returned as Reader
or BlockingReader
:
pub trait Accessor: Send + Sync + Debug + Unpin + 'static {
type Reader: output::Read;
type BlockingReader: output::BlockingRead;
}
If your service doesn't support read
or blocking_read
, we can use ()
to represent an dummy reader:
impl Accessor for MyDummyAccessor {
type Reader = ();
type BlockingReader = ();
}
As described before, OpenDAL prefer to use static dispatch. Layers are required to implement the new Layer
and LayeredAccessor
trait:
pub trait Layer<A: Accessor> {
type LayeredAccessor: Accessor;
fn layer(&self, inner: A) -> Self::LayeredAccessor;
}
#[async_trait]
pub trait LayeredAccessor: Send + Sync + Debug + Unpin + 'static {
type Inner: Accessor;
type Reader: output::Read;
type BlockingReader: output::BlockingRead;
}
LayeredAccessor
is a wrapper of Accessor
with the typed Innder
. All methods that not implemented will be forward to inner instead.
Since v0.26, we implement opendal::Builder
for all services, and services' mod will not be exported.
- use opendal::services::s3::Builder;
+ use opendal::services::S3;
Sorry again for the big changes in this release. It's a big step for OpenDAL to work in more critical systems.
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.25.2...v0.26.0
Published by Xuanwo over 1 year ago
ghac_upload
in write
by @rajivshah3 in https://github.com/datafuselabs/opendal/pull/1239
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.25.1...v0.25.2
Published by Xuanwo over 1 year ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.25.0...v0.25.1
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.24.6...v0.25.0
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.24.5...v0.24.6
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.24.4...v0.24.5
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.24.3...v0.24.4
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.24.2...v0.24.3
Published by Xuanwo almost 2 years ago
dep:
to make our features more clean by @Xuanwo in https://github.com/datafuselabs/opendal/pull/1153
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.24.1...v0.24.2
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.24.0...v0.24.1
Published by Xuanwo almost 2 years ago
In v0.24, we made a big refactor on our internal IO-related traits. In this version, we split our IO traits into input
and output
versions:
Take Reader
as an example:
input::Reader
is the user input reader, which only requires futures::AsyncRead + Send
.
output::Reader
is the reader returned by OpenDAL
, which implements futures::AsyncRead
, futures::AsyncSeek
, and futures::Stream<Item=io::Result<Bytes>>
. Besides, output::Reader
also implements Send + Sync
, which makes it useful for users.
Due to this change, all code that depends on BytesReader
should be refactored.
BytesReader
=> input::Reader
OutputBytesReader
=> output::Reader
Thanks to the change of IO trait split, we make ObjectReader
implements all needed traits:
futures::AsyncRead
futures::AsyncSeek
futures::Stream<Item=io::Result<Bytes>>
Thus, we removed the seekable_reader
API. They can be replaced by range_reader
:
o.seekable_reader
=> o.range_reader
Most changes only happen inside. Users not using opendal::raw::*
will not be affected.
Sorry for the inconvenience. I think those changes are required and make OpenDAL better! Welcome any comments at Discussion.
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.23.0...v0.24.0
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.22.6...v0.23.0
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.22.5...v0.22.6
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.22.4...v0.22.5
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.22.3...v0.22.4
Published by Xuanwo almost 2 years ago
Full Changelog: https://github.com/datafuselabs/opendal/compare/v0.22.2...v0.22.3