#[non_exhaustive]pub struct ArrowStreamConfigurationOptions {
pub max_inflight_batches: usize,
pub recovery: bool,
pub recovery_timeout_ms: u64,
pub recovery_backoff_ms: u64,
pub recovery_retries: u32,
pub server_lack_of_ack_timeout_ms: u64,
pub flush_timeout_ms: u64,
pub connection_timeout_ms: u64,
pub ipc_compression: Option<CompressionType>,
pub stream_paused_max_wait_time_ms: Option<u64>,
}Expand description
Configuration options for Arrow Flight stream creation and operation.
These options control the behavior of Arrow Flight ingestion streams, including backpressure limits, timeout settings, and recovery policies.
Do not construct this directly. Configure Arrow streams via the builder API:
let stream = sdk
.stream_builder()
.table("catalog.schema.table")
.oauth("client-id", "client-secret")
.arrow(schema)
.max_inflight_batches(100)
.server_lack_of_ack_timeout_ms(30_000)
.recovery(true)
.build_arrow()
.await?;Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_inflight_batches: usizeMaximum number of batches that can be in-flight (sent but not acknowledged).
This limit controls memory usage and backpressure. When this limit is reached,
ingest_batch() calls will block until acknowledgments free up space.
Default: 1,000
recovery: boolWhether to enable automatic stream recovery on failure.
When enabled, the SDK will automatically attempt to reconnect and recover the stream when encountering retryable errors.
Default: true
recovery_timeout_ms: u64Timeout in milliseconds for each stream recovery attempt.
If a recovery attempt takes longer than this, it will be retried.
Default: 15,000 (15 seconds)
recovery_backoff_ms: u64Backoff time in milliseconds between stream recovery retry attempts.
The SDK will wait this duration before attempting another recovery after a failure.
Default: 2,000 (2 seconds)
recovery_retries: u32Maximum number of recovery retry attempts before giving up.
After this many failed attempts, the stream will close and return an error.
Default: 4
server_lack_of_ack_timeout_ms: u64Timeout in milliseconds for waiting for server acknowledgements.
If no acknowledgement is received within this time (and there are pending batches), the stream will be considered failed and recovery will be triggered (if enabled).
Default: 60,000 (60 seconds)
flush_timeout_ms: u64Timeout in milliseconds for flush operations.
If a flush() call cannot complete within this time, it will return a timeout error.
Default: 300,000 (5 minutes)
connection_timeout_ms: u64Timeout in milliseconds for stream connection establishment.
If the Arrow Flight stream cannot be established within this time, stream creation will fail.
Default: 30,000 (30 seconds)
ipc_compression: Option<CompressionType>Optional Arrow IPC compression for Flight payloads.
Supported compression types from arrow_ipc::CompressionType:
CompressionType::LZ4_FRAME- LZ4 frame compressionCompressionType::ZSTD- Zstandard compression
Default: None
stream_paused_max_wait_time_ms: Option<u64>Maximum time in milliseconds to wait during graceful stream close.
When the server sends a close stream signal indicating it will close the stream, the SDK enters a “paused” state where it:
- Continues accepting and buffering new
ingest_batch()calls - Stops sending buffered batches to the server
- Continues processing acknowledgments for in-flight batches
- Waits for either all in-flight batches to be acknowledged or the timeout to expire
Configuration values:
None: Wait for the full server-specified duration (most graceful)Some(0): Immediate recovery, close stream right awaySome(x): Wait up to min(x, server_duration) milliseconds
Default: None (wait for full server duration)
Trait Implementations§
Source§impl Clone for ArrowStreamConfigurationOptions
impl Clone for ArrowStreamConfigurationOptions
Source§fn clone(&self) -> ArrowStreamConfigurationOptions
fn clone(&self) -> ArrowStreamConfigurationOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ArrowStreamConfigurationOptions
impl RefUnwindSafe for ArrowStreamConfigurationOptions
impl Send for ArrowStreamConfigurationOptions
impl Sync for ArrowStreamConfigurationOptions
impl Unpin for ArrowStreamConfigurationOptions
impl UnsafeUnpin for ArrowStreamConfigurationOptions
impl UnwindSafe for ArrowStreamConfigurationOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request