Skip to content

Commit

Permalink
chore(deps): Bump OpenDAL to v0.41 (vectordotdev#19039)
Browse files Browse the repository at this point in the history
* chore: Bump OpenDAL to v0.41

Signed-off-by: Xuanwo <github@xuanwo.io>

* Fix spelling

Signed-off-by: Xuanwo <github@xuanwo.io>

* Format code

Signed-off-by: Xuanwo <github@xuanwo.io>

---------

Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Nov 3, 2023
1 parent b4ca866 commit 5655f76
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 34 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Mediacom
Medion
Meizu
Mertz
metakey
Metakey
Micromax
Mito
Expand Down
18 changes: 4 additions & 14 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ azure_storage = { version = "0.16", default-features = false, optional = true }
azure_storage_blobs = { version = "0.16", default-features = false, optional = true }

# OpenDAL
opendal = {version = "0.38", default-features = false, features = ["native-tls", "services-webhdfs"], optional = true}
opendal = {version = "0.41", default-features = false, features = ["native-tls", "services-webhdfs"], optional = true}

# Tower
tower = { version = "0.4.13", default-features = false, features = ["buffer", "limit", "retry", "timeout", "util", "balance", "discover"] }
Expand Down
25 changes: 6 additions & 19 deletions src/sinks/webhdfs/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
time::Duration,
};

use futures::{stream, StreamExt};
use futures::stream;
use opendal::{Entry, Metakey};
use similar_asserts::assert_eq;
use vector_lib::codecs::{encoding::FramingConfig, TextSerializerConfig};
Expand Down Expand Up @@ -74,25 +74,12 @@ async fn hdfs_rotate_files_after_the_buffer_size_is_reached() {
// Hard-coded sleeps are bad, but we're waiting on localstack's state to converge.
tokio::time::sleep(Duration::from_secs(1)).await;

// blocking_scan isn't supported
let objects: Vec<Entry> = op
.scan("/")
let mut objects: Vec<Entry> = op
.list_with("/")
.delimiter("")
.metakey(Metakey::Mode)
.await
.unwrap()
.map(|x| x.unwrap())
.collect()
.await;

let mut objects = objects
.into_iter()
.filter(|entry| {
op.blocking()
.metadata(entry, Metakey::Mode)
.unwrap()
.mode()
.is_file()
})
.collect::<Vec<_>>();
.unwrap();

// Sort file path in order, because we have the event id in path.
objects.sort_by(|l, r| l.path().cmp(r.path()));
Expand Down

0 comments on commit 5655f76

Please sign in to comment.