Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump OpenDAL to v0.20 #569

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 39 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/catalog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/object-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion src/object-store/src/backend/azblob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion src/object-store/src/backend/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion src/object-store/src/backend/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion src/object-store/src/backend/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions src/object-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 2 additions & 2 deletions src/object-store/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions src/object-store/tests/object_store_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<()> {
Expand Down Expand Up @@ -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());

Expand Down
6 changes: 3 additions & 3 deletions src/storage/src/manifest/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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) {
Expand Down