[−][src]Struct nakadi_types::event_type::EventTypeStatistics
Operational statistics for an EventType. This data may be provided by users on Event Type creation. Nakadi uses this object in order to provide an optimal number of partitions from a throughput perspective.
This field defines the number of partitions in the underlying Kafka topic of an event type. The amount of partitions is given by the expression max(read_parallelism, write_parallelism). The maximum number of partitions is specific to each deployment of Nakadi and should be referred to in a separated document.
For historical reasons the way that the number of partitions is defined is not as straighforward as it could. The fields messages_per_minute and message_size could potentially influence the resulting amount of partitions, so it’s recommended to set both of them to 1 (one). Providing values different than 1 could result in a higher number of partitions being created.
For those interested in why these fields exist, in the beginning of the project the developers run a very rudimentary benchmark to understand how much data could be ingested by a single Kafka topic-partition. This benchmark data was later used by this feature to define the suposedely ideal number of partitions for the user’s needs. Over time the maintainers of the project found this benchmark to be unreliable, usually resulting in fewer partitions than needed.
See also Nakadi Manual
Fields
messages_per_minute: u64
Write rate for events of this EventType. This rate encompasses all producers of this EventType for a Nakadi cluster.
Measured in event count per minute.
message_size: u64
Average message size for each Event of this EventType. Includes in the count the whole serialized form of the event, including metadata. Measured in bytes.
read_parallelism: u64
Amount of parallel readers (consumers) to this EventType.
write_parallelism: u64
Amount of parallel writers (producers) to this EventType.
Implementations
impl EventTypeStatistics
[src]
pub fn new(
messages_per_minute: u64,
message_size: u64,
read_parallelism: u64,
write_parallelism: u64
) -> Self
[src]
messages_per_minute: u64,
message_size: u64,
read_parallelism: u64,
write_parallelism: u64
) -> Self
Trait Implementations
impl Clone for EventTypeStatistics
[src]
fn clone(&self) -> EventTypeStatistics
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for EventTypeStatistics
[src]
impl Debug for EventTypeStatistics
[src]
impl<'de> Deserialize<'de> for EventTypeStatistics
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for EventTypeStatistics
[src]
impl PartialEq<EventTypeStatistics> for EventTypeStatistics
[src]
fn eq(&self, other: &EventTypeStatistics) -> bool
[src]
fn ne(&self, other: &EventTypeStatistics) -> bool
[src]
impl Serialize for EventTypeStatistics
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for EventTypeStatistics
[src]
impl StructuralPartialEq for EventTypeStatistics
[src]
Auto Trait Implementations
impl RefUnwindSafe for EventTypeStatistics
impl Send for EventTypeStatistics
impl Sync for EventTypeStatistics
impl Unpin for EventTypeStatistics
impl UnwindSafe for EventTypeStatistics
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,