healchow commented on code in PR #7078:
URL: https://github.com/apache/inlong/pull/7078#discussion_r1058737166


##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcMultiBatchingOutputFormat.java:
##########
@@ -532,6 +515,20 @@ protected void attemptFlush() throws IOException {
         }
     }
 
+    /**
+     * Output metrics with estimate for pg or other type jdbc connectors.
+     */
+    private void outputMetrics(String tableIdentifier, Long rowSize, Long 
dataSize) {
+        String[] fieldArray = tableIdentifier.split("\\.");
+        if (fieldArray.length == 3) {
+            sinkMetricData.outputMetricsWithEstimate(fieldArray[0], 
fieldArray[1], fieldArray[2],
+                    false, rowSize, dataSize);
+        } else if (fieldArray.length == 2) {
+            sinkMetricData.outputMetricsWithEstimate(fieldArray[0], null, 
fieldArray[1],
+                    false, rowSize, dataSize);
+        }

Review Comment:
   I didn't understand where the log was printed? If the length of the table 
name string after splitting is not as expected, printing the log is very 
helpful for locating the 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-unsubscr...@inlong.apache.org

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

Reply via email to