pub struct LaminarDbBuilder { /* private fields */ }Expand description
Implementations§
Source§impl LaminarDbBuilder
impl LaminarDbBuilder
Sourcepub fn target_partitions(self, n: usize) -> Self
pub fn target_partitions(self, n: usize) -> Self
Override target_partitions; requires a distributed-aware
physical optimizer rule to replace RepartitionExec.
Sourcepub fn physical_optimizer_rule(
self,
rule: Arc<dyn PhysicalOptimizerRule + Send + Sync>,
) -> Self
pub fn physical_optimizer_rule( self, rule: Arc<dyn PhysicalOptimizerRule + Send + Sync>, ) -> Self
Register an additional PhysicalOptimizerRule on the session state.
Sourcepub fn state_backend(self, backend: Arc<dyn StateBackend>) -> Self
pub fn state_backend(self, backend: Arc<dyn StateBackend>) -> Self
Install a state backend. Must be paired with
Self::vnode_registry — build() rejects a half-set
configuration.
Sourcepub fn vnode_registry(self, registry: Arc<VnodeRegistry>) -> Self
pub fn vnode_registry(self, registry: Arc<VnodeRegistry>) -> Self
Install a vnode registry. Must be paired with
Self::state_backend — build() rejects a half-set
configuration.
Sourcepub fn cluster_controller(self, controller: Arc<ClusterController>) -> Self
pub fn cluster_controller(self, controller: Arc<ClusterController>) -> Self
Install a cluster control facade. Activates cluster-mode
checkpoint / shuffle semantics inside the engine. Called from
laminar-server’s cluster startup path after discovery has
converged.
Sourcepub fn shuffle_sender(self, sender: Arc<ShuffleSender>) -> Self
pub fn shuffle_sender(self, sender: Arc<ShuffleSender>) -> Self
Install the outbound shuffle handle used by cluster-mode streaming
aggregates. Rows whose group key hashes to a remote vnode are
shipped through this sender. Pair with Self::shuffle_receiver;
either alone is a no-op.
Sourcepub fn shuffle_receiver(self, receiver: Arc<ShuffleReceiver>) -> Self
pub fn shuffle_receiver(self, receiver: Arc<ShuffleReceiver>) -> Self
Install the inbound shuffle handle used by cluster-mode streaming aggregates. Remote partial-aggregate rows arrive here and are drained into the local accumulator each cycle.
Sourcepub fn decision_store(self, store: Arc<CheckpointDecisionStore>) -> Self
pub fn decision_store(self, store: Arc<CheckpointDecisionStore>) -> Self
Install the commit-marker store for cross-instance 2PC.
Sourcepub fn assignment_snapshot_store(
self,
store: Arc<AssignmentSnapshotStore>,
) -> Self
pub fn assignment_snapshot_store( self, store: Arc<AssignmentSnapshotStore>, ) -> Self
Install the assignment-snapshot store for dynamic rebalance.
Sourcepub fn config_var(self, key: &str, value: &str) -> Self
pub fn config_var(self, key: &str, value: &str) -> Self
Set a config variable for ${VAR} substitution in SQL.
Sourcepub fn buffer_size(self, size: usize) -> Self
pub fn buffer_size(self, size: usize) -> Self
Set the default buffer size for streaming channels.
Sourcepub fn backpressure(self, strategy: BackpressureStrategy) -> Self
pub fn backpressure(self, strategy: BackpressureStrategy) -> Self
Set the default backpressure strategy.
Sourcepub fn storage_dir(self, path: impl Into<PathBuf>) -> Self
pub fn storage_dir(self, path: impl Into<PathBuf>) -> Self
Set the storage directory for WAL and checkpoints.
Sourcepub fn checkpoint(self, config: StreamCheckpointConfig) -> Self
pub fn checkpoint(self, config: StreamCheckpointConfig) -> Self
Set checkpoint configuration.
Sourcepub fn profile(self, profile: Profile) -> Self
pub fn profile(self, profile: Profile) -> Self
Set the deployment profile.
See Profile for the available tiers.
Sourcepub fn object_store_url(self, url: impl Into<String>) -> Self
pub fn object_store_url(self, url: impl Into<String>) -> Self
Set the object-store URL for durable checkpoints.
Required when using Profile::Durable or
Profile::Cluster.
Sourcepub fn object_store_options(self, opts: HashMap<String, String>) -> Self
pub fn object_store_options(self, opts: HashMap<String, String>) -> Self
Set explicit credential/config overrides for the object store.
Keys are backend-specific (e.g., aws_access_key_id, aws_region).
These supplement environment-variable-based credential resolution.
Sourcepub fn tiering(self, tiering: TieringConfig) -> Self
pub fn tiering(self, tiering: TieringConfig) -> Self
Set the S3 storage class tiering configuration.
Sourcepub fn delivery_guarantee(self, guarantee: DeliveryGuarantee) -> Self
pub fn delivery_guarantee(self, guarantee: DeliveryGuarantee) -> Self
Set the end-to-end delivery guarantee for the pipeline.
Sourcepub fn register_udf(self, udf: ScalarUDF) -> Self
pub fn register_udf(self, udf: ScalarUDF) -> Self
Sourcepub fn register_udaf(self, udaf: AggregateUDF) -> Self
pub fn register_udaf(self, udaf: AggregateUDF) -> Self
Sourcepub fn pipeline_channel_capacity(self, capacity: usize) -> Self
pub fn pipeline_channel_capacity(self, capacity: usize) -> Self
Source → coordinator channel capacity (default 64). Increase for burst absorption at the cost of memory.
Sourcepub fn pipeline_batch_window(self, window: Duration) -> Self
pub fn pipeline_batch_window(self, window: Duration) -> Self
Micro-batch coalescing window (default 5ms for connectors, 0 for embedded). Larger values amortize per-cycle SQL overhead.
Sourcepub fn pipeline_drain_budget_ns(self, ns: u64) -> Self
pub fn pipeline_drain_budget_ns(self, ns: u64) -> Self
Max time draining the source channel per cycle, in nanoseconds (default 1ms). Increase to process more messages per SQL execution.
Sourcepub fn pipeline_query_budget_ns(self, ns: u64) -> Self
pub fn pipeline_query_budget_ns(self, ns: u64) -> Self
Per-query execution budget in nanoseconds (default 8ms). When exceeded, remaining queries are deferred to the next cycle.
Sourcepub fn pipeline_max_input_buf_batches(self, batches: usize) -> Self
pub fn pipeline_max_input_buf_batches(self, batches: usize) -> Self
Per-port operator input-buffer cap in batches (default 256).
Sourcepub fn pipeline_max_input_buf_bytes(self, bytes: usize) -> Self
pub fn pipeline_max_input_buf_bytes(self, bytes: usize) -> Self
Per-port operator input-buffer cap in bytes.
Sourcepub fn pipeline_backpressure_policy(self, policy: BackpressurePolicy) -> Self
pub fn pipeline_backpressure_policy(self, policy: BackpressurePolicy) -> Self
Backpressure policy (default Backpressure).
Sourcepub fn register_connector(
self,
f: impl FnOnce(&ConnectorRegistry) + Send + 'static,
) -> Self
pub fn register_connector( self, f: impl FnOnce(&ConnectorRegistry) + Send + 'static, ) -> Self
Register custom connectors with the ConnectorRegistry.
The callback is invoked after the database is created and built-in connectors are registered. Use it to add user-defined source/sink implementations.
§Example
let db = LaminarDB::builder()
.register_connector(|registry| {
registry.register_source("my-source", info, factory);
})
.build()
.await?;Trait Implementations§
Source§impl Debug for LaminarDbBuilder
impl Debug for LaminarDbBuilder
Auto Trait Implementations§
impl Freeze for LaminarDbBuilder
impl !RefUnwindSafe for LaminarDbBuilder
impl Send for LaminarDbBuilder
impl !Sync for LaminarDbBuilder
impl Unpin for LaminarDbBuilder
impl UnsafeUnpin for LaminarDbBuilder
impl !UnwindSafe for LaminarDbBuilder
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
§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
§impl<T> Conv for T
impl<T> Conv for T
§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> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2where
T: SharedNiching<N1, N2>,
N1: Niching<T>,
N2: Niching<T>,
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Pointee for T
impl<T> Pointee for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Scope for T
impl<T> Scope for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.