Merge changes I61fe5ce8,I89758685,I6b215d2a
authorRam Koya <rk541m@att.com>
Thu, 20 Sep 2018 15:25:47 +0000 (15:25 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 20 Sep 2018 15:25:47 +0000 (15:25 +0000)
* changes:
  Sonar Major issues
  Sonar Major issues
  Sonar Major issues

src/main/java/com/att/dmf/mr/resources/CambriaOutboundEventStream.java
src/main/java/com/att/dmf/mr/service/impl/EventsServiceImpl.java

index 837c956..86a6ef8 100644 (file)
@@ -479,10 +479,10 @@ public class CambriaOutboundEventStream implements StreamWriter {
         * 
         * Checks whether filter is initialized
         */
-       /*private boolean isFilterInitialized() {
-               return (fHpAlarmFilter != null && fHppe != null);
-       }
-*/
+       
+               
+       
+
        /**
         * 
         * @param msg
@@ -490,18 +490,18 @@ public class CambriaOutboundEventStream implements StreamWriter {
         */
        private boolean filterMatches(String msg) {
                boolean result = true;
-               /*if (isFilterInitialized()) {
-                       try {
-                               final HpJsonEvent e = new HpJsonEvent("e", new JSONObject(msg));
-                               result = fHpAlarmFilter.matches(fHppe, e);
-                       } catch (JSONException x) {
-                               // the msg may not be JSON
-                               result = false;
-                               log.error("Failed due to " + x.getMessage());
-                       } catch (Exception x) {
-                               log.error("Error using filter: " + x.getMessage(), x);
-                       }
-               }*/
+               
+               
+                               
+                               
+                       
+                       
+                       
+                               
+                       
+                               
+               
+       
 
                return result;
        }
@@ -534,11 +534,11 @@ public class CambriaOutboundEventStream implements StreamWriter {
        private final Consumer fConsumer;
        private final int fLimit;
        private final int fTimeoutMs;
-       // private final rrNvReadable fSettings;
+       
        private final boolean fPretty;
        private final boolean fWithMeta;
        private int fSent;
-//     private final HpAlarmFilter<HpJsonEvent> fHpAlarmFilter;
+
        //private final HpProcessingEngine<HpJsonEvent> fHppe;
        private DMaaPContext dmaapContext;
        private String responseTransactionId;
@@ -548,7 +548,7 @@ public class CambriaOutboundEventStream implements StreamWriter {
        private ArrayList<Consumer> fKafkaConsumerList;
        private boolean istransType = true;
        // private static final Logger log =
-       // Logger.getLogger(CambriaOutboundEventStream.class);
+       
 
        private static final EELFLogger log = EELFManager.getInstance().getLogger(CambriaOutboundEventStream.class);
 }
\ No newline at end of file
index 22b60fe..88c5fd9 100644 (file)
@@ -376,7 +376,7 @@ public class EventsServiceImpl implements EventsService {
                String topicNameStd = null;
 
                // topicNameStd=
-               // ctx.getConfigReader().getSettings().getString("enforced.topic.name.AAF");
+               
                topicNameStd = com.att.ajsc.beans.PropertiesMapBean.getProperty(CambriaConstants.msgRtr_prop,
                                "enforced.topic.name.AAF");
                String metricTopicname = com.att.ajsc.filemonitor.AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,
@@ -404,7 +404,7 @@ public class EventsServiceImpl implements EventsService {
                if (topicNameEnforced || (user == null && null != ctx.getRequest().getHeader("Authorization")
                                && !topic.equalsIgnoreCase(metricTopicname))) {
                        // the topic name will be sent by the client
-                       // String permission = "com.att.dmaap.mr.topic"+"|"+topic+"|"+"pub";
+               
                        DMaaPAAFAuthenticator aaf = new DMaaPAAFAuthenticatorImpl();
                        String permission = aaf.aafPermissionString(topic, "pub");
                        if (!aaf.aafAuthentication(ctx.getRequest(), permission)) {
@@ -486,7 +486,7 @@ public class EventsServiceImpl implements EventsService {
                if (null != batchlen)
                        maxEventBatch = Long.parseLong(batchlen);
                // long maxEventBatch =
-               // ctx.getConfigReader().getSettings().getLong(BATCH_LENGTH, 1024 * 16);
+               
                final LinkedList<Publisher.message> batch = new LinkedList<>();
                // final ArrayList<KeyedMessage<String, String>> kms = new
                // ArrayList<KeyedMessage<String, String>>();