summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKishore Reddy Dwaram <kishore.reddy.dwaram@att.com>2021-01-29 14:03:30 -0500
committerKishore Reddy Dwaram <kishore.reddy.dwaram@att.com>2021-01-29 14:03:39 -0500
commit694a582b1b84b72347d558c8aaf835d60949b77f (patch)
tree121056460be990e17ad1aac5fc33785245e96aee
parenta04d98b55a44d67918ff79bc550e760fd9e1e278 (diff)
Code changes and added debug statement for cassandra issue.
Issue-ID: PORTAL-1058 Signed-off-by: Kishore Reddy Dwaram <kishore.reddy.dwaram@att.com> Change-Id: I3fee89ade3f12754bc8b668094d45948183f9bdc
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/service/MusicService.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/service/MusicService.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/service/MusicService.java
index 119ad2db..e6d9c323 100644
--- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/service/MusicService.java
+++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/service/MusicService.java
@@ -80,16 +80,6 @@ public class MusicService {
static RestTemplate template = new RestTemplate();
private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MusicService.class);
- static {
- try {
- //MusicCore.getDSHandle();
- init();
- // Since mDstoreHandle is already initialized in init mthod, calling this method again will have no impact on mDstoreHandle.
- MusicCore.getDSHandle();
- } catch (MusicServiceException e) {
- logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), e);
- }
- }
public static void init() {
try {
@@ -106,10 +96,16 @@ public class MusicService {
org.onap.music.main.MusicUtil.loadProperties();
// decrypt encrypted password using the key we loaded before.
String decryptedPassword = CipherUtil.decryptPKC(org.onap.music.main.MusicUtil.getCassPwd(), prop.getProperty("cipher.enc.key"));
+ logger.debug(EELFLoggerDelegate.debugLogger, "Cassandra Password Decrypted " + decryptedPassword);
+ logger.debug(EELFLoggerDelegate.debugLogger, "Setting Decrypted password ");
// set decrypted password
org.onap.music.main.MusicUtil.setCassPwd(decryptedPassword);
+ logger.debug(EELFLoggerDelegate.debugLogger, "Creating cassandra connections pool and sessions by calling MusicDataStore and passing the cassandra hostname ");
// Here we are creating cassandra connections pool and sessions by calling MusicDataStore and passing the cassandrra hostname to that.
MusicCore.mDstoreHandle = new MusicDataStore(org.onap.music.main.MusicUtil.getMyCassaHost());
+ // Since mDstoreHandle is already initialized in init mthod, calling this method again will have no impact on mDstoreHandle.
+ logger.debug(EELFLoggerDelegate.debugLogger, "Calling MusicCore getDSHandle() method ");
+ MusicCore.getDSHandle();
} catch (Exception e) {
logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), e);
}