pub struct ObjectStorageLocationGenerator { /* private fields */ }Expand description
ObjectStorageLocationGenerator injects hash entropy into generated file locations so that
files are spread across many object-store prefixes.
Object stores such as S3 shard request throughput by key prefix, so writing every file under a
common .../data/ prefix creates a throughput hotspot. This generator prepends a
deterministic, hashed directory tree (derived from the file name) to each location, mirroring
Java Iceberg’s ObjectStoreLocationProvider.
The behavior is controlled by these table properties:
write.data.path/write.object-storage.path/write.folder-storage.path- the base data location (checked in that order), defaulting to{table_location}/data.write.object-storage.partitioned-paths- whether partition values are included in the path (defaults totrue).
Implementations§
Source§impl ObjectStorageLocationGenerator
impl ObjectStorageLocationGenerator
Sourcepub fn new(table_metadata: &TableMetadata) -> Result<Self>
pub fn new(table_metadata: &TableMetadata) -> Result<Self>
Create a new ObjectStorageLocationGenerator from table metadata.
Resolve the base data location from table properties, falling back to {table_location}/data.
Precedence follows Java Iceberg: write.data.path first, then the deprecated
write.object-storage.path and write.folder-storage.path properties, and finally the default
{table_location}/data.
Trait Implementations§
Source§impl Clone for ObjectStorageLocationGenerator
impl Clone for ObjectStorageLocationGenerator
Source§fn clone(&self) -> ObjectStorageLocationGenerator
fn clone(&self) -> ObjectStorageLocationGenerator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl LocationGenerator for ObjectStorageLocationGenerator
impl LocationGenerator for ObjectStorageLocationGenerator
Source§fn generate_location(
&self,
partition_key: Option<&PartitionKey>,
file_name: &str,
) -> String
fn generate_location( &self, partition_key: Option<&PartitionKey>, file_name: &str, ) -> String
Auto Trait Implementations§
impl Freeze for ObjectStorageLocationGenerator
impl RefUnwindSafe for ObjectStorageLocationGenerator
impl Send for ObjectStorageLocationGenerator
impl Sync for ObjectStorageLocationGenerator
impl Unpin for ObjectStorageLocationGenerator
impl UnsafeUnpin for ObjectStorageLocationGenerator
impl UnwindSafe for ObjectStorageLocationGenerator
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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