Code changes to fix cassandra issue 62/117462/2
authorKishore Reddy Dwaram <kishore.reddy.dwaram@att.com>
Wed, 3 Feb 2021 21:40:11 +0000 (16:40 -0500)
committerKishore Reddy Dwaram <kishore.reddy.dwaram@att.com>
Wed, 3 Feb 2021 22:19:41 +0000 (17:19 -0500)
Issue-ID: PORTAL-1058
Signed-off-by: Kishore Reddy Dwaram <kishore.reddy.dwaram@att.com>
Change-Id: I538a160295472ac71a5f563a560dd0af13533741

ecomp-portal-BE-common/src/main/java/org/onap/portalapp/music/service/MusicService.java

index e6d9c32..a2951f1 100644 (file)
@@ -96,23 +96,23 @@ 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 ");
+                logger.debug(EELFLoggerDelegate.debugLogger, "Successfully decrypted cassandra 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());
+                logger.debug(EELFLoggerDelegate.debugLogger, "Successfully created cassandra connection pool ");
                                // 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);
+               logger.debug(EELFLoggerDelegate.debugLogger, e.getMessage(), e);
             }
                
-               } catch(Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), e);
-               }
+        } catch(Exception e) {
+               logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(), e);
+               logger.debug(EELFLoggerDelegate.debugLogger, e.getMessage(), e);
+        }
     }