Search in sources :

Example 1 with ClusterHealthReport

use of io.mesosphere.mesos.frameworks.cassandra.scheduler.health.ClusterHealthReport in project cassandra-mesos-deprecated by mesosphere.

the class HealthCheckController method cluster.

@GET
@Path("/cluster")
public Response cluster() {
    final ClusterHealthReport report = healthReportService.generateClusterHealthReport();
    boolean healthy = report.isHealthy();
    LOGGER.info("Cluster Health Report Generated. result: healthy = {}", healthy);
    if (healthy) {
        return Response.ok("{\"healthy\":true}", "application/json").build();
    } else {
        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
    }
}
Also used : ClusterHealthReport(io.mesosphere.mesos.frameworks.cassandra.scheduler.health.ClusterHealthReport) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Aggregations

ClusterHealthReport (io.mesosphere.mesos.frameworks.cassandra.scheduler.health.ClusterHealthReport)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1