X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fmusic%2Frest%2FRestMusicHealthCheckAPI.java;h=cb8965eebaa0dd8aa4cf9fc2a66a1fe3cbb3cc9c;hb=b58e1d3db05aed02b62a557bf14db6ea7b8df5f5;hp=a9b4c7af2a8ddfd7639ef2fa92c2d328b28f77ba;hpb=7c2316f479f338c4b0fd9a150d8b858cea3b377c;p=music.git diff --git a/src/main/java/org/onap/music/rest/RestMusicHealthCheckAPI.java b/src/main/java/org/onap/music/rest/RestMusicHealthCheckAPI.java index a9b4c7af..cb8965ee 100644 --- a/src/main/java/org/onap/music/rest/RestMusicHealthCheckAPI.java +++ b/src/main/java/org/onap/music/rest/RestMusicHealthCheckAPI.java @@ -90,24 +90,6 @@ public class RestMusicHealthCheckAPI { } - @GET - @Path("/pingZookeeper") - @ApiOperation(value = "Get Health Status", response = Map.class) - @Produces(MediaType.APPLICATION_JSON) - public Response ZKStatus(@Context HttpServletResponse response) { - logger.info(EELFLoggerDelegate.applicationLogger,"Replying to request for MUSIC Health Check status for Zookeeper"); - Map resultMap = new HashMap<>(); - MusicHealthCheck ZKHealthCheck = new MusicHealthCheck(); - String status = ZKHealthCheck.getZookeeperStatus(); - if(status.equals(ACTIVE_STATUS)) { - resultMap.put(ACTIVE_STATUS, "Zookeeper is Active and Running"); - return Response.status(Status.OK).entity(resultMap).build(); - }else { - resultMap.put("INACTIVE", "Zookeeper is not responding"); - return Response.status(Status.BAD_REQUEST).entity(resultMap).build(); - } - } - @GET @Path("/musicHealthCheck") @ApiOperation(value = "Get Health Status", response = Map.class) @@ -116,13 +98,8 @@ public class RestMusicHealthCheckAPI { logger.info(EELFLoggerDelegate.applicationLogger,"Replying to request for Health Check status for MUSIC"); Map resultMap = new HashMap<>(); MusicHealthCheck healthCheck = new MusicHealthCheck(); - String status = healthCheck.getZookeeperStatus(); - if(status.equals(ACTIVE_STATUS)) { - resultMap.put("ZooKeeper", "Active"); - }else { - resultMap.put("ZooKeeper", "Inactive"); - } - status = healthCheck.getCassandraStatus(ConsistencyLevel.ANY.toString()); + + String status = healthCheck.getCassandraStatus(ConsistencyLevel.ANY.toString()); if(status.equals(ACTIVE_STATUS)) { resultMap.put("Cassandra", "Active"); } else {