Skip to main content

verify_ensemble

Function verify_ensemble 

Source
pub fn verify_ensemble<'a>(
    formatted: impl IntoIterator<Item = (&'a Path, &'a MetaProperties)>,
    expected_cluster_id: Option<ClusterId>,
    expected_node_id: Option<i32>,
) -> Result<Option<ClusterId>, String>
Expand description

Kafka’s MetaPropertiesEnsemble.verify, over the readable files of the directories of one node, sorted by path.

The set agrees on one cluster id and one node id, and no two directories share a directory id, and no directory id is reserved. expected_cluster_id and expected_node_id are the ids that the set has to agree with, when they are known. Returns the cluster id of the set: expected_cluster_id when given, else the id of the first file, or None for an empty set.

§Errors

Returns Kafka’s message, word for word, for the first disagreement.