Skip to main content

StorageOptions

Struct StorageOptions 

Source
pub struct StorageOptions {
    pub backend: StorageBackendConfig,
    pub bloom_false_positive_rate: Option<f64>,
    pub cache_size: Option<String>,
    pub compression: StorageCompression,
    pub compression_level: Option<i32>,
    pub min_spill_size: Option<String>,
    pub min_step_spill_size: Option<String>,
}
Expand description

Storage configuration for a pipeline.

JSON schema
{
 "description": "Storage configuration for a pipeline.",
 "type": "object",
 "properties": {
   "backend": {
     "default": {
       "name": "default"
     },
     "allOf": [
       {
         "$ref": "#/components/schemas/StorageBackendConfig"
       }
     ]
   },
   "bloom_false_positive_rate": {
     "description": "False-positive rate for Bloom filters on batches on storage, as a\nfraction f, where 0 < f < 1.\n\nThe false-positive rate trades off between the amount of memory used by\nBloom filters and how frequently storage needs to be searched for keys\nthat are not actually present.  Typical false-positive rates and their\ncorresponding memory costs are:\n\n- 0.1: 4.8 bits per key\n- 0.01: 9.6 bits per key\n- 0.001: 14.4 bits per key\n- 0.0001: 19.2 bits per key (default)\n\nValues outside the valid range, such as 0.0, disable Bloom filters.",
     "type": [
       "number",
       "null"
     ],
     "format": "double"
   },
   "cache_size": {
     "description": "The maximum size of the in-memory storage cache, such as `\"4Gi\"`.\n\nIf set, the specified cache size is spread across all the foreground and\nbackground threads. If unset, each foreground or background thread cache\nis limited to 256 MiB.\n\nBefore release 0.367.0 this setting was `cache_mib`, a number of\nmebibytes. That name is deprecated but still read.",
     "type": [
       "string",
       "null"
     ]
   },
   "compression": {
     "default": "default",
     "allOf": [
       {
         "$ref": "#/components/schemas/StorageCompression"
       }
     ]
   },
   "compression_level": {
     "description": "Compression level, for compression algorithms that have one.\n\nOnly `StorageCompression::Zstd` uses this. Higher levels compress\nharder and more slowly; decompression speed is largely unaffected, so\nthe tradeoff is write throughput against stored size. Zstd accepts\nroughly 1 to 22, and a value outside the range its build supports is\nclamped into it.\n\nThis is provided for fine-tuning and should ordinarily be left unset,\nwhich selects the algorithm's own default.",
     "type": [
       "integer",
       "null"
     ],
     "format": "int32"
   },
   "min_spill_size": {
     "description": "For a batch of data maintained as part of a persistent index during a\npipeline run, the minimum estimated size to write it to storage, such\nas `\"10Mi\"`.\n\nThis is provided for debugging and fine-tuning and should ordinarily be\nleft unset.\n\nA value of 0 will write even empty batches to storage, and nonzero\nvalues provide a threshold.  A very large value effectively disables\nstorage for such batches.  The default is `\"10Mi\"`.\n\nBefore release 0.367.0 this setting was `min_storage_bytes`, a number\nof bytes. That name is deprecated but still read.",
     "type": [
       "string",
       "null"
     ]
   },
   "min_step_spill_size": {
     "description": "For a batch of data passed through the pipeline during a single step,\nthe minimum estimated size to write it to storage, such as `\"64Mi\"`.\n\nThis is provided for debugging and fine-tuning and should ordinarily be\nleft unset.  A value of 0 writes every batch that holds anything to\nstorage; an empty batch stays in memory, since it has nothing to spill\nand a layer file is not free.  Nonzero values provide a threshold.\nUnset, the default, effectively disables storage for such batches.\nIf it is set, it should ordinarily be greater than or equal to\n`min_spill_size`.\n\nBefore release 0.367.0 this setting was `min_step_storage_bytes`, a\nnumber of bytes. That name is deprecated but still read.",
     "type": [
       "string",
       "null"
     ]
   }
 }
}

Fields§

§backend: StorageBackendConfig§bloom_false_positive_rate: Option<f64>

False-positive rate for Bloom filters on batches on storage, as a fraction f, where 0 < f < 1.

The false-positive rate trades off between the amount of memory used by Bloom filters and how frequently storage needs to be searched for keys that are not actually present. Typical false-positive rates and their corresponding memory costs are:

  • 0.1: 4.8 bits per key
  • 0.01: 9.6 bits per key
  • 0.001: 14.4 bits per key
  • 0.0001: 19.2 bits per key (default)

Values outside the valid range, such as 0.0, disable Bloom filters.

§cache_size: Option<String>

The maximum size of the in-memory storage cache, such as "4Gi".

If set, the specified cache size is spread across all the foreground and background threads. If unset, each foreground or background thread cache is limited to 256 MiB.

Before release 0.367.0 this setting was cache_mib, a number of mebibytes. That name is deprecated but still read.

§compression: StorageCompression§compression_level: Option<i32>

Compression level, for compression algorithms that have one.

Only StorageCompression::Zstd uses this. Higher levels compress harder and more slowly; decompression speed is largely unaffected, so the tradeoff is write throughput against stored size. Zstd accepts roughly 1 to 22, and a value outside the range its build supports is clamped into it.

This is provided for fine-tuning and should ordinarily be left unset, which selects the algorithm’s own default.

§min_spill_size: Option<String>

For a batch of data maintained as part of a persistent index during a pipeline run, the minimum estimated size to write it to storage, such as "10Mi".

This is provided for debugging and fine-tuning and should ordinarily be left unset.

A value of 0 will write even empty batches to storage, and nonzero values provide a threshold. A very large value effectively disables storage for such batches. The default is "10Mi".

Before release 0.367.0 this setting was min_storage_bytes, a number of bytes. That name is deprecated but still read.

§min_step_spill_size: Option<String>

For a batch of data passed through the pipeline during a single step, the minimum estimated size to write it to storage, such as "64Mi".

This is provided for debugging and fine-tuning and should ordinarily be left unset. A value of 0 writes every batch that holds anything to storage; an empty batch stays in memory, since it has nothing to spill and a layer file is not free. Nonzero values provide a threshold. Unset, the default, effectively disables storage for such batches. If it is set, it should ordinarily be greater than or equal to min_spill_size.

Before release 0.367.0 this setting was min_step_storage_bytes, a number of bytes. That name is deprecated but still read.

Implementations§

Trait Implementations§

Source§

impl Clone for StorageOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StorageOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StorageOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for StorageOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&StorageOptions> for StorageOptions

Source§

fn from(value: &StorageOptions) -> Self

Converts to this type from the input type.
Source§

impl From<StorageOptions> for StorageOptions

Source§

fn from(value: StorageOptions) -> Self

Converts to this type from the input type.
Source§

impl Serialize for StorageOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<StorageOptions> for StorageOptions

Source§

type Error = ConversionError

The type returned in the event of a conversion error.
Source§

fn try_from(value: StorageOptions) -> Result<Self, ConversionError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more