diff options
Diffstat (limited to 'src')
6 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumerCache.java b/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumerCache.java index 178d143..627a433 100644 --- a/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumerCache.java +++ b/src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumerCache.java @@ -268,6 +268,7 @@ public class KafkaConsumerCache { } catch (InterruptedException e) { // Ignore log.error("error while setting curator framework :" + e.getMessage()); + Thread.currentThread().interrupt(); } } @@ -402,7 +403,7 @@ public class KafkaConsumerCache { } catch (NoNodeException e) { log.error("Exception at : " + e); } catch (Exception e) { - log.debug("Unexpected exception while deleting consumer: " + e.getMessage()); + log.error("Unexpected exception while deleting consumer: " + e); } log.info("Dropped " + key + " consumer due to timeout"); diff --git a/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java b/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java index 59dc9bf..02ae109 100644 --- a/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java +++ b/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java @@ -187,7 +187,7 @@ public class DMaaPKafkaConsumerFactory implements ConsumerFactory { " String consumerId, int timeoutMs) : " + x); throw new UnavailableException("Couldn't connect to ZK."); } catch (KafkaConsumerCacheException e) { - log.warn("Failed to cache consumer (this may have performance implications): " + log.error("Failed to cache consumer (this may have performance implications): " + e.getMessage()); } catch (Exception e) { throw new UnavailableException( diff --git a/src/main/java/com/att/nsa/cambria/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java b/src/main/java/com/att/nsa/cambria/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java index 052cc78..d7e6816 100644 --- a/src/main/java/com/att/nsa/cambria/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java +++ b/src/main/java/com/att/nsa/cambria/metrics/publisher/impl/DMaaPCambriaSimplerBatchPublisher.java @@ -190,7 +190,8 @@ public class DMaaPCambriaSimplerBatchPublisher extends CambriaBaseClient + "Consider using CambriaBatchingPublisher.close( long timeout, TimeUnit timeoutUnits ) to recapture unsent messages on close."); } } catch (InterruptedException e) { - getLog().warn("Possible message loss. " + e.getMessage(), e); + getLog().info(" Interruption Exception is caught here : " + e.getMessage()); + Thread.currentThread().interrupt(); } catch (IOException e) { getLog().warn("Possible message loss. " + e.getMessage(), e); } diff --git a/src/main/java/com/att/nsa/cambria/security/DMaaPAAFAuthenticatorImpl.java b/src/main/java/com/att/nsa/cambria/security/DMaaPAAFAuthenticatorImpl.java index 97ca1fd..6f4d9c9 100644 --- a/src/main/java/com/att/nsa/cambria/security/DMaaPAAFAuthenticatorImpl.java +++ b/src/main/java/com/att/nsa/cambria/security/DMaaPAAFAuthenticatorImpl.java @@ -62,7 +62,7 @@ public class DMaaPAAFAuthenticatorImpl implements DMaaPAAFAuthenticator { String permission = ""; String nameSpace =""; - if(topicName.contains(".") && (topicName.contains("com.att")||topicName.contains("org"))) { + if(topicName.contains(".") && (topicName.contains("com.onap")||topicName.contains("org"))) { //String topic = topicName.substring(topicName.lastIndexOf(".")+1); nameSpace = topicName.substring(0,topicName.lastIndexOf(".")); } @@ -70,7 +70,7 @@ public class DMaaPAAFAuthenticatorImpl implements DMaaPAAFAuthenticator { nameSpace = null; nameSpace= com.att.ajsc.filemonitor.AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,"defaultNSforUEB"); - if(null==nameSpace)nameSpace="com.att.dmaap.mr.ueb"; + if(null==nameSpace)nameSpace="com.onap.dmaap.mr.ueb"; /*ErrorResponse errRes = new ErrorResponse(HttpStatus.SC_FORBIDDEN, diff --git a/src/main/java/com/att/nsa/cambria/service/impl/EventsServiceImpl.java b/src/main/java/com/att/nsa/cambria/service/impl/EventsServiceImpl.java index e99def5..bb2effd 100644 --- a/src/main/java/com/att/nsa/cambria/service/impl/EventsServiceImpl.java +++ b/src/main/java/com/att/nsa/cambria/service/impl/EventsServiceImpl.java @@ -436,7 +436,7 @@ public class EventsServiceImpl implements EventsService { final long startMs = System.currentTimeMillis(); long count = 0; - long maxEventBatch=1024 * 16; + long maxEventBatch=(long)1024 * 16; String batchlen = AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,BATCH_LENGTH); if(null!=batchlen)maxEventBatch=Long.parseLong(batchlen); @@ -535,7 +535,7 @@ public class EventsServiceImpl implements EventsService { // start processing, building a batch to push to the backend final long startMs = System.currentTimeMillis(); long count = 0; - long maxEventBatch = 1024 * 16; + long maxEventBatch = (long)1024 * 16; String evenlen = AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,BATCH_LENGTH); if(null!=evenlen)maxEventBatch=Long.parseLong(evenlen); //final long maxEventBatch = ctx.getConfigReader().getSettings().getLong(BATCH_LENGTH, 1024 * 16); diff --git a/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java b/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java index a9c1882..f539199 100644 --- a/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java +++ b/src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java @@ -224,8 +224,7 @@ public class TopicServiceImpl implements TopicService { throw new DMaaPAccessDeniedException(errRes); }*/ - if (user == null && (null!=dmaapContext.getRequest().getHeader("Authorization") || - null != dmaapContext.getRequest().getHeader("cookie"))) { + if (user == null && (null!=dmaapContext.getRequest().getHeader("Authorization"))) { //if (user == null && (null!=dmaapContext.getRequest().getHeader("Authorization") || null != dmaapContext.getRequest().getHeader("cookie"))) { // ACL authentication is not provided so we will use the aaf authentication LOGGER.info("Authorization the topic"); |