diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java | 5 | ||||
-rw-r--r-- | src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java b/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java index 9630abe0..c79ba9b7 100644 --- a/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java +++ b/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java @@ -38,12 +38,11 @@ import io.swagger.annotations.ApiModelProperty; public class JsonInsert implements Serializable { private String keyspaceName; private String tableName; - private Map<String, Object> values; + private transient Map<String, Object> values; private String ttl; private String timestamp; - private Map<String, Object> row_specification; + private transient Map<String, Object> row_specification; private Map<String, String> consistencyInfo; - private byte[] data; private Map<String, byte[]> objectMap; @ApiModelProperty(value = "objectMap") diff --git a/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java b/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java index 9c3e842e..af6e6151 100644 --- a/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java +++ b/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java @@ -56,16 +56,19 @@ public class MusicHealthCheck { result = getAdminKeySpace(consistency); } catch(Exception e) { if(e.getMessage().toLowerCase().contains("unconfigured table healthcheck")) { - System.out.println("Creating table...."); + logger.error("Error", e); + logger.debug("Creating table...."); boolean ksresult = createKeyspace(); if(ksresult) try { result = getAdminKeySpace(consistency); } catch (MusicServiceException e1) { // TODO Auto-generated catch block + logger.error("Error", e); e1.printStackTrace(); } } else { + logger.error("Error", e); return "One or more nodes are down or not responding."; } } @@ -103,8 +106,9 @@ public class MusicHealthCheck { } catch (MusicServiceException e) { // TODO Auto-generated catch block e.printStackTrace(); + logger.error("Error", e); } - if(rs.getResult().toLowerCase().contains("success")) + if(rs != null && rs.getResult().toLowerCase().contains("success")) return true; else return false; @@ -126,8 +130,6 @@ public class MusicHealthCheck { logger.info(EELFLoggerDelegate.applicationLogger, "Zookeeper is Active and Running"); return "ACTIVE"; - // return "Zookeeper is not responding"; - } public String getCassandrHost() { |