pub struct ZerobusSink { /* private fields */ }Expand description
A Databricks Zerobus sink for one target table.
Implementations§
Source§impl ZerobusSink
impl ZerobusSink
Sourcepub async fn start(
id: impl Into<String>,
table: TableRef,
schema: Arc<Schema>,
config: ZerobusConfig,
deps: ZerobusSinkDeps,
peak_mb_per_s: f64,
) -> Result<Self, ZerobusSinkError>
pub async fn start( id: impl Into<String>, table: TableRef, schema: Arc<Schema>, config: ZerobusConfig, deps: ZerobusSinkDeps, peak_mb_per_s: f64, ) -> Result<Self, ZerobusSinkError>
Provision the table and open the stream pool.
peak_mb_per_s sizes the pool (§3.3). Provisioning is delegated to the
catalog (create/evolve, register, vend); the primary-raw preconditions are
checked against the freshly-described live table.
§Errors
ZerobusSinkError if provisioning, the precondition check, or opening the
pool fails.
Trait Implementations§
Source§impl BatchSink for ZerobusSink
impl BatchSink for ZerobusSink
Source§fn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
batch: &'life1 RecordBatch,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn push<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
batch: &'life1 RecordBatch,
span: &'life2 OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<(), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn finish<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(CommitInfo, OffsetSpan), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn finish<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(CommitInfo, OffsetSpan), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the current batching window; return what was submitted and the
submitted high-water span. Does not block on durability. Read more
Source§impl Debug for ZerobusSink
impl Debug for ZerobusSink
Source§impl Sink for ZerobusSink
impl Sink for ZerobusSink
Source§fn send<'life0, 'async_trait>(
&'life0 mut self,
batch: RecordBatch,
span: OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<Receipt, SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
batch: RecordBatch,
span: OffsetSpan,
) -> Pin<Box<dyn Future<Output = Result<Receipt, SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Accept
batch covering source positions span, returning as soon as the
transport accepts it. Must not block on durable acknowledgement. Read moreSource§fn flush<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), SinkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Drain to durability: await outstanding acknowledgements. Used at shutdown
and at explicit checkpoint boundaries, not on the hot path. Read more
Auto Trait Implementations§
impl !Freeze for ZerobusSink
impl !RefUnwindSafe for ZerobusSink
impl Send for ZerobusSink
impl Sync for ZerobusSink
impl Unpin for ZerobusSink
impl !UnwindSafe for ZerobusSink
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
Mutably borrows from an owned value. Read more
§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>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
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>,
Applies the layer to a service and wraps it in [
Layered].