JingsongLi commented on a change in pull request #12485:
URL: https://github.com/apache/flink/pull/12485#discussion_r436445157
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/filesystem/PartitionLoader.java
##########
@@ -113,12 +113,7 @@ private void renameFiles(List<Path> srcDirs, Path destDir)
throws Exception {
for (FileStatus srcFile : srcFiles) {
Path srcPath =
srcFile.getPath();
Path destPath = new
Path(destDir, srcPath.getName());
- int count = 1;
- while (!fs.rename(srcPath,
destPath)) {
- String name =
srcPath.getName() + "_copy_" + count;
- destPath = new
Path(destDir, name);
- count++;
- }
+ fs.rename(srcPath, destPath);
Review comment:
The comment is out of date, the overwrite is occurred in
`overwrite(Path)` method instead of here.
Now it is consistent with `HadoopRecoverableFsDataOutputStream.commit`.
I will update comments.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]