chore: Bump OpenDAL to v0.20 (#569)

Signed-off-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
Xuanwo
2022-11-18 14:17:38 +08:00
committed by GitHub
parent dee5ccec9e
commit 1f0b39cc8d
11 changed files with 55 additions and 34 deletions

View File

@@ -27,7 +27,7 @@ futures = "0.3"
futures-util = "0.3"
lazy_static = "1.4"
meta-client = { path = "../meta-client" }
opendal = "0.17"
opendal = "0.20"
regex = "1.6"
serde = "1.0"
serde_json = "1.0"
@@ -40,7 +40,7 @@ tokio = { version = "1.18", features = ["full"] }
chrono = "0.4"
log-store = { path = "../log-store" }
object-store = { path = "../object-store" }
opendal = "0.17"
opendal = "0.20"
storage = { path = "../storage" }
mito = { path = "../mito" }
tempdir = "0.3"

View File

@@ -6,7 +6,7 @@ license = "Apache-2.0"
[dependencies]
futures = { version = "0.3" }
opendal = "0.17"
opendal = "0.20"
tokio = { version = "1.0", features = ["full"] }
[dev-dependencies]

View File

@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub use opendal::services::azblob::{Backend, Builder};
pub use opendal::services::azblob::Builder;

View File

@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub use opendal::services::fs::{Backend, Builder};
pub use opendal::services::fs::Builder;

View File

@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub use opendal::services::memory::{Backend, Builder};
pub use opendal::services::memory::Builder;

View File

@@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub use opendal::services::s3::{Backend, Builder};
pub use opendal::services::s3::Builder;

View File

@@ -14,8 +14,8 @@
pub use opendal::io_util::SeekableReader;
pub use opendal::{
layers, services, Accessor, DirEntry, DirStreamer, Layer, Object, ObjectMetadata, ObjectMode,
Operator as ObjectStore,
layers, services, Accessor, Layer, Object, ObjectEntry, ObjectMetadata, ObjectMode,
ObjectStreamer, Operator as ObjectStore,
};
pub mod backend;
pub mod util;

View File

@@ -14,9 +14,9 @@
use futures::TryStreamExt;
use crate::{DirEntry, DirStreamer};
use crate::{ObjectEntry, ObjectStreamer};
pub async fn collect(stream: DirStreamer) -> Result<Vec<DirEntry>, std::io::Error> {
pub async fn collect(stream: ObjectStreamer) -> Result<Vec<ObjectEntry>, std::io::Error> {
stream.try_collect::<Vec<_>>().await
}

View File

@@ -17,7 +17,7 @@ use std::env;
use anyhow::Result;
use common_telemetry::logging;
use object_store::backend::{fs, s3};
use object_store::{util, DirStreamer, Object, ObjectMode, ObjectStore};
use object_store::{util, Object, ObjectMode, ObjectStore, ObjectStreamer};
use tempdir::TempDir;
async fn test_object_crud(store: &ObjectStore) -> Result<()> {
@@ -61,7 +61,7 @@ async fn test_object_list(store: &ObjectStore) -> Result<()> {
// List objects
let o: Object = store.object("/");
let obs: DirStreamer = o.list().await?;
let obs: ObjectStreamer = o.list().await?;
let objects = util::collect(obs).await?;
assert_eq!(3, objects.len());

View File

@@ -19,7 +19,7 @@ use async_trait::async_trait;
use common_telemetry::logging;
use futures::TryStreamExt;
use lazy_static::lazy_static;
use object_store::{util, DirEntry, ObjectStore};
use object_store::{util, ObjectEntry, ObjectStore};
use regex::Regex;
use serde::{Deserialize, Serialize};
use snafu::{ensure, ResultExt};
@@ -63,7 +63,7 @@ pub fn is_delta_file(file_name: &str) -> bool {
}
pub struct ObjectStoreLogIterator {
iter: Box<dyn Iterator<Item = (ManifestVersion, DirEntry)> + Send + Sync>,
iter: Box<dyn Iterator<Item = (ManifestVersion, ObjectEntry)> + Send + Sync>,
}
#[async_trait]
@@ -156,7 +156,7 @@ impl ManifestLogStorage for ManifestObjectStore {
.await
.context(ListObjectsSnafu { path: &self.path })?;
let mut entries: Vec<(ManifestVersion, DirEntry)> = streamer
let mut entries: Vec<(ManifestVersion, ObjectEntry)> = streamer
.try_filter_map(|e| async move {
let file_name = e.name();
if is_delta_file(file_name) {