summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java27
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java2
2 files changed, 13 insertions, 16 deletions
diff --git a/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java b/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
index a73d981..413590f 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java
@@ -51,26 +51,30 @@ public class MirrorMakerService extends BaseLoggingClass {
private static MrTopicConnection prov;
private static AafDecrypt decryptor;
+ private static String provUser;
+ private static String provUserPwd;
+ private static String defaultProducerPort;
+ private static String defaultConsumerPort;
+ private static String centralFqdn;
+
public MirrorMakerService() {
super();
-
decryptor = new AafDecrypt();
+ DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
+ provUser = p.getProperty("MM.ProvUserMechId");
+ provUserPwd = decryptor.decrypt(p.getProperty( "MM.ProvUserPwd", "notSet" ));
+ defaultProducerPort = p.getProperty( "MR.SourceReplicationPort", "9092");
+ defaultConsumerPort = p.getProperty( "MR.TargetReplicationPort", "2181");
+ centralFqdn = p.getProperty("MR.CentralCname", "notSet");
}
// will create a MM on MMagent if needed
// will update the MMagent whitelist with all topics for this MM
public MirrorMaker updateMirrorMaker( MirrorMaker mm ) {
logger.info( "updateMirrorMaker");
- DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
- String provUser = p.getProperty("MM.ProvUserMechId");
- String provUserPwd = decryptor.decrypt(p.getProperty( "MM.ProvUserPwd", "notSet" ));
- String defaultProducerPort = p.getProperty( "MM.KafkaProducerPort", "9092");
- String defaultConsumerPort = p.getProperty( "MM.KafkaConsumerPort", "2181");
prov = new MrTopicConnection( provUser, provUserPwd );
-
- String centralFqdn = p.getProperty("MR.CentralCname", "notSet");
-
+
DmaapService dmaap = new DmaapService();
MR_ClusterService clusters = new MR_ClusterService();
@@ -114,11 +118,6 @@ public class MirrorMakerService extends BaseLoggingClass {
return mirrors.get(key);
}
- /*public MirrorMaker updateMirrorMaker( MirrorMaker mm ) {
- logger.info( "updateMirrorMaker");
- return mirrors.put( mm.getMmName(), mm);
- }
- */
public void delMirrorMaker( MirrorMaker mm ) {
logger.info( "delMirrorMaker");
diff --git a/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java b/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java
index f494bed..e287acb 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java
@@ -36,12 +36,10 @@ public class DmaapTimestamp {
public DmaapTimestamp() {
stamp = cal.getTime();
- logger.info("constructor: set val to " + stamp);
}
public void mark() {
stamp = cal.getTime();
- logger.info("mark: set val to " + stamp);
}
public Date getVal() {