pub struct StorageBackend {
pub object_store: Arc<dyn ObjectStore>,
pub base_path: String,
pub original_uri: String,
}Expand description
Native object-store storage handles shared by catalog, session, and stream writers.
Fields§
§object_store: Arc<dyn ObjectStore>object_store adapter used by DataFusion, Parquet, and existing persistence code.
base_path: StringPath prefix inside the object store for URI schemes that carry bucket/container roots.
original_uri: StringNormalized URI used to create this backend.
Implementations§
Source§impl StorageBackend
impl StorageBackend
Sourcepub fn datafusion_root_url(&self) -> Result<Url>
pub fn datafusion_root_url(&self) -> Result<Url>
Returns the root URL DataFusion should associate with this object store.
Delta and external catalog integrations use object-store-relative paths after the object store has already rooted the operator at the catalog path. Registering the object store at the URI authority root keeps those relative table paths stable across local, memory, and cloud storage.
§Errors
Returns an error if the original URI cannot be converted into a DataFusion object-store URL.
Sourcepub async fn list_directory_stems(
&self,
subdirectory: &str,
) -> Result<Vec<String>>
pub async fn list_directory_stems( &self, subdirectory: &str, ) -> Result<Vec<String>>
Lists immediate child directory stems below a storage-relative subdirectory.
This is used by catalog data and run-session discovery so local, memory, and cloud backends share one object-store listing path.
§Errors
Returns an error if the object-store listing fails.
Sourcepub async fn list_files(
&self,
subdirectory: &str,
suffix: Option<&str>,
) -> Result<Vec<String>>
pub async fn list_files( &self, subdirectory: &str, suffix: Option<&str>, ) -> Result<Vec<String>>
Lists files below a storage-relative subdirectory.
§Errors
Returns an error if the object-store listing fails.
Sourcepub async fn write_run_manifest(
&self,
kind: &str,
instance_id: &str,
status: &str,
empty: bool,
) -> Result<()>
pub async fn write_run_manifest( &self, kind: &str, instance_id: &str, status: &str, empty: bool, ) -> Result<()>
Writes a manifest for a run under the catalog session root.
§Errors
Returns an error if manifest serialization or storage writing fails.
Sourcepub async fn write_current_run_manifest(
&self,
kind: &str,
instance_id: &str,
status: &str,
empty: bool,
) -> Result<()>
pub async fn write_current_run_manifest( &self, kind: &str, instance_id: &str, status: &str, empty: bool, ) -> Result<()>
Writes a manifest at the backend root, for writers rooted directly at one run directory.
§Errors
Returns an error if manifest serialization or storage writing fails.
Sourcepub async fn read_run_manifest(
&self,
kind: &str,
instance_id: &str,
) -> Result<Option<RunManifest>>
pub async fn read_run_manifest( &self, kind: &str, instance_id: &str, ) -> Result<Option<RunManifest>>
Reads a run manifest from catalog session storage.
§Errors
Returns an error if storage reading or manifest deserialization fails.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StorageBackend
impl !UnwindSafe for StorageBackend
impl Freeze for StorageBackend
impl Send for StorageBackend
impl Sync for StorageBackend
impl Unpin for StorageBackend
impl UnsafeUnpin for StorageBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more