aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/music/main/MusicCore.java
diff options
context:
space:
mode:
authorNelson, Thomas (tn1381) <tn1381@att.com>2018-08-20 04:45:13 +0000
committerNelson, Thomas (tn1381) <tn1381@att.com>2018-08-20 04:45:13 +0000
commit0d2f003049e562354fda88729dbab70f46daa25f (patch)
tree886cceb97a030a13d6d5fe586cb80dca377443cf /src/main/java/org/onap/music/main/MusicCore.java
parent1dbff4199663796788e5658c0eec33b2faade59d (diff)
Update swagger.json and other updates.
Change-Id: I84753300e64ba82072e65ef1bde2cb76771ee046 Issue-ID: MUSIC-97 Signed-off-by: Nelson, Thomas (tn1381) <tn1381@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/main/MusicCore.java')
-rw-r--r--src/main/java/org/onap/music/main/MusicCore.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/onap/music/main/MusicCore.java b/src/main/java/org/onap/music/main/MusicCore.java
index dfc93ccc..b729ba74 100644
--- a/src/main/java/org/onap/music/main/MusicCore.java
+++ b/src/main/java/org/onap/music/main/MusicCore.java
@@ -708,6 +708,22 @@ public class MusicCore {
}
return results;
}
+
+ public static String getMyHostId() {
+ PreparedQueryObject pQuery = new PreparedQueryObject();
+ pQuery.appendQueryString("SELECT HOST_ID FROM SYSTEM.LOCAL");
+ ResultSet rs = null;
+ try {
+ rs = getDSHandle().executeEventualGet(pQuery);
+ Row row = rs.one();
+ return (row == null) ? "UNKNOWN" : row.getUUID("HOST_ID").toString();
+ } catch (Exception e) {
+ e.printStackTrace();
+ logger.error(EELFLoggerDelegate.errorLogger,e.getMessage());
+ }
+ logger.error(EELFLoggerDelegate.errorLogger, "Some issue during MusicCore.getMyHostId");
+ return "UNKNOW";
+ }
/**
* This method performs DDL operations on cassandra, if the the resource is available. Lock ID