Cassa lockstore return string for peekLock 58/74158/3
authorTschaen, Brendan <ctschaen@att.com>
Mon, 3 Dec 2018 20:21:30 +0000 (15:21 -0500)
committerTschaen, Brendan <ctschaen@att.com>
Mon, 3 Dec 2018 22:27:06 +0000 (17:27 -0500)
Change-Id: I4384ed522e7849ba9ca355efa63a08512f11ccec
Issue-ID: MUSIC-222
Signed-off-by: Tschaen, Brendan <ctschaen@att.com>
src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
src/main/java/org/onap/music/service/impl/MusicCassaCore.java

index 6842369..9b5793f 100644 (file)
@@ -167,16 +167,14 @@ public class CassaLockStore {
                PreparedQueryObject queryObject = new PreparedQueryObject();
         queryObject.appendQueryString(selectQuery);
                ResultSet rs = dsHandle.executeOneConsistencyGet(queryObject);
-               System.err.println(rs);
-               
                return rs.one().getLong("count");
        }
-       
-       
+
+
        /**
-        * This method returns the top of lock table/queue for the key. 
-        * @param keyspace of the application. 
-        * @param table of the application. 
+        * This method returns the top of lock table/queue for the key.
+        * @param keyspace of the application.
+        * @param table of the application.
         * @param key is the primary key of the application table
         * @return the UUID lock reference.
         * @throws MusicServiceException
index a7a6a5a..9bbb3a9 100644 (file)
@@ -327,7 +327,7 @@ public class MusicCassaCore implements MusicCoreService {
         String table = splitString[1];
         String primaryKeyValue = splitString[2];
         try {
-            return getLockingServiceHandle().peekLockQueue(keyspace, table, primaryKeyValue)+"";
+            return getLockingServiceHandle().peekLockQueue(keyspace, table, primaryKeyValue).lockRef;
         } catch (MusicLockingException | MusicServiceException | MusicQueryException e) {
                logger.error(EELFLoggerDelegate.errorLogger,e.getMessage(), AppMessages.LOCKINGERROR+fullyQualifiedKey ,ErrorSeverity.CRITICAL, ErrorTypes.LOCKINGERROR);
         }