diff --git a/interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/store/external/ExternalStorage.java b/interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/store/external/ExternalStorage.java index 8d98f7ca7b58..935e1b239231 100644 --- a/interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/store/external/ExternalStorage.java +++ b/interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/store/external/ExternalStorage.java @@ -11,6 +11,7 @@ import java.net.URI; import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.StandardCopyOption; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Map; @@ -56,7 +57,7 @@ public static String generateRandomString(int length) { public void downloadDataWithMove(String srcPath, String dstPath) throws IOException { String tmpPath = dstPath + "." + generateRandomString(6); downloadDataSimple(srcPath, tmpPath); - Files.move(Path.of(tmpPath), Path.of(dstPath)); + Files.move(Path.of(tmpPath), Path.of(dstPath), StandardCopyOption.REPLACE_EXISTING); } public void downloadDataWithRetry(String srcPath, String dstPath) throws IOException {