summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java10
-rw-r--r--src/main/java/com/att/nsa/cambria/backends/Consumer.java2
-rw-r--r--src/main/java/com/att/nsa/cambria/backends/kafka/KafkaConsumerCache.java6
-rw-r--r--src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java5
-rw-r--r--src/main/java/com/att/nsa/cambria/resources/streamReaders/CambriaRawStreamReader.java2
-rw-r--r--src/main/java/com/att/nsa/cambria/service/impl/TopicServiceImpl.java4
6 files changed, 18 insertions, 11 deletions
diff --git a/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java b/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java
index 2959f41..0ddaef5 100644
--- a/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java
+++ b/src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java
@@ -40,7 +40,7 @@ import com.att.eelf.configuration.EELFManager;
import com.att.nsa.cambria.constants.CambriaConstants;
import com.att.nsa.cambria.metrics.publisher.CambriaPublisher;
import com.att.nsa.cambria.metrics.publisher.DMaaPCambriaClientFactory;
-import com.att.nsa.drumlin.till.nv.rrNvReadable;
+
import com.att.nsa.metrics.CdmMetricsRegistry;
import com.att.nsa.metrics.impl.CdmConstant;
@@ -77,16 +77,16 @@ public class DMaaPMetricsSender implements Runnable {
boolean setEnable=true;
if (cambriaSetting!=null && cambriaSetting.equals("false") )
setEnable= false;
- //System.out.println(setEnable+"XXXXXXXXXXXXXXXX");
if (setEnable) {
String Setting_CambriaBaseUrl=com.att.ajsc.filemonitor.AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,kSetting_CambriaEnabled);
Setting_CambriaBaseUrl=Setting_CambriaBaseUrl==null?"localhost":Setting_CambriaBaseUrl;
String Setting_CambriaTopic=com.att.ajsc.filemonitor.AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,kSetting_CambriaTopic);
- if(Setting_CambriaTopic==null) Setting_CambriaTopic = "msgrtr.apinode.metrics.dmaap";
+ if(Setting_CambriaTopic==null) {
+ Setting_CambriaTopic = "msgrtr.apinode.metrics.dmaap";
+ }
- // Setting_CambriaBaseUrl=Setting_CambriaBaseUrl==null?defaultTopic:Setting_CambriaBaseUrl;
String Setting_CambriaSendFreqSecs=com.att.ajsc.filemonitor.AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,kSetting_CambriaSendFreqSecs);
@@ -179,7 +179,7 @@ public class DMaaPMetricsSender implements Runnable {
private final CambriaPublisher fCambria;
private final String fHostname;
- //private static final Logger log = LoggerFactory.getLogger(MetricsSender.class);
+
private static final EELFLogger log = EELFManager.getInstance().getLogger(MetricsSender.class);
/**
diff --git a/src/main/java/com/att/nsa/cambria/backends/Consumer.java b/src/main/java/com/att/nsa/cambria/backends/Consumer.java
index f1b43c2..d4946ba 100644
--- a/src/main/java/com/att/nsa/cambria/backends/Consumer.java
+++ b/src/main/java/com/att/nsa/cambria/backends/Consumer.java
@@ -75,7 +75,7 @@ public interface Consumer
* @param atOffset start with the next message at or after atOffset. -1 means next from last request
* @return the next message, or null if none are waiting
*/
-// Message nextMessage ( long atOffset );
+
/**
* Close/clean up this consumer
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 2a64989..9bd67d1 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
@@ -46,7 +46,7 @@ import org.apache.curator.utils.ZKPaths;
import org.apache.http.annotation.NotThreadSafe;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.KeeperException.NoNodeException;
-//import org.slf4j.Logger;
+
//import org.slf4j.LoggerFactory;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -239,7 +239,9 @@ public class KafkaConsumerCache {
//final long freq = fSettings.getLong(kSetting_SweepEverySeconds, kDefault_SweepEverySeconds);
long freq = kDefault_SweepEverySeconds;
String strkSetting_SweepEverySeconds = AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,kSetting_SweepEverySeconds);
- if(null==strkSetting_SweepEverySeconds) strkSetting_SweepEverySeconds = kDefault_SweepEverySeconds+"";
+ if(null==strkSetting_SweepEverySeconds) {
+ strkSetting_SweepEverySeconds = kDefault_SweepEverySeconds+"";
+ }
freq = Long.parseLong(strkSetting_SweepEverySeconds);
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 02ae109..63f1dd5 100644
--- a/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java
+++ b/src/main/java/com/att/nsa/cambria/beans/DMaaPKafkaConsumerFactory.java
@@ -111,7 +111,10 @@ public class DMaaPKafkaConsumerFactory implements ConsumerFactory {
// kSetting_EnableCache, kDefault_IsCacheEnabled);
boolean kSetting_EnableCache= kDefault_IsCacheEnabled;
String strkSetting_EnableCache = AJSCPropertiesMap.getProperty(CambriaConstants.msgRtr_prop,kSetting_EnableCache+"");
- if(null!=strkSetting_EnableCache)kSetting_EnableCache=Boolean.parseBoolean(strkSetting_EnableCache);
+ if(null!=strkSetting_EnableCache)
+ {
+ kSetting_EnableCache=Boolean.parseBoolean(strkSetting_EnableCache);
+ }
final boolean isCacheEnabled = kSetting_EnableCache;
diff --git a/src/main/java/com/att/nsa/cambria/resources/streamReaders/CambriaRawStreamReader.java b/src/main/java/com/att/nsa/cambria/resources/streamReaders/CambriaRawStreamReader.java
index 16f6785..d562360 100644
--- a/src/main/java/com/att/nsa/cambria/resources/streamReaders/CambriaRawStreamReader.java
+++ b/src/main/java/com/att/nsa/cambria/resources/streamReaders/CambriaRawStreamReader.java
@@ -130,7 +130,7 @@ public class CambriaRawStreamReader implements reader
}
catch ( IOException e )
{
- throw new CambriaApiException ( HttpServletResponse.SC_BAD_REQUEST, e.getMessage () );
+ throw new CambriaApiException ( HttpServletResponse.SC_BAD_REQUEST, e.toString());
}
}
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 7875b90..bfd005e 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
@@ -163,7 +163,9 @@ public class TopicServiceImpl implements TopicService {
if (null!=t.getOwners ())
o.put ( "owner", t.getOwners ().iterator ().next () );
if(null!=t.getReaderAcl ())
- o.put ( "readerAcl", aclToJson ( t.getReaderAcl () ) );
+ {
+ o.put ( "readerAcl", aclToJson ( t.getReaderAcl () ) );
+ }
if(null!=t.getWriterAcl ())
o.put ( "writerAcl", aclToJson ( t.getWriterAcl () ) );