aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorTschaen, Brendan <ctschaen@att.com>2019-03-07 16:43:47 -0500
committerTschaen, Brendan <ctschaen@att.com>2019-03-07 16:57:02 -0500
commit3135f7122bc7de7845c4b60e457245c9cc9ff511 (patch)
tree54d0ddf40cd7649820ff2540894f9a43d4686555 /src/main/java
parent4d6e2a982cc0ee48aca9d8531424d795e44842c9 (diff)
Remove straggling zookeper references
Issue-ID: MUSIC-361 Signed-off-by: Tschaen, Brendan <ctschaen@att.com> Change-Id: I4faac78bc898b07902ce97ac6112f0dcd4a3729a
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/music/eelf/logging/format/AppMessages.java7
-rw-r--r--src/main/java/org/onap/music/lockingservice/cassandra/MusicLockState.java2
-rwxr-xr-xsrc/main/java/org/onap/music/main/MusicUtil.java23
-rw-r--r--src/main/java/org/onap/music/main/PropertiesLoader.java5
-rw-r--r--src/main/java/org/onap/music/rest/RestMusicLocksAPI.java4
5 files changed, 7 insertions, 34 deletions
diff --git a/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java b/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java
index 40f69e36..5af3661c 100644
--- a/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java
+++ b/src/main/java/org/onap/music/eelf/logging/format/AppMessages.java
@@ -55,10 +55,10 @@ public enum AppMessages {
* [ERR402E] Ill formed queryObject for the request
* [ERR403E] Error processing Prepared Query Object
*
- * 500-599 - Zookeepr/Locking Related
+ * 500-599 - Locking Related
* [ERR500E] Invalid lock
* [ERR501E] Locking Error has occured
- * [ERR502E] Zookeeper error has occured
+ * [ERR502E] Deprecated
* [ERR503E] Failed to aquire lock store handle
* [ERR504E] Failed to create Lock Reference
* [ERR505E] Lock does not exist
@@ -68,7 +68,7 @@ public enum AppMessages {
* [ERR509E] Lock not destroyed
* [ERR510E] Lock not released
* [ERR511E] Lock not deleted
- * [ERR512E] Failed to get ZK Lock Handle
+ * [ERR512E] Deprecated
*
*
* 600 - 699 - Music Service Errors
@@ -113,7 +113,6 @@ public enum AppMessages {
INVALIDLOCK("[ERR500E]"," Invalid lock or acquire failed",""," Lock is not valid to aquire"),
LOCKINGERROR("[ERR501E]"," Locking Error has occured",""," Locking Error has occured"),
- KEEPERERROR("[ERR502E]"," Zookeeper error has occured","","Please check zookeeper details"),
LOCKHANDLE("[ERR503E]","Failed to aquire lock store handle",""," Failed to aquire lock store handle"),
CREATELOCK("[ERR504E]","Failed to aquire lock store handle ","","Failed to aquire lock store handle "),
LOCKSTATE("[ERR508E]"," Lock state not set",""," Lock state not set"),
diff --git a/src/main/java/org/onap/music/lockingservice/cassandra/MusicLockState.java b/src/main/java/org/onap/music/lockingservice/cassandra/MusicLockState.java
index a8e5ac48..5128e2cd 100644
--- a/src/main/java/org/onap/music/lockingservice/cassandra/MusicLockState.java
+++ b/src/main/java/org/onap/music/lockingservice/cassandra/MusicLockState.java
@@ -35,7 +35,7 @@ import org.onap.music.eelf.logging.format.AppMessages;
import org.onap.music.eelf.logging.format.ErrorSeverity;
import org.onap.music.eelf.logging.format.ErrorTypes;
-// the state variable that will be stored in zookeeper, capturing the transitions of
+// the state variable that will be stored in the locking service, capturing the transitions of
public class MusicLockState implements Serializable {
public enum LockStatus {
UNLOCKED, BEING_LOCKED, LOCKED
diff --git a/src/main/java/org/onap/music/main/MusicUtil.java b/src/main/java/org/onap/music/main/MusicUtil.java
index aa82ea97..b737377d 100755
--- a/src/main/java/org/onap/music/main/MusicUtil.java
+++ b/src/main/java/org/onap/music/main/MusicUtil.java
@@ -118,7 +118,7 @@ public class MusicUtil {
private static String musicRestIp = LOCALHOST;
private static String musicPropertiesFilePath = PROPERTIES_FILE;
private static long defaultLockLeasePeriod = 6000;
- private static final String[] propKeys = new String[] { "zookeeper.host", "cassandra.host", "music.ip", "debug",
+ private static final String[] propKeys = new String[] { "cassandra.host", "music.ip", "debug",
"version", "music.rest.ip", "music.properties", "lock.lease.period", "id", "all.ids", "public.ip",
"all.pubic.ips", "cassandra.user", "cassandra.password", "aaf.endpoint.url","admin.username","admin.password","aaf.admin.url",
"music.namespace","admin.aaf.role","cassandra.port","lock.using"};
@@ -428,25 +428,6 @@ public class MusicUtil {
}
/**
- * Get MyZkHost - Zookeeper Hostname - Default = localhost property file
- * value - zookeeper.host
- *
- * @return
- */
- public static String getMyZkHost() {
- return myZkHost;
- }
-
- /**
- * Set MyZkHost - Zookeeper Hostname
- *
- * @param myZkHost
- */
- public static void setMyZkHost(String myZkHost) {
- MusicUtil.myZkHost = myZkHost;
- }
-
- /**
* Get MyCassHost - Cassandra Hostname - Default = localhost property file
* value - cassandra.host
*
@@ -734,8 +715,6 @@ public class MusicUtil {
}
// get the property value and return it
MusicUtil.setMyCassaHost(prop.getProperty("cassandra.host"));
- String zkHosts = prop.getProperty("zookeeper.host");
- MusicUtil.setMyZkHost(zkHosts);
MusicUtil.setCassName(prop.getProperty("cassandra.user"));
MusicUtil.setCassPwd(prop.getProperty("cassandra.password"));
MusicUtil.setCassandraPort(Integer.parseInt(prop.getProperty("cassandra.port")));
diff --git a/src/main/java/org/onap/music/main/PropertiesLoader.java b/src/main/java/org/onap/music/main/PropertiesLoader.java
index ee10db42..db04ff4b 100644
--- a/src/main/java/org/onap/music/main/PropertiesLoader.java
+++ b/src/main/java/org/onap/music/main/PropertiesLoader.java
@@ -37,9 +37,6 @@ import org.springframework.stereotype.Component;
@Component
public class PropertiesLoader implements InitializingBean {
- @Value("${zookeeper.host}")
- private String zookeeperHost;
-
@Value("${cassandra.host}")
public String cassandraHost;
@@ -168,8 +165,6 @@ public class PropertiesLoader implements InitializingBean {
logger.info("#### Cassandra Host: " + MusicUtil.getMyCassaHost());
if(myId != null && !myId.equals("${my.id}"))
MusicUtil.setMyId(Integer.parseInt(myId));
- if(zookeeperHost != null && !zookeeperHost.equals("${zookeeper.host}"))
- MusicUtil.setMyZkHost(zookeeperHost);
if(notifyInterval != null && !notifyInterval.equals("${notify.interval}"))
MusicUtil.setNotifyInterval(Integer.parseInt(notifyInterval));
if(notifyTimeout != null && !notifyTimeout.equals("${notify.timeout}"))
diff --git a/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java b/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java
index b3e3b4d5..943f4ca8 100644
--- a/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java
+++ b/src/main/java/org/onap/music/rest/RestMusicLocksAPI.java
@@ -70,7 +70,7 @@ public class RestMusicLocksAPI {
/**
* Puts the requesting process in the q for this lock. The corresponding
- * node will be created in zookeeper if it did not already exist
+ * node will be created if it did not already exist
*
* @param lockName
* @return
@@ -80,7 +80,7 @@ public class RestMusicLocksAPI {
@Path("/create/{lockname}")
@ApiOperation(value = "Create Lock",
notes = "Puts the requesting process in the q for this lock." +
- " The corresponding node will be created in zookeeper if it did not already exist." +
+ " The corresponding lock will be created if it did not already exist." +
" Lock Name is the \"key\" of the form keyspaceName.tableName.rowId",
response = Map.class)
@Produces(MediaType.APPLICATION_JSON)