aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java12
-rw-r--r--src/main/java/org/onap/music/service/impl/MusicCassaCore.java2
2 files changed, 6 insertions, 8 deletions
diff --git a/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java b/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
index 68423699..9b5793fa 100644
--- a/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
+++ b/src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
@@ -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
diff --git a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
index a7a6a5ab..9bbb3a9a 100644
--- a/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
+++ b/src/main/java/org/onap/music/service/impl/MusicCassaCore.java
@@ -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);
}