Skip to content

Commit

Permalink
Fixed failing spotless check
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Kondaka <[email protected]>
  • Loading branch information
Krishna Kondaka committed Jan 19, 2024
1 parent 43b5798 commit d9ad97a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ public KafkaCustomProducer(final KafkaProducer producer,
this.bufferedEventHandles = new LinkedList<>();
this.expressionEvaluator = expressionEvaluator;
this.tagTargetKey = tagTargetKey;
System.out.println("______________"+kafkaProducerConfig.getTopic());
this.topicName = ObjectUtils.isEmpty(kafkaProducerConfig.getTopic()) ? null : kafkaProducerConfig.getTopic().getName();
System.out.println("2______________"+topicName);
this.serdeFormat = ObjectUtils.isEmpty(kafkaProducerConfig.getSerdeFormat()) ? null : kafkaProducerConfig.getSerdeFormat();
this.schemaService = schemaService;
this.topicMetrics = topicMetrics;
Expand All @@ -102,7 +100,6 @@ KafkaTopicProducerMetrics getTopicMetrics() {

public void produceRawData(final byte[] bytes, final String key) throws Exception{
try {
System.out.println("+++++++++++"+topicName+"...."+key+"...."+bytes);
send(topicName, key, bytes).get();
topicMetrics.update(producer);
} catch (Exception e) {
Expand Down Expand Up @@ -172,12 +169,10 @@ private void publishAvroMessage(final Record<Event> record, final String key) th
}

Future send(final String topicName, String key, final Object record) throws Exception {
System.out.println("0---------"+topicName+"---------"+key+"-----"+record);
if (Objects.isNull(key)) {
return producer.send(new ProducerRecord(topicName, record), callBack(record));
}

System.out.println("1---------"+topicName+"---------"+key+"-----"+record);
return producer.send(new ProducerRecord(topicName, key, record), callBack(record));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.opensearch.dataprepper.plugins.kafka.service.SchemaService;
import org.opensearch.dataprepper.plugins.kafka.service.TopicService;
import org.opensearch.dataprepper.plugins.kafka.util.RestUtils;
import org.opensearch.dataprepper.plugins.kafka.sink.DLQSink;
//import org.opensearch.dataprepper.plugins.kafka.sink.DLQSink;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down

0 comments on commit d9ad97a

Please sign in to comment.