yahoNanJing commented on code in PR #2906:
URL: https://github.com/apache/arrow-datafusion/pull/2906#discussion_r921724379
##########
datafusion/core/src/datasource/object_store.rs:
##########
@@ -81,10 +81,19 @@ impl std::fmt::Display for ObjectStoreUrl {
}
}
+/// Object store self detector can detector an object store based on the url
+pub trait ObjectStoreSelfDetector: Send + Sync + 'static {
+ /// Detector a suitable object store based on its url if possible
+ /// Return the key and object store
+ fn get_by_url(&self, url: &Url) -> Option<(String, Arc<dyn ObjectStore>)>;
+}
+
/// Object store registry
+#[derive(Clone)]
pub struct ObjectStoreRegistry {
/// A map from scheme to object store that serve list / read operations
for the store
- object_stores: RwLock<HashMap<String, Arc<dyn ObjectStore>>>,
+ object_stores: Arc<RwLock<HashMap<String, Arc<dyn ObjectStore>>>>,
+ self_detector: Option<Arc<dyn ObjectStoreSelfDetector>>,
Review Comment:
I think string is OK
--
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]