FlechazoW commented on code in PR #3906:
URL:
https://github.com/apache/incubator-seatunnel/pull/3906#discussion_r1065564394
##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/sink/writer/AbstractWriteStrategy.java:
##########
@@ -328,6 +329,24 @@ public String getTargetLocation(@NonNull String
seaTunnelFilePath) {
return tmpPath.replaceAll(BaseSinkConfig.NON_PARTITION +
Matcher.quoteReplacement(File.separator), "");
}
+ /**
+ * Delete temporary files not caused by checkpoint.
+ * @param tmpFilePaths temporary files.
+ * @return void
+ */
+ public void deleteTmpFileWithNoCheckPoint(Set<String> tmpFilePaths){
+ try {
+ if (tmpFilePaths != null && tmpFilePaths.size() > 0) {
+ for (String filePath : tmpFilePaths){
+ fileSystemUtils.deleteFile(filePath);
+ log.info("delete no commit file:{}", filePath);
Review Comment:
What's the meaning of 'no commit file'? Why not use the 'temporary file ' or
'uncommitted file'?
--
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]