Hisoka-X commented on code in PR #7891:
URL: https://github.com/apache/seatunnel/pull/7891#discussion_r2099483078
##########
seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/commit/HiveSinkAggregatedCommitter.java:
##########
@@ -51,11 +54,21 @@ public HiveSinkAggregatedCommitter(
this.tableName = tableName;
this.abortDropPartitionMetadata =
readonlyConfig.get(HiveSinkOptions.ABORT_DROP_PARTITION_METADATA);
+ this.overwrite = readonlyConfig.get(HiveSinkOptions.OVERWRITE);
}
@Override
public List<FileAggregatedCommitInfo> commit(
List<FileAggregatedCommitInfo> aggregatedCommitInfos) throws
IOException {
+ log.info("Aggregated commit infos size: {}",
aggregatedCommitInfos.size());
+ for (FileAggregatedCommitInfo info : aggregatedCommitInfos) {
+ log.info("Commit info: {}", info);
+ }
+ log.info("overwrite: {}", overwrite);
+ // delete if overwrite
+ if (overwrite) {
+ deleteDirectories(aggregatedCommitInfos);
+ }
Review Comment:
```suggestion
log.info("Aggregated commit infos: {}", aggregatedCommitInfos);
if (overwrite) {
log.info("start delete directories in aggregatedCommitInfos
because overwrite is enabled.");
deleteDirectories(aggregatedCommitInfos);
}
```
--
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]