public
Last active

clusterStatus

  • Download Gist
clusterStatus.scala
Scala
1 2 3 4 5 6 7
def clusterStatus: ClusterStatus = {
val isLeader = leaderLatch.hasLeadership
val participants = leaderLatch.getParticipants.asScala
val leader = participants.find(_.isLeader).map(_.getId).getOrElse("<none>")
 
ClusterStatus(nodeId, isLeader, leader, participants.map(_.getId))
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.