gong commented on code in PR #6750:
URL: https://github.com/apache/inlong/pull/6750#discussion_r1050461048
##########
inlong-sort/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/FlinkKafkaProducer.java:
##########
@@ -860,17 +860,15 @@ public void open(Configuration configuration) throws
Exception {
@Override
public void onCompletion(RecordMetadata metadata,
Exception e) {
- if (e != null) {
-
sinkMetricData.sendDirtyMetrics(metadata.topic(), 1L, dataSize);
- LOG.error(
- "Error while sending record to Kafka:
" + e.getMessage(),
- e);
- } else {
-
sinkMetricData.sendOutMetrics(metadata.topic(), 1L, dataSize);
- sendOutMetrics(1L, dataSize);
- pendingRecords.incrementAndGet();
+ if (metadata.topic() != null) {
+ if (e != null) {
Review Comment:
judge metadata is null
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]