tustvold commented on issue #274:
URL:
https://github.com/apache/arrow-rs-object-store/issues/274#issuecomment-2754065730
> I also don't really follow the vague interface design that @tustvold
proposes here
As a very first cut one could take your existing implementation that yields
a stream and wrap it up as follows
```
pub struct ChunkedDownloader {}
impl ChunkedDownloader {
pub fn new(store: Arc<dyn ObjectStore>, meta: &ObjectMeta) -> Self {
... }
pub fn with_chunk_size() {...}
pub fn with_max_concurrency() {...}
pub fn into_stream(self) -> impl Stream<Result<Bytes>>
}
```
One could in future envision extending that with additional functionality,
for example
```
pub async fn sink<W: AsyncWrite + AsyncSeek>(self, out: W) -> Result<()>
{...}
pub fn into_unordered_stream(self) -> impl Stream<Result<(u64, Bytes)>>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]