Revert "Less abbreviations, more reliable test"

This reverts commit 61e289b276f410654c1b063c33648e0d7ea88e50.
This commit is contained in:
Patrik Nordwall 2017-07-03 10:44:24 +02:00
parent 9bd27a2459
commit bd6afb8952
5 changed files with 14 additions and 14 deletions

View file

@ -65,8 +65,8 @@ akka {
# move 'WeaklyUp' members to 'Up' status once convergence has been reached.
allow-weakly-up-members = on
# Teams are used to make islands of the cluster that are colocated. This can be used
# to make the cluster aware that it is running across multiple availability zones or regions.
# Teams are used to make islands of the cluster that are colocated. It can be used
# to make the cluster "dc-aware", run the cluster in multiple availability zones or regions.
# The team is added to the list of roles of the node with the prefix "team-".
team = "default"

View file

@ -154,7 +154,7 @@ private[akka] class ClusterJmx(cluster: Cluster, log: LoggingAdapter) {
val members = clusterView.members.toSeq.sorted(Member.ordering).map { m
s"""{
| "address": "${m.address}",
| "roles": [${if (m.roles.isEmpty) "" else m.roles.toList.sorted.map("\"" + _ + "\"").mkString("\n ", ",\n ", "\n ")}],
| "roles": [${if (m.roles.isEmpty) "" else m.roles.map("\"" + _ + "\"").mkString("\n ", ",\n ", "\n ")}],
| "status": "${m.status}"
| }""".stripMargin
} mkString (",\n ")

View file

@ -22,7 +22,7 @@ class Member private[cluster] (
val status: MemberStatus,
val roles: Set[String]) extends Serializable {
lazy val team: String = roles.find(_.startsWith("team-"))
lazy val team = roles.find(_.startsWith("team-"))
.getOrElse(throw new IllegalStateException("Team undefined, should not be possible"))
def address: Address = uniqueAddress.address

View file

@ -120,32 +120,32 @@ abstract class MBeanSpec
| {
| "address": "${sortedNodes(0)}",
| "roles": [
| "team-default",
| "testNode"
| "testNode",
| "team-default"
| ],
| "status": "Up"
| },
| {
| "address": "${sortedNodes(1)}",
| "roles": [
| "team-default",
| "testNode"
| "testNode",
| "team-default"
| ],
| "status": "Up"
| },
| {
| "address": "${sortedNodes(2)}",
| "roles": [
| "team-default",
| "testNode"
| "testNode",
| "team-default"
| ],
| "status": "Up"
| },
| {
| "address": "${sortedNodes(3)}",
| "roles": [
| "team-default",
| "testNode"
| "testNode",
| "team-default"
| ],
| "status": "Up"
| }

View file

@ -6,8 +6,8 @@ Cluster teams are a work-in-progress feature, and behavior is still expected to
@@@
Teams are used to make islands of the cluster that are colocated. This can be used
to make the cluster aware that it is running across multiple availability zones or regions.
Teams are used to define islands of the cluster that are colocated.
They can be used to make the cluster "dc-aware", run the cluster in multiple availability zones or regions.
Cluster nodes can be assigned to a team by setting the `akka.cluster.team` setting.
When no team is specified, a node will belong to the 'default' team.