You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/08/23 04:04:11 UTC

[GitHub] [inlong] gong commented on a diff in pull request #5638: [INLONG-5637][Sort] Fix kafka load node npe error

gong commented on code in PR #5638:
URL: https://github.com/apache/inlong/pull/5638#discussion_r952129197


##########
inlong-sort/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/FlinkKafkaProducer.java:
##########
@@ -928,19 +928,15 @@ public void onCompletion(RecordMetadata metadata, Exception exception) {
     }
 
     private void sendOutMetrics(Long rowSize, Long dataSize) {
-        if (metricData.getNumRecordsOut() != null) {
+        if (metricData != null) {
             metricData.getNumRecordsOut().inc(rowSize);
-        }
-        if (metricData.getNumBytesOut() != null) {
             metricData.getNumBytesOut().inc(dataSize);
         }
     }
 
     private void sendDirtyMetrics(Long rowSize, Long dataSize) {
         if (metricData.getDirtyRecords() != null) {

Review Comment:
   same NPE problem



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org