pub struct ArchiveObject { /* private fields */ }Expand description
Where one archive object lives in the bucket.
The layout is measurement=<m>/shard=<n>/<name>.parquet: Hive-style
partition directories, which DuckDB, Spark, Polars and DataFusion all
expose as columns and prune whole directories on.
§Why measurement= and not namespace=
The old layout partitioned by namespace. It could not be populated: a
namespace is a tag on a series, so one segment holds rows of many
namespaces and there is no namespace to name the directory after — the
caller passed NamespaceId::default_namespace() unconditionally, and every
tenant’s archive landed in one namespace=default directory that said
nothing true. The namespace tag travels in the data instead, where it is
queryable and correct.
Measurement is a segment-level property, and it is the partition an archive actually needs: one Parquet listing table requires one schema, and two measurements do not share one. Partitioning by measurement is what lets each measurement’s archive be registered as its own table with the hot tier’s schema.
Implementations§
Source§impl ArchiveObject
impl ArchiveObject
Sourcepub fn new(
measurement: impl Into<String>,
shard_id: ShardId,
object_name: impl Into<String>,
) -> Result<Self>
pub fn new( measurement: impl Into<String>, shard_id: ShardId, object_name: impl Into<String>, ) -> Result<Self>
Name an archive object.
§Errors
Returns InvalidConfig if measurement or object_name is empty or
carries a path separator or a .. component. A measurement name comes
from user data and is about to become a directory name, so it is
validated here rather than trusted.
Sourcepub fn measurement(&self) -> &str
pub fn measurement(&self) -> &str
The measurement this object holds.
Sourcepub fn measurement_prefix(measurement: &str) -> String
pub fn measurement_prefix(measurement: &str) -> String
The prefix under which every object of measurement lives.
This is what register_cold_tier points a listing table at, so that
one table is one measurement and therefore one schema.
Trait Implementations§
Source§impl Clone for ArchiveObject
impl Clone for ArchiveObject
Source§fn clone(&self) -> ArchiveObject
fn clone(&self) -> ArchiveObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ArchiveObject
impl Debug for ArchiveObject
Source§impl Display for ArchiveObject
impl Display for ArchiveObject
impl Eq for ArchiveObject
Source§impl PartialEq for ArchiveObject
impl PartialEq for ArchiveObject
impl StructuralPartialEq for ArchiveObject
Auto Trait Implementations§
impl Freeze for ArchiveObject
impl RefUnwindSafe for ArchiveObject
impl Send for ArchiveObject
impl Sync for ArchiveObject
impl Unpin for ArchiveObject
impl UnsafeUnpin for ArchiveObject
impl UnwindSafe for ArchiveObject
Blanket Implementations§
impl<T> Allocation for T
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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