Skip to content
Snippets Groups Projects
Commit cbeec92a authored by Leonardo Menezes's avatar Leonardo Menezes
Browse files

fix unhealthy index property

closes #225
parent 8fb47403
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ object Index { ...@@ -16,7 +16,7 @@ object Index {
numReplicas = shardInstances.length - 1 numReplicas = shardInstances.length - 1
shardInstances.map { shard => shardInstances.map { shard =>
unhealthy = unhealthy && (shard \ "state").as[String].equals("STARTED") unhealthy = unhealthy || !(shard \ "state").as[String].equals("STARTED")
(shard \ "node").asOpt[String].getOrElse("unassigned") -> shard (shard \ "node").asOpt[String].getOrElse("unassigned") -> shard
} }
}.groupBy(_._1).mapValues(v => JsArray(v.map(_._2))) }.groupBy(_._1).mapValues(v => JsArray(v.map(_._2)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment