diff options
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java | 9 | ||||
-rw-r--r-- | src/main/java/com/att/dmf/mr/metrics/publisher/CambriaPublisherUtility.java | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java b/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java index 9543828..735e372 100644 --- a/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java +++ b/src/main/java/com/att/dmf/mr/backends/kafka/KafkaPublisher.java @@ -42,10 +42,6 @@ import com.att.eelf.configuration.EELFManager; import com.att.nsa.drumlin.till.nv.rrNvReadable; -//import kafka.javaapi.producer.Producer; -//import kafka.producer.KeyedMessage; -//import kafka.producer.ProducerConfig; -//import kafka.producer.KeyedMessage; /** * Sends raw JSON objects into Kafka. @@ -77,8 +73,7 @@ public class KafkaPublisher implements Publisher { kafkaConnUrl="localhost:9092"; } - // props.put("bootstrap.servers", bootSever); - //System.setProperty("java.security.auth.login.config",jaaspath); + transferSetting( props, "bootstrap.servers",kafkaConnUrl); @@ -93,7 +88,7 @@ public class KafkaPublisher implements Publisher { props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); - //fProducer = new Producer<String, String>(fConfig); + fProducer = new KafkaProducer<>(props); } diff --git a/src/main/java/com/att/dmf/mr/metrics/publisher/CambriaPublisherUtility.java b/src/main/java/com/att/dmf/mr/metrics/publisher/CambriaPublisherUtility.java index 1510c32..46dfa99 100644 --- a/src/main/java/com/att/dmf/mr/metrics/publisher/CambriaPublisherUtility.java +++ b/src/main/java/com/att/dmf/mr/metrics/publisher/CambriaPublisherUtility.java @@ -95,7 +95,7 @@ public class CambriaPublisherUtility */ public static List<HttpHost> createHostsList(Collection<String> hosts) { - final ArrayList<HttpHost> convertedHosts = new ArrayList<HttpHost> (); + final ArrayList<HttpHost> convertedHosts = new ArrayList<>(); for ( String host : hosts ) { if ( host.length () == 0 ) continue; |