@Override protected void doHealthCheck(Health.Builder builder) throws Exception { JestResult healthResult = this.jestClient .execute(new io.searchbox.cluster.Health.Builder().build()); if (healthResult.getResponseCode() != 200 || !healthResult.isSucceeded()) { builder.down(); builder.withDetail("statusCode", healthResult.getResponseCode()); } else { Map<String, Object> response = this.jsonParser .parseMap(healthResult.getJsonString()); String status = (String) response.get("status"); if (status.equals(io.searchbox.cluster.Health.Status.RED.getKey())) { builder.outOfService(); } else { builder.up(); } builder.withDetails(response); } }
public Builder waitForStatus(Status status) { return waitForStatus(status.getKey()); }
public Builder waitForStatus(Status status) { return waitForStatus(status.getKey()); }
public Builder waitForStatus(Status status) { return waitForStatus(status.getKey()); }