Merge changes from topics 'cghosh-4jan-sonarfix', 'cghosh-4jan-sonar-fix'
authorRam Koya <rk541m@att.com>
Wed, 16 Jan 2019 22:31:05 +0000 (22:31 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 16 Jan 2019 22:31:05 +0000 (22:31 +0000)
* changes:
  Added logger for exception block
  Added logger for exception log

pom.xml
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/MirrorMakerAgent.java
src/main/java/org/onap/dmaap/mr/dmaapMMAgent/utils/MirrorMakerProcessHandler.java
src/test/resources/etc/mmagent.config
version.properties

diff --git a/pom.xml b/pom.xml
index 878ccd2..f840099 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
 
        <groupId>org.onap.dmaap.messagerouter.mirroragent</groupId>
        <artifactId>dmaapMMAgent</artifactId>
-       <version>1.1.0-SNAPSHOT</version>
+       <version>1.1.1-SNAPSHOT</version>
        <packaging>jar</packaging>
 
        <parent>
                                        <descriptorRefs>
                                                <descriptorRef>jar-with-dependencies</descriptorRef>
                                        </descriptorRefs>
+                                       <appendAssemblyId>false</appendAssemblyId>
                                        <archive>
-
                                                <manifest>
                                                        <addClasspath>true</addClasspath>
-                                                       <mainClass>org.onap.dmaap.mr.MirrorMakerAgent</mainClass>
+                                                       <mainClass>org.onap.dmaap.mr.dmaapMMAgent.MirrorMakerAgent</mainClass>
                                                </manifest>
                                        </archive>
                                </configuration>
index 23fd99f..304a067 100644 (file)
@@ -56,7 +56,7 @@ public class MirrorMakerAgent {
        static final Logger logger = Logger.getLogger(MirrorMakerAgent.class);
        Properties mirrorMakerProperties = new Properties();
        ListMirrorMaker mirrorMakers = null;
-       String mmagenthome = "";
+       String mmagenthome = "/opt";
        String kafkahome = "";
        String topicURL = "";
        String topicname = "";
@@ -100,7 +100,7 @@ public class MirrorMakerAgent {
        private boolean checkStartup() {
                FileInputStream input = null;
                try {
-                       this.mmagenthome = System.getProperty("MMAGENTHOME");
+                       //this.mmagenthome = System.getProperty("MMAGENTHOME");
                        input = new FileInputStream(mmagenthome + "/etc/mmagent.config");
                        logger.info("mmagenthome is set :" + mmagenthome + " loading properties at /etc/mmagent.config");
                } catch (IOException ex) {
index 5246ce9..9fe80db 100644 (file)
@@ -55,7 +55,7 @@ public class MirrorMakerProcessHandler {
                        BufferedReader br = new BufferedReader(isr);
                         
                        while ((line = br.readLine()) != null) {
-                               System.out.println(line);
+                               logger.info(line);
                //              if (line.contains("agentname=" + agentname) && line.contains("/bin/sh -c") == false) {
                                        
                                        //If enablelogCheck Check MirrorMaker log for errors and restart mirrormaker
index 1d978c1..0270a86 100644 (file)
@@ -1,7 +1,5 @@
-#kafkahome=C:/dev/att/kafka_2.10-0.8.2.1
-kafkahome=/opt/
-topicURL=http://172.18.0.1:3904
-#topicname=com.att.agenttest
-topicname=org.openecomp.dmaapBC.mmatopic
-mechid=dgl@openecomp.org
-password=ecomp_admin
\ No newline at end of file
+kafkahome=/opt/kafka
+topicURL=http://message-router:3904
+topicname=org.onap.dmaap.mr.mmagent
+mechid=demo@people.osaaf.org
+password=YKCAVhSQ+nedsh1Nry57l19jJQSnk8gs
\ No newline at end of file
index d6e413c..e1118ab 100644 (file)
@@ -27,7 +27,7 @@
 
 major=1
 minor=1
-patch=0
+patch=1
 
 base_version=${major}.${minor}.${patch}