diff options
author | Tschaen, Brendan <ctschaen@att.com> | 2019-02-25 17:31:00 -0500 |
---|---|---|
committer | Tschaen, Brendan <ctschaen@att.com> | 2019-02-26 11:51:24 -0500 |
commit | b58e1d3db05aed02b62a557bf14db6ea7b8df5f5 (patch) | |
tree | 52efe61d7a948c98d088b6c09e3a31fdc41f801f /src/main/java/org/onap/music/rest/RestMusicHealthCheckAPI.java | |
parent | 7c2316f479f338c4b0fd9a150d8b858cea3b377c (diff) |
Remove zookeeper reference
Test cachingUtil, and other test coverage increase
Remove unused code
Rebased ontop of authentication changes
Change-Id: I795a9a90d0863b03cc2a4917d4ff13a0a6fca1cc
Issue-ID: MUSIC-341
Signed-off-by: Tschaen, Brendan <ctschaen@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/rest/RestMusicHealthCheckAPI.java')
-rw-r--r-- | src/main/java/org/onap/music/rest/RestMusicHealthCheckAPI.java | 27 |
1 files changed, 2 insertions, 25 deletions
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 @@ -91,24 +91,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<String, Object> 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) @Produces(MediaType.APPLICATION_JSON) @@ -116,13 +98,8 @@ public class RestMusicHealthCheckAPI { logger.info(EELFLoggerDelegate.applicationLogger,"Replying to request for Health Check status for MUSIC"); Map<String, Object> 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 { |