pub struct ChunkBatcherConfig {
pub flush_tick: Duration,
pub flush_num_bytes: u64,
pub flush_num_rows: u64,
pub chunk_max_rows_if_unsorted: u64,
pub max_commands_in_flight: Option<u64>,
pub max_chunks_in_flight: Option<u64>,
}Expand description
Defines the different thresholds of the associated ChunkBatcher.
See Self::default and Self::from_env.
Fields§
§flush_tick: DurationDuration of the periodic tick.
flush_num_bytes: u64Flush if the accumulated payload has a size in bytes equal or greater than this.
The resulting Chunk might be larger than flush_num_bytes!
flush_num_rows: u64Flush if the accumulated payload has a number of rows equal or greater than this.
chunk_max_rows_if_unsorted: u64Split a chunk if it contains >= rows than this threshold and one or more of its timelines are unsorted.
max_commands_in_flight: Option<u64>Size of the internal channel of commands.
Unbounded if left unspecified. Once a batcher is created, this property cannot be changed.
max_chunks_in_flight: Option<u64>Size of the internal channel of Chunks.
Unbounded if left unspecified. Once a batcher is created, this property cannot be changed.
Implementations§
Source§impl ChunkBatcherConfig
impl ChunkBatcherConfig
Sourcepub const LOW_LATENCY: Self
pub const LOW_LATENCY: Self
Low-latency configuration, preferred when streaming directly to a viewer.
Sourcepub const NEVER: Self
pub const NEVER: Self
Never flushes unless manually told to (or hitting one the builtin invariants).
Sourcepub const ENV_FLUSH_TICK: &'static str = "RERUN_FLUSH_TICK_SECS"
pub const ENV_FLUSH_TICK: &'static str = "RERUN_FLUSH_TICK_SECS"
Environment variable to configure Self::flush_tick.
Sourcepub const ENV_FLUSH_NUM_BYTES: &'static str = "RERUN_FLUSH_NUM_BYTES"
pub const ENV_FLUSH_NUM_BYTES: &'static str = "RERUN_FLUSH_NUM_BYTES"
Environment variable to configure Self::flush_num_bytes.
Sourcepub const ENV_FLUSH_NUM_ROWS: &'static str = "RERUN_FLUSH_NUM_ROWS"
pub const ENV_FLUSH_NUM_ROWS: &'static str = "RERUN_FLUSH_NUM_ROWS"
Environment variable to configure Self::flush_num_rows.
Sourcepub const ENV_CHUNK_MAX_ROWS_IF_UNSORTED: &'static str = "RERUN_CHUNK_MAX_ROWS_IF_UNSORTED"
pub const ENV_CHUNK_MAX_ROWS_IF_UNSORTED: &'static str = "RERUN_CHUNK_MAX_ROWS_IF_UNSORTED"
Environment variable to configure Self::chunk_max_rows_if_unsorted.
Sourcepub fn from_env() -> ChunkBatcherResult<Self>
pub fn from_env() -> ChunkBatcherResult<Self>
Creates a new ChunkBatcherConfig using the default values, optionally overridden
through the environment.
See Self::apply_env.
Sourcepub fn apply_env(&self) -> ChunkBatcherResult<Self>
pub fn apply_env(&self) -> ChunkBatcherResult<Self>
Returns a copy of self, overriding existing fields with values from the environment if
they are present.
See Self::ENV_FLUSH_TICK, Self::ENV_FLUSH_NUM_BYTES, Self::ENV_FLUSH_NUM_BYTES.
Trait Implementations§
Source§impl Clone for ChunkBatcherConfig
impl Clone for ChunkBatcherConfig
Source§fn clone(&self) -> ChunkBatcherConfig
fn clone(&self) -> ChunkBatcherConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChunkBatcherConfig
impl Debug for ChunkBatcherConfig
Source§impl Default for ChunkBatcherConfig
impl Default for ChunkBatcherConfig
Source§impl PartialEq for ChunkBatcherConfig
impl PartialEq for ChunkBatcherConfig
impl Eq for ChunkBatcherConfig
impl StructuralPartialEq for ChunkBatcherConfig
Auto Trait Implementations§
impl Freeze for ChunkBatcherConfig
impl RefUnwindSafe for ChunkBatcherConfig
impl Send for ChunkBatcherConfig
impl Sync for ChunkBatcherConfig
impl Unpin for ChunkBatcherConfig
impl UnwindSafe for ChunkBatcherConfig
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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<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