DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
public interface PartitionMetadata {
/**
* The node id of the node currently acting as a leader for this partition or -1 if there is no leader
*/
int leader();
/**
* The complete set of replicas for this partition regardless of whether they are alive or up-to-date
*/
List<Integer> replicas();
/**
* The subset of the replicas that are in sync, that is caught-up to the leader and ready to take over as leader if
* the leader should fail. Note that there is no guarantee the first element is leader, please use leader()
* to get the leader of partition.
*/
List<Integer> inSyncReplicas();
/**
* Check if the partition is available
*/
default boolean isAvailable() {
return leader() != Node.noNode().id();
}
} |
...