prashantwason commented on code in PR #8430:
URL: https://github.com/apache/hudi/pull/8430#discussion_r1188608944
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieActiveTimeline.java:
##########
@@ -828,4 +829,17 @@ protected Option<byte[]> readDataFromPath(Path detailPath)
{
public HoodieActiveTimeline reload() {
return new HoodieActiveTimeline(metaClient);
}
+
+ public void copyInstant(HoodieInstant instant, Path dstDir) {
+ Path srcPath = new Path(metaClient.getMetaPath(), instant.getFileName());
+ Path dstPath = new Path(dstDir, instant.getFileName());
+ try {
+ FileSystem srcFs = srcPath.getFileSystem(metaClient.getHadoopConf());
+ FileSystem dstFs = dstPath.getFileSystem(metaClient.getHadoopConf());
+ dstFs.mkdirs(dstDir);
+ FileUtil.copy(srcFs, srcPath, dstFs, dstPath, false, srcFs.getConf());
Review Comment:
5th arg is deleteSource. Changed the API to use a different version of copy
which accepts the 6th argument as overwrite flag which is set to true.
--
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]