diff options
author | dglFromAtt <dgl@research.att.com> | 2018-05-30 15:49:32 -0400 |
---|---|---|
committer | dglFromAtt <dgl@research.att.com> | 2018-05-30 15:49:57 -0400 |
commit | 955500a4aa5c86a1ccc8c4bdf81c65daff41070a (patch) | |
tree | 18232d8b9a42cc2d07e9c0d066db66ddb73ac130 /src/main | |
parent | ad29261e05ff057134d48b7d6a99da1cd07849e0 (diff) |
Handling of MirrorMaker properties2.0.0-ONAPbeijing2.0.0-ONAP
Change-Id: Ibc139100f5cfd018d77bc6fcfdbcb7d4b69bef23
Signed-off-by: dglFromAtt <dgl@research.att.com>
Issue-ID: DMAAP-506
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/service/MirrorMakerService.java | 27 | ||||
-rw-r--r-- | src/main/java/org/onap/dmaap/dbcapi/util/DmaapTimestamp.java | 2 |
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() { |