Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
gp1314 committed Sep 10, 2024
1 parent df9a1d5 commit 7ed9f25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ private boolean renameDirectoryInternal(String src, String dst, DeleteBuffer del
buffer.add(new Pair<>(childSrcPath, childDstPath));
}
}
// The files are arranged in the order of the parent directories to avoid the failure of deleting the directories first.
// The files are arranged in the order of the parent directories
// to avoid the failure of deleting the directories first.
deleteBuffer.add(srcKey);
// Get result of parallel file renames
int filesRenamed = buffer.getResult().size();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ public SerializableVoid runTask(PersistConfig config, SerializableVoid args,
LOG.warn("Failed run persiste task of {}, case {}", ufsPath, e.getMessage());
throw e;
} finally {
if(!isTaskSuccess) {
if (!isTaskSuccess) {
LOG.warn("The created directory needs to be rolled back and deleted, directory size {}.",
successMkdirsList.size());
ufs.deleteExistingFile(ufsPath);
Collections.reverse(successMkdirsList);
for (String path : successMkdirsList) {
if(!ufs.deleteDirectory(path)) {
if (!ufs.deleteDirectory(path)) {
LOG.warn("Failed delete ufs path {}", path);
}
}
Expand Down

0 comments on commit 7ed9f25

Please sign in to comment.