Trait OperatorCreator

Source
pub trait OperatorCreator:
    Send
    + Sync
    + 'static {
    // Required methods
    fn create(&self) -> Result<Operator>;
    fn create_with_subdir(&self, path: &str) -> Result<Operator>;
}
Expand description

OperatorCreator is used to create an opendal::Operator.

OpenDAL doesn’t support checkout sub dir yet, thus we need to support create a new operator with sub dir. There is an ongoing issue at upstream but no progress yet: https://github.com/apache/incubator-opendal/issues/3151 Instead of waiting for upstream, we can create a new operator with sub dir by ourselves. We can decide to migrate to upstream’s solution in the future.

Besides, our users of icelake could implement their config parsers that not fully compatible with iceberg based config like iceberg.io.xxx. So we make it a trait instead to allow users to implement their own OperatorCreator instead a full storage catalog.

Required Methods§

Source

fn create(&self) -> Result<Operator>

Create an operator with existing config.

Implementor could cache the operator instead to avoid creating it every time.

Source

fn create_with_subdir(&self, path: &str) -> Result<Operator>

Create an operator with sub dir.

Implementors§