pub struct BulkInserterOptions
pub insert_options: Option<HashMap<String, String>>,
pub flush_options: FlushOptions,
pub max_retries: usize,
pub worker_list: Option<WorkerList>,
pub max_in_flight_batches: usize,
pub batch_listener: Option<Arc<dyn BatchInsertionListener>>,
Options for configuring the BulkInserter.
The insert options map is passed directly to insert_records calls and supports the same options as the /insert/records endpoint.
Fields
insert_options: Option<HashMap<String, String>>Optional parameters to pass to GPUdb while inserting. These are passed directly to the insert_records API call. See insert_records_options module for available option keys.
flush_options: FlushOptionsOptions for controlling automatic/timed flush behavior.
max_retries: usizeMaximum number of retries for failed insertions. Default is 3.
This counts retries after the first attempt (0 means one attempt), only connection failures are retried, and the count starts again on another cluster after an HA failover.
worker_list: Option<WorkerList>Optional worker list for multi-head ingest. If None, the worker list will be automatically configured from the server. Pass an empty WorkerList to disable multi-head ingest.
max_in_flight_batches: usizeMaximum number of concurrent in-flight batch requests. Limits memory usage by blocking when this limit is reached. Default is 100.
batch_listener: Option<Arc<dyn BatchInsertionListener>>Optional batch insertion listener for callbacks. Called when each batch completes (success or failure).
Implementations
pub fn set_update_on_existing_pk(&mut self, value: bool) -> &mut Self
Sets whether to update existing records on primary key collision.
pub fn set_ignore_existing_pk(&mut self, value: bool) -> &mut Self
Sets whether to ignore existing primary key collisions (suppress errors).
pub fn set_return_individual_errors(&mut self, value: bool) -> &mut Self
Sets whether to return individual errors for each record.
pub fn set_allow_partial_batch(&mut self, value: bool) -> &mut Self
Sets whether to allow partial batch insertions.
pub fn set_truncate_strings(&mut self, value: bool) -> &mut Self
Sets whether to truncate strings to fit the column width.
pub fn set_flush_options(&mut self, flush_options: FlushOptions) -> &mut Self
Sets the flush options for automatic/timed flush.
pub fn set_max_retries(&mut self, max_retries: usize) -> &mut Self
Sets the maximum number of retries for failed insertions.
pub fn set_worker_list(&mut self, worker_list: Option<WorkerList>) -> &mut Self
Sets the worker list for multi-head ingest.
pub fn set_option(&mut self, key: &str, value: &str) -> &mut Self
Adds a custom option to the insert options map.
pub fn set_max_in_flight_batches(&mut self, max_batches: usize) -> &mut Self
Sets the maximum number of concurrent in-flight batch requests. This limits memory usage by blocking when the limit is reached.
pub fn set_batch_listener( &mut self, listener: Arc<dyn BatchInsertionListener>, ) -> &mut Self
Sets the batch insertion listener for callbacks. The listener will be called when each batch completes (success or failure).
Trait Implementations
impl Clone for BulkInserterOptions
fn clone(&self) -> BulkInserterOptions
fn clone_from(&mut self, source: &Self)
source. Read more