pub struct QuorumStateSnapshot {Show 17 fields
pub leader_id: Option<NodeId>,
pub leader_epoch: Epoch,
pub high_watermark: i64,
pub last_applied_record_timestamp_ms: i64,
pub pending_record_processing_time_us_avg: u64,
pub pending_record_processing_time_us_max: u64,
pub quorum_high_watermark: i64,
pub log_end_offset: i64,
pub log_start_offset: i64,
pub voters: VoterSet,
pub voted_directory_id: Option<Uuid>,
pub observers: Vec<ObserverReplica>,
pub per_replica_fetch_offset: BTreeMap<NodeId, i64>,
pub per_replica_last_fetch_ms: BTreeMap<NodeId, i64>,
pub per_replica_last_caught_up_ms: BTreeMap<NodeId, i64>,
pub is_leader: bool,
pub current_state: &'static str,
}Expand description
A structured, node-local snapshot of consensus state for the handle, which
serves the broker’s DescribeQuorum admin view.
This is the engine’s own view. The handle maps it into the public
crate::controller::QuorumState.
Fields§
§leader_id: Option<NodeId>§leader_epoch: Epoch§high_watermark: i64§last_applied_record_timestamp_ms: i64Append timestamp, in Unix epoch milliseconds, of the record at
high_watermark - 1 when it is still available in the local log (or
the installed snapshot’s last contained record timestamp). 0 means
no applied record has a known timestamp.
pending_record_processing_time_us_avg: u64Lifetime average elapsed microseconds of completed controller apply passes that processed newly committed records.
pending_record_processing_time_us_max: u64Lifetime maximum elapsed microseconds of completed controller apply passes that processed newly committed records.
quorum_high_watermark: i64Highest offset the quorum has committed, as this node last heard it: this node’s own high watermark on a leader, and the leader-reported high watermark on a follower that is still replaying the log.
high_watermark alone cannot answer “how far behind is this node”,
because a follower clamps it to its own log end. A follower that has
replicated 10 of the quorum’s 10 000 committed records reports
high_watermark == 10 and quorum_high_watermark == 10_000.
log_end_offset: i64§log_start_offset: i64Log-start offset. It rises past 0 once the log has been pruned below a snapshot under KIP-630.
voters: VoterSet§voted_directory_id: Option<Uuid>Directory identity voted for in the current epoch, if any.
observers: Vec<ObserverReplica>The replicas that fetch from this leader without holding a vote and
fetched within the last five minutes (Kafka’s observerStates), one per
(id, directory id) key. Empty unless this node leads.
per_replica_fetch_offset: BTreeMap<NodeId, i64>Per-voter fetch offset, populated on the leader.
per_replica_last_fetch_ms: BTreeMap<NodeId, i64>Per-voter last fetch timestamp in wall-clock milliseconds.
per_replica_last_caught_up_ms: BTreeMap<NodeId, i64>Per-voter last caught-up timestamp in wall-clock milliseconds.
is_leader: boolWhether this node currently leads the metadata quorum.
current_state: &'static strRaft consensus state name (leader, follower, candidate, observer).
Trait Implementations§
Source§impl Clone for QuorumStateSnapshot
impl Clone for QuorumStateSnapshot
Source§fn clone(&self) -> QuorumStateSnapshot
fn clone(&self) -> QuorumStateSnapshot
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 QuorumStateSnapshot
impl RefUnwindSafe for QuorumStateSnapshot
impl Send for QuorumStateSnapshot
impl Sync for QuorumStateSnapshot
impl Unpin for QuorumStateSnapshot
impl UnsafeUnpin for QuorumStateSnapshot
impl UnwindSafe for QuorumStateSnapshot
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<F> FnGhost for F
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);