diff options
author | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2019-01-10 10:56:12 +0530 |
---|---|---|
committer | Surendra Reddy Katam <SK00524980@techmahindra.com> | 2019-01-10 11:07:08 +0530 |
commit | 203a6de85ecb784531747612bc61fe30f6bfe351 (patch) | |
tree | 730cbf00bc176056465b6c05525a9eeaf8dfd177 /src/main/java/org | |
parent | e157241cb7dfe023f57532f829e381644bdf18be (diff) |
Sonar majior issues
This block of commented-out lines of code should be removed
Sonar Link:
https://sonar.onap.org/project/issues?assignees=surendraReddy&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AWYBFCTAligbnTmNJUX3&resolved=false&severities=MAJOR
Location:
src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java
Line No-L640 L653 L684 L701 L730 L859
Change-Id: I7369cfb186a2c906359d53b7c92b035039952280
Issue-ID: DMAAP-956
Signed-off-by: Surendra Reddy Katam <SK00524980@techmahindra.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java b/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java index 387b667..2f436ec 100644 --- a/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java +++ b/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java @@ -637,7 +637,7 @@ public class EventsServiceImpl implements EventsService { // final KeyedMessage<String, String> data = new // KeyedMessage<String, String>(topic, m.getKey(), - // kms.add(data); + final ProducerRecord<String, String> data = new ProducerRecord<String, String>(topic, m.getKey(), m.getMessage()); @@ -650,7 +650,7 @@ public class EventsServiceImpl implements EventsService { + batchId + "]"); try { // ctx.getConfigReader().getfPublisher().sendBatchMessage(topic, - // kms); + ctx.getConfigReader().getfPublisher().sendBatchMessageNew(topic, pms); // transactionLogs(batch); for (message msg : batch) { @@ -681,7 +681,7 @@ public class EventsServiceImpl implements EventsService { metricsSet.publishTick(sizeNow); publishBatchCount = sizeNow; count += sizeNow; - // batchId++; + String endTime = sdf.format(new Date()); LOG.info("Batch End Details:[serverIp=" + ctx.getRequest().getLocalAddr() + ",Batch End Id=" + batchId + ",Batch Total=" + publishBatchCount + ",Batch Start Time=" + startTime @@ -698,9 +698,9 @@ public class EventsServiceImpl implements EventsService { + batchId + "]"); try { // ctx.getConfigReader().getfPublisher().sendBatchMessage(topic, - // kms); + ctx.getConfigReader().getfPublisher().sendBatchMessageNew(topic, pms); - // transactionLogs(batch); + for (message msg : batch) { LogDetails logDetails = msg.getLogDetails(); LOG.info("Publisher Log Details : " + logDetails.getPublisherLogDetails()); @@ -727,7 +727,7 @@ public class EventsServiceImpl implements EventsService { pms.clear(); metricsSet.publishTick(sizeNow); count += sizeNow; - // batchId++; + String endTime = sdf.format(new Date()); publishBatchCount = sizeNow; LOG.info("Batch End Details:[serverIp=" + ctx.getRequest().getLocalAddr() + ",Batch End Id=" + batchId @@ -855,12 +855,12 @@ public class EventsServiceImpl implements EventsService { return logDetails; } - /* - * public String getMetricsTopic() { return metricsTopic; } - * - * public void setMetricsTopic(String metricsTopic) { this.metricsTopic = - * metricsTopic; } - */ + + + + + + |