summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorSumapriya Sarvepalli <ss00493505@techmahindra.com>2018-09-10 15:52:55 +0530
committerSumapriya Sarvepalli <ss00493505@techmahindra.com>2018-09-10 15:52:55 +0530
commit3ed650dd1999dfcf7a63e42a0feab67c069939e3 (patch)
tree638b24bfe3d83c75e8ff700179efd226dcc3814e /src/main
parente2d27fba681dd20a20099b1f246d0fcc20de9270 (diff)
Sonar major issues
This block of commented-out lines of code should be removed Sonar Link: https://sonar.onap.org/project/issues?assignees=sumapriya&id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr&open=AWU41WhfwGn37JfbyHvc&resolved=false&severities=MAJOR Location: src/main/java/com/att/dmf/mr/beans/DMaaPCambriaLimiter.java Line No:L172 L310 Change-Id: I36a6c4eed0eede46b8198a4d1f988a53f1737184 Issue-ID: DMAAP-762 Signed-off-by: Sumapriya Sarvepalli <ss00493505@techmahindra.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/att/dmf/mr/beans/DMaaPCambriaLimiter.java40
1 files changed, 1 insertions, 39 deletions
diff --git a/src/main/java/com/att/dmf/mr/beans/DMaaPCambriaLimiter.java b/src/main/java/com/att/dmf/mr/beans/DMaaPCambriaLimiter.java
index 8315632..8cbf64f 100644
--- a/src/main/java/com/att/dmf/mr/beans/DMaaPCambriaLimiter.java
+++ b/src/main/java/com/att/dmf/mr/beans/DMaaPCambriaLimiter.java
@@ -169,37 +169,7 @@ public class DMaaPCambriaLimiter {
log.info(errRes.toString());
throw new CambriaApiException(errRes);
}
- /*if (fMaxPollsPerMinute <= 0) {
- return;
- }
- final RateInfoCheck ric = getRateInfoCheck(topic, consumerGroup, clientId);
- final double ratevalue = ric.onCall();
- if (ratevalue > fMaxPollsPerMinute) {
- try {
- log.warn(ri.getLabel() + ": " + rate + " empty replies/minute, limit is " + fMaxEmptyPollsPerMinute
- + ".");
- if (fSleepMs1 > fMaxPollsPerMinute) {
- log.warn(ri.getLabel() + ": " + "Slowing response with " + fSleepMs
- + " ms sleep, then responding in error.");
- Thread.sleep(fSleepMs1);
- ric.reset();
- } else {
- log.info(ri.getLabel() + ": " + "No sleep configured, just throwing error.");
- }
- } catch (InterruptedException e) {
- // ignore
- }
-
-
- ErrorResponse errRes = new ErrorResponse(HttpStatusCodes.k429_tooManyRequests,
- DMaaPResponseCode.TOO_MANY_REQUESTS.getResponseCode(),
- "This client is making too many requests "
- + ",decrease the number of requests. ","",Utils.getFormattedDate(new Date()),topic,"","",consumerGroup+"/"+clientId,remoteHost);
-
- log.info(errRes.toString());
- throw new CambriaApiException(errRes);
- }*/
}
@@ -307,15 +277,7 @@ public class DMaaPCambriaLimiter {
}
- /* private RateInfoCheck getRateInfoCheck(String topic, String consumerGroup, String clientId) {
- final String key = makeKey(topic, consumerGroup, clientId);
- RateInfoCheck ri = fRateInfoCheck.get(key);
- if (ri == null) {
- ri = new RateInfoCheck(key, 1);
- fRateInfoCheck.put(key, ri);
- }
- return ri;
- } */
+