forked from parseablehq/parseable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure_blob.rs
More file actions
746 lines (633 loc) · 24.1 KB
/
Copy pathazure_blob.rs
File metadata and controls
746 lines (633 loc) · 24.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
/*
* Parseable Server (C) 2022 - 2024 Parseable, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
use std::{
collections::HashSet,
path::Path,
sync::Arc,
time::{Duration, Instant},
};
use async_trait::async_trait;
use bytes::Bytes;
use datafusion::{
datasource::listing::ListingTableUrl,
execution::{
object_store::{DefaultObjectStoreRegistry, ObjectStoreRegistry, ObjectStoreUrl},
runtime_env::RuntimeEnvBuilder,
},
};
use futures::{StreamExt, TryStreamExt, stream::FuturesUnordered};
use object_store::{
BackoffConfig, ClientOptions, ListResult, ObjectMeta, ObjectStore, PutPayload, RetryConfig,
azure::{MicrosoftAzure, MicrosoftAzureBuilder},
buffered::BufReader,
limit::LimitStore,
path::Path as StorePath,
};
use relative_path::{RelativePath, RelativePathBuf};
use tokio::{fs::OpenOptions, io::AsyncReadExt};
use tracing::{error, info};
use url::Url;
use crate::{
metrics::storage::{StorageMetrics, azureblob::REQUEST_RESPONSE_TIME},
parseable::LogStream,
};
use super::{
CONNECT_TIMEOUT_SECS, MIN_MULTIPART_UPLOAD_SIZE, ObjectStorage, ObjectStorageError,
ObjectStorageProvider, PARSEABLE_ROOT_DIRECTORY, REQUEST_TIMEOUT_SECS,
STREAM_METADATA_FILE_NAME, metrics_layer::MetricLayer, object_storage::parseable_json_path,
to_object_store_path,
};
#[derive(Debug, Clone, clap::Args)]
#[command(
name = "Azure config",
about = "Start Parseable with Azure Blob storage",
help_template = "\
{about-section}
{all-args}
"
)]
pub struct AzureBlobConfig {
/// The endpoint to Azure Blob Storage
/// eg. `https://{account}.blob.core.windows.net`
#[arg(long, env = "P_AZR_URL", value_name = "url", required = true)]
pub endpoint_url: String,
// The Azure Storage Account ID
#[arg(long, env = "P_AZR_ACCOUNT", value_name = "account", required = true)]
pub account: String,
/// The Azure Storage Access key
#[arg(
long,
env = "P_AZR_ACCESS_KEY",
value_name = "access-key",
required = false
)]
pub access_key: Option<String>,
///Client ID
#[arg(
long,
env = "P_AZR_CLIENT_ID",
value_name = "client-id",
required = false
)]
pub client_id: Option<String>,
///Secret ID
#[arg(
long,
env = "P_AZR_CLIENT_SECRET",
value_name = "client-secret",
required = false
)]
pub client_secret: Option<String>,
///Tenant ID
#[arg(
long,
env = "P_AZR_TENANT_ID",
value_name = "tenant-id",
required = false
)]
pub tenant_id: Option<String>,
/// The container name to be used for storage
#[arg(
long,
env = "P_AZR_CONTAINER",
value_name = "container",
required = true
)]
pub container: String,
}
impl AzureBlobConfig {
fn get_default_builder(&self) -> MicrosoftAzureBuilder {
let client_options = ClientOptions::default()
.with_allow_http(true)
.with_connect_timeout(Duration::from_secs(CONNECT_TIMEOUT_SECS))
.with_timeout(Duration::from_secs(REQUEST_TIMEOUT_SECS));
let retry_config = RetryConfig {
max_retries: 5,
retry_timeout: Duration::from_secs(120),
backoff: BackoffConfig::default(),
};
let mut builder = MicrosoftAzureBuilder::new()
.with_endpoint(self.endpoint_url.clone())
.with_account(&self.account)
.with_container_name(&self.container)
.with_retry(retry_config);
if let Some(access_key) = self.access_key.clone() {
builder = builder.with_access_key(access_key)
}
if let (Some(client_id), Some(client_secret), Some(tenant_id)) = (
self.client_id.clone(),
self.client_secret.clone(),
self.tenant_id.clone(),
) {
builder = builder.with_client_secret_authorization(client_id, client_secret, tenant_id)
}
builder.with_client_options(client_options)
}
}
impl ObjectStorageProvider for AzureBlobConfig {
fn name(&self) -> &'static str {
"blob-store"
}
fn get_datafusion_runtime(&self) -> RuntimeEnvBuilder {
let azure = self.get_default_builder().build().unwrap();
// limit objectstore to a concurrent request limit
let azure = LimitStore::new(azure, super::MAX_OBJECT_STORE_REQUESTS);
let azure = MetricLayer::new(azure);
let object_store_registry = DefaultObjectStoreRegistry::new();
let url = ObjectStoreUrl::parse(format!("https://{}.blob.core.windows.net", self.account))
.unwrap();
object_store_registry.register_store(url.as_ref(), Arc::new(azure));
RuntimeEnvBuilder::new().with_object_store_registry(Arc::new(object_store_registry))
}
fn construct_client(&self) -> Arc<dyn super::ObjectStorage> {
let azure = self.get_default_builder().build().unwrap();
// limit objectstore to a concurrent request limit
let azure = LimitStore::new(azure, super::MAX_OBJECT_STORE_REQUESTS);
Arc::new(BlobStore {
client: azure,
account: self.account.clone(),
container: self.container.clone(),
root: StorePath::from(""),
})
}
fn get_endpoint(&self) -> String {
self.endpoint_url.clone()
}
fn register_store_metrics(&self, handler: &actix_web_prometheus::PrometheusMetrics) {
self.register_metrics(handler)
}
}
// ObjStoreClient is generic client to enable interactions with different cloudprovider's
// object store such as S3 and Azure Blob
#[derive(Debug)]
pub struct BlobStore {
client: LimitStore<MicrosoftAzure>,
account: String,
container: String,
root: StorePath,
}
impl BlobStore {
async fn _get_object(&self, path: &RelativePath) -> Result<Bytes, ObjectStorageError> {
let instant = Instant::now();
let resp = self.client.get(&to_object_store_path(path)).await;
match resp {
Ok(resp) => {
let time = instant.elapsed().as_secs_f64();
REQUEST_RESPONSE_TIME
.with_label_values(&["GET", "200"])
.observe(time);
let body = resp.bytes().await.unwrap();
Ok(body)
}
Err(err) => {
let time = instant.elapsed().as_secs_f64();
REQUEST_RESPONSE_TIME
.with_label_values(&["GET", "400"])
.observe(time);
Err(err.into())
}
}
}
async fn _put_object(
&self,
path: &RelativePath,
resource: PutPayload,
) -> Result<(), ObjectStorageError> {
let time = Instant::now();
let resp = self.client.put(&to_object_store_path(path), resource).await;
let status = if resp.is_ok() { "200" } else { "400" };
let time = time.elapsed().as_secs_f64();
REQUEST_RESPONSE_TIME
.with_label_values(&["PUT", status])
.observe(time);
if let Err(object_store::Error::NotFound { source, .. }) = &resp {
return Err(ObjectStorageError::Custom(
format!("Failed to upload, error: {source:?}").to_string(),
));
}
resp.map(|_| ()).map_err(|err| err.into())
}
async fn _delete_prefix(&self, key: &str) -> Result<(), ObjectStorageError> {
let object_stream = self.client.list(Some(&(key.into())));
object_stream
.for_each_concurrent(None, |x| async {
match x {
Ok(obj) => {
if (self.client.delete(&obj.location).await).is_err() {
error!("Failed to fetch object during delete stream");
}
}
Err(_) => {
error!("Failed to fetch object during delete stream");
}
};
})
.await;
Ok(())
}
async fn _list_dates(&self, stream: &str) -> Result<Vec<String>, ObjectStorageError> {
let resp = self
.client
.list_with_delimiter(Some(&(stream.into())))
.await?;
let common_prefixes = resp.common_prefixes;
// return prefixes at the root level
let dates: Vec<_> = common_prefixes
.iter()
.filter_map(|path| path.as_ref().strip_prefix(&format!("{stream}/")))
.map(String::from)
.collect();
Ok(dates)
}
async fn _upload_file(&self, key: &str, path: &Path) -> Result<(), ObjectStorageError> {
let instant = Instant::now();
// // TODO: Uncomment this when multipart is fixed
// let should_multipart = std::fs::metadata(path)?.len() > MULTIPART_UPLOAD_SIZE as u64;
let should_multipart = false;
let res = if should_multipart {
// self._upload_multipart(key, path).await
// this branch will never get executed
Ok(())
} else {
let bytes = tokio::fs::read(path).await?;
let result = self.client.put(&key.into(), bytes.into()).await?;
info!("Uploaded file to Azure Blob Storage: {:?}", result);
Ok(())
};
let status = if res.is_ok() { "200" } else { "400" };
let time = instant.elapsed().as_secs_f64();
REQUEST_RESPONSE_TIME
.with_label_values(&["UPLOAD_PARQUET", status])
.observe(time);
res
}
async fn _upload_multipart(
&self,
key: &RelativePath,
path: &Path,
) -> Result<(), ObjectStorageError> {
let mut file = OpenOptions::new().read(true).open(path).await?;
let location = &to_object_store_path(key);
let mut async_writer = self.client.put_multipart(location).await?;
let meta = file.metadata().await?;
let total_size = meta.len() as usize;
if total_size < MIN_MULTIPART_UPLOAD_SIZE {
let mut data = Vec::new();
file.read_to_end(&mut data).await?;
self.client.put(location, data.into()).await?;
// async_writer.put_part(data.into()).await?;
// async_writer.complete().await?;
return Ok(());
} else {
let mut data = Vec::new();
file.read_to_end(&mut data).await?;
// let mut upload_parts = Vec::new();
let has_final_partial_part = !total_size.is_multiple_of(MIN_MULTIPART_UPLOAD_SIZE);
let num_full_parts = total_size / MIN_MULTIPART_UPLOAD_SIZE;
let total_parts = num_full_parts + if has_final_partial_part { 1 } else { 0 };
// Upload each part
for part_number in 0..(total_parts) {
let start_pos = part_number * MIN_MULTIPART_UPLOAD_SIZE;
let end_pos = if part_number == num_full_parts && has_final_partial_part {
// Last part might be smaller than 5MB (which is allowed)
total_size
} else {
// All other parts must be at least 5MB
start_pos + MIN_MULTIPART_UPLOAD_SIZE
};
// Extract this part's data
let part_data = data[start_pos..end_pos].to_vec();
// Upload the part
async_writer.put_part(part_data.into()).await?;
// upload_parts.push(part_number as u64 + 1);
}
if let Err(err) = async_writer.complete().await {
error!("Failed to complete multipart upload. {:?}", err);
async_writer.abort().await?;
};
}
Ok(())
}
// TODO: introduce parallel, multipart-uploads if required
// async fn _upload_multipart(&self, key: &str, path: &Path) -> Result<(), ObjectStorageError> {
// let mut buf = vec![0u8; MULTIPART_UPLOAD_SIZE / 2];
// let mut file = OpenOptions::new().read(true).open(path).await?;
// // let (multipart_id, mut async_writer) = self.client.put_multipart(&key.into()).await?;
// let mut async_writer = self.client.put_multipart(&key.into()).await?;
// /* `abort_multipart()` has been removed */
// // let close_multipart = |err| async move {
// // error!("multipart upload failed. {:?}", err);
// // self.client
// // .abort_multipart(&key.into(), &multipart_id)
// // .await
// // };
// loop {
// match file.read(&mut buf).await {
// Ok(len) => {
// if len == 0 {
// break;
// }
// if let Err(err) = async_writer.write_all(&buf[0..len]).await {
// // close_multipart(err).await?;
// break;
// }
// if let Err(err) = async_writer.flush().await {
// // close_multipart(err).await?;
// break;
// }
// }
// Err(err) => {
// // close_multipart(err).await?;
// break;
// }
// }
// }
// async_writer.shutdown().await?;
// Ok(())
// }
}
#[async_trait]
impl ObjectStorage for BlobStore {
async fn upload_multipart(
&self,
key: &RelativePath,
path: &Path,
) -> Result<(), ObjectStorageError> {
self._upload_multipart(key, path).await
}
async fn get_buffered_reader(
&self,
_path: &RelativePath,
) -> Result<BufReader, ObjectStorageError> {
Err(ObjectStorageError::UnhandledError(Box::new(
std::io::Error::new(
std::io::ErrorKind::Unsupported,
"Buffered reader not implemented for Blob Storage yet",
),
)))
}
async fn head(&self, _path: &RelativePath) -> Result<ObjectMeta, ObjectStorageError> {
Err(ObjectStorageError::UnhandledError(Box::new(
std::io::Error::new(
std::io::ErrorKind::Unsupported,
"Head operation not implemented for Blob Storage yet",
),
)))
}
async fn get_object(&self, path: &RelativePath) -> Result<Bytes, ObjectStorageError> {
Ok(self._get_object(path).await?)
}
async fn get_objects(
&self,
base_path: Option<&RelativePath>,
filter_func: Box<dyn Fn(String) -> bool + Send>,
) -> Result<Vec<Bytes>, ObjectStorageError> {
let instant = Instant::now();
let prefix = if let Some(base_path) = base_path {
to_object_store_path(base_path)
} else {
self.root.clone()
};
let mut list_stream = self.client.list(Some(&prefix));
let mut res = vec![];
while let Some(meta) = list_stream.next().await.transpose()? {
let ingestor_file = filter_func(meta.location.filename().unwrap().to_string());
if !ingestor_file {
continue;
}
let byts = self
.get_object(
RelativePath::from_path(meta.location.as_ref())
.map_err(ObjectStorageError::PathError)?,
)
.await?;
res.push(byts);
}
let instant = instant.elapsed().as_secs_f64();
REQUEST_RESPONSE_TIME
.with_label_values(&["GET", "200"])
.observe(instant);
Ok(res)
}
async fn get_ingestor_meta_file_paths(
&self,
) -> Result<Vec<RelativePathBuf>, ObjectStorageError> {
let time = Instant::now();
let mut path_arr = vec![];
let mut object_stream = self.client.list(Some(&self.root));
while let Some(meta) = object_stream.next().await.transpose()? {
let flag = meta.location.filename().unwrap().starts_with("ingestor");
if flag {
path_arr.push(RelativePathBuf::from(meta.location.as_ref()));
}
}
let time = time.elapsed().as_secs_f64();
REQUEST_RESPONSE_TIME
.with_label_values(&["GET", "200"])
.observe(time);
Ok(path_arr)
}
async fn put_object(
&self,
path: &RelativePath,
resource: Bytes,
) -> Result<(), ObjectStorageError> {
self._put_object(path, resource.into())
.await
.map_err(|err| ObjectStorageError::ConnectionError(Box::new(err)))?;
Ok(())
}
async fn delete_prefix(&self, path: &RelativePath) -> Result<(), ObjectStorageError> {
self._delete_prefix(path.as_ref()).await?;
Ok(())
}
async fn delete_object(&self, path: &RelativePath) -> Result<(), ObjectStorageError> {
Ok(self.client.delete(&to_object_store_path(path)).await?)
}
async fn check(&self) -> Result<(), ObjectStorageError> {
Ok(self
.client
.head(&to_object_store_path(&parseable_json_path()))
.await
.map(|_| ())?)
}
async fn delete_stream(&self, stream_name: &str) -> Result<(), ObjectStorageError> {
self._delete_prefix(stream_name).await?;
Ok(())
}
async fn try_delete_node_meta(&self, node_filename: String) -> Result<(), ObjectStorageError> {
let file = RelativePathBuf::from(&node_filename);
match self.client.delete(&to_object_store_path(&file)).await {
Ok(_) => Ok(()),
Err(err) => {
// if the object is not found, it is not an error
// the given url path was incorrect
if matches!(err, object_store::Error::NotFound { .. }) {
error!("Node does not exist");
Err(err.into())
} else {
error!("Error deleting node meta file: {:?}", err);
Err(err.into())
}
}
}
}
async fn list_streams(&self) -> Result<HashSet<LogStream>, ObjectStorageError> {
// self._list_streams().await
Err(ObjectStorageError::Custom(
"Azure Blob Store doesn't implement list_streams".into(),
))
}
async fn list_old_streams(&self) -> Result<HashSet<LogStream>, ObjectStorageError> {
let resp = self.client.list_with_delimiter(None).await?;
let common_prefixes = resp.common_prefixes; // get all dirs
// return prefixes at the root level
let dirs: HashSet<_> = common_prefixes
.iter()
.filter_map(|path| path.parts().next())
.map(|name| name.as_ref().to_string())
.filter(|x| x != PARSEABLE_ROOT_DIRECTORY)
.collect();
let stream_json_check = FuturesUnordered::new();
for dir in &dirs {
let key = format!("{dir}/{STREAM_METADATA_FILE_NAME}");
let task = async move { self.client.head(&StorePath::from(key)).await.map(|_| ()) };
stream_json_check.push(task);
}
stream_json_check.try_collect::<()>().await?;
Ok(dirs.into_iter().collect())
}
async fn list_dates(&self, stream_name: &str) -> Result<Vec<String>, ObjectStorageError> {
let streams = self._list_dates(stream_name).await?;
Ok(streams)
}
async fn list_hours(
&self,
stream_name: &str,
date: &str,
) -> Result<Vec<String>, ObjectStorageError> {
let pre = object_store::path::Path::from(format!("{}/{}/", stream_name, date));
let resp = self.client.list_with_delimiter(Some(&pre)).await?;
let hours = resp
.common_prefixes
.iter()
.filter_map(|path| {
let path_str = path.as_ref();
if let Some(stripped) = path_str.strip_prefix(&format!("{}/{}/", stream_name, date))
{
// Remove trailing slash if present, otherwise use as is
let clean_path = stripped.strip_suffix('/').unwrap_or(stripped);
Some(clean_path.to_string())
} else {
None
}
})
.filter(|dir| dir.starts_with("hour="))
.collect();
Ok(hours)
}
async fn list_minutes(
&self,
stream_name: &str,
date: &str,
hour: &str,
) -> Result<Vec<String>, ObjectStorageError> {
let pre = object_store::path::Path::from(format!("{}/{}/{}/", stream_name, date, hour));
let resp = self.client.list_with_delimiter(Some(&pre)).await?;
let minutes = resp
.common_prefixes
.iter()
.filter_map(|path| {
let path_str = path.as_ref();
if let Some(stripped) =
path_str.strip_prefix(&format!("{}/{}/{}/", stream_name, date, hour))
{
// Remove trailing slash if present, otherwise use as is
let clean_path = stripped.strip_suffix('/').unwrap_or(stripped);
Some(clean_path.to_string())
} else {
None
}
})
.filter(|dir| dir.starts_with("minute="))
.collect();
Ok(minutes)
}
// async fn list_manifest_files(
// &self,
// stream_name: &str,
// ) -> Result<BTreeMap<String, Vec<String>>, ObjectStorageError> {
// let files = self._list_manifest_files(stream_name).await?;
// Ok(files)
// }
async fn upload_file(&self, key: &str, path: &Path) -> Result<(), ObjectStorageError> {
self._upload_file(key, path).await?;
Ok(())
}
fn absolute_url(&self, prefix: &RelativePath) -> object_store::path::Path {
object_store::path::Path::parse(prefix).unwrap()
}
fn query_prefixes(&self, prefixes: Vec<String>) -> Vec<ListingTableUrl> {
prefixes
.into_iter()
.map(|prefix| {
let path = format!(
"https://{}.blob.core.windows.net/{}/{}",
self.account, self.container, prefix
);
ListingTableUrl::parse(path).unwrap()
})
.collect()
}
fn store_url(&self) -> Url {
let url_string = format!("https://{}.blob.core.windows.net", self.account);
Url::parse(&url_string).unwrap()
}
async fn list_dirs(&self) -> Result<Vec<String>, ObjectStorageError> {
let pre = object_store::path::Path::from("/");
let resp = self.client.list_with_delimiter(Some(&pre)).await?;
Ok(resp
.common_prefixes
.iter()
.flat_map(|path| path.parts())
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>())
}
async fn list_dirs_relative(
&self,
relative_path: &RelativePath,
) -> Result<Vec<String>, ObjectStorageError> {
let prefix = object_store::path::Path::from(relative_path.as_str());
let resp = self.client.list_with_delimiter(Some(&prefix)).await?;
Ok(resp
.common_prefixes
.iter()
.flat_map(|path| path.parts())
.map(|name| name.as_ref().to_string())
.collect::<Vec<_>>())
}
async fn list_with_delimiter(
&self,
prefix: Option<object_store::path::Path>,
) -> Result<ListResult, ObjectStorageError> {
Ok(self.client.list_with_delimiter(prefix.as_ref()).await?)
}
fn get_bucket_name(&self) -> String {
self.container.clone()
}
}