Merge "Deadlock detection by owner"
authorThomas Nelson <nelson24@att.com>
Tue, 17 Sep 2019 13:32:00 +0000 (13:32 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 17 Sep 2019 13:32:00 +0000 (13:32 +0000)
src/main/java/org/onap/music/datastore/MusicDataStore.java
src/main/java/org/onap/music/eelf/logging/MusicLoggingServletFilter.java
src/main/java/org/onap/music/lockingservice/cassandra/CassaLockStore.java
src/main/java/org/onap/music/main/MusicUtil.java
src/main/java/org/onap/music/rest/RestMusicLocksAPI.java

index e3d4c78..6555ea2 100755 (executable)
@@ -284,8 +284,7 @@ public class MusicDataStore {
     * @return TableMetadata
     */
    public KeyspaceMetadata returnKeyspaceMetadata(String keyspace) {
-       KeyspaceMetadata ks = cluster.getMetadata().getKeyspace(keyspace);
-       return ks;
+       return cluster.getMetadata().getKeyspace(keyspace);
    }
 
 
index 1cac773..c8c6ba6 100644 (file)
@@ -172,7 +172,7 @@ public class MusicLoggingServletFilter implements Filter {
     }
 
     private void populateMDCAndResponseHeader(Map<String, String> headerMap, String idKey, String mdcKey,
-            boolean isRequired, HttpServletResponse httpResponse) throws  IOException {
+            boolean isRequired, HttpServletResponse httpResponse) {
 
         idKey = idKey.trim().toUpperCase();
 
index f57ecb6..0ec8507 100644 (file)
@@ -454,8 +454,7 @@ public class CassaLockStore {
     }
 
 
-    public void updateLockAcquireTime(String keyspace, String table, String key, String lockReference)
-            throws MusicServiceException, MusicQueryException {
+    public void updateLockAcquireTime(String keyspace, String table, String key, String lockReference) {
         table = table_prepend_name + table;
         PreparedQueryObject queryObject = new PreparedQueryObject();
         Long lockReferenceL = Long.parseLong(lockReference);
index 21e5c25..d46e770 100755 (executable)
@@ -4,7 +4,7 @@
  * ===================================================================
  *  Copyright (c) 2017 AT&T Intellectual Property
  * ===================================================================
- *  Modifications Copyright (c) 2018 IBM.
+ *  Modifications Copyright (c) 2019 IBM.
  *  Modifications Copyright (c) 2019 Samsung.
  * ===================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
@@ -158,7 +158,10 @@ public class MusicUtil {
     private static Boolean messageIdRequired = false;
     private static String cipherEncKey = "";
 
-
+    public MusicUtil() {
+        throw new IllegalStateException("Utility Class");
+    }
+    
     public static String getLockUsing() {
         return lockUsing;
     }
@@ -167,9 +170,6 @@ public class MusicUtil {
         MusicUtil.lockUsing = lockUsing;
     }
 
-    public MusicUtil() {
-        throw new IllegalStateException("Utility Class");
-    }
     /**
      *
      * @return cassandra port
index c08fc5d..b839c7f 100644 (file)
@@ -358,7 +358,7 @@ public class RestMusicLocksAPI {
             @ApiParam(value = "Authorization", required = true) @HeaderParam(MusicUtil.AUTHORIZATION) String authorization,
             @ApiParam(value = "AID", required = false, hidden = true) @HeaderParam("aid") String aid,
             @ApiParam(value = "Application namespace",
-                            required = false, hidden = true) @HeaderParam("ns") String ns) throws Exception{
+                            required = false, hidden = true) @HeaderParam("ns") String ns) {
         try {
             ResponseBuilder response = MusicUtil.buildVersionResponse(VERSION, minorVersion, patchVersion);
             Map<String, Object> resultMap = MusicCore.validateLock(lockName);
@@ -418,7 +418,7 @@ public class RestMusicLocksAPI {
             @ApiParam(value = "Authorization", required = true) @HeaderParam(MusicUtil.AUTHORIZATION) String authorization,
             @ApiParam(value = "AID", required = false, hidden = true) @HeaderParam("aid") String aid,
             @ApiParam(value = "Application namespace",
-                            required = false, hidden = true) @HeaderParam("ns") String ns) throws Exception{
+                            required = false, hidden = true) @HeaderParam("ns") String ns) {
         try {
             ResponseBuilder response = MusicUtil.buildVersionResponse(VERSION, minorVersion, patchVersion);
             Map<String, Object> resultMap = MusicCore.validateLock(lockName);