healchow commented on code in PR #7580:
URL: https://github.com/apache/inlong/pull/7580#discussion_r1161170773
##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcMultiBatchingOutputFormat.java:
##########
@@ -392,6 +456,58 @@ public final synchronized void writeRecord(In row) throws
IOException {
}
}
+ private void fillDirtyData(JdbcExec exec, String tableIdentifier) {
+ String[] identifiers = tableIdentifier.split("\\.");
+ String database;
+ String table;
+ String schema = null;
+ if (identifiers.length == 2) {
+ database = identifiers[0];
+ table = identifiers[1];
+ } else {
+ database = identifiers[0];
+ schema = identifiers[1];
+ table = identifiers[2];
+ }
+ TableMetricStatementExecutor executor = null;
+ try {
+ Field subExecutor;
+ if (exec instanceof TableMetricStatementExecutor) {
+ executor = (TableMetricStatementExecutor) exec;
+ } else if (exec instanceof TableBufferReducedStatementExecutor) {
+ subExecutor =
TableBufferReducedStatementExecutor.class.getDeclaredField("upsertExecutor");
+ subExecutor.setAccessible(true);
+ executor = (TableMetricStatementExecutor)
subExecutor.get(exec);
+ } else if (exec instanceof TableBufferedStatementExecutor) {
+ subExecutor =
TableBufferedStatementExecutor.class.getDeclaredField("statementExecutor");
+ subExecutor.setAccessible(true);
+ executor = (TableMetricStatementExecutor)
subExecutor.get(exec);
+ }
+ } catch (Exception e) {
+ LOG.error("parse executor failed" + e);
Review Comment:
```suggestion
LOG.error("parse executor failed: ", e);
```
--
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]