Package org.apache.flink.core.fs
Interface DuplicatingFileSystem
-
public interface DuplicatingFileSystemAn extension interface forFileSystemsthat can perform cheap DFS side duplicate operation. Such an operation can improve the time required for creating cheaply independent snapshots from incremental snapshots.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDuplicatingFileSystem.CopyRequestA pair of source and destination to duplicate a file.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanFastDuplicate(Path source, Path destination)Tells if we can perform duplicate/copy between given paths.voidduplicate(List<DuplicatingFileSystem.CopyRequest> requests)Duplicates the source path into the destination path.
-
-
-
Method Detail
-
canFastDuplicate
boolean canFastDuplicate(Path source, Path destination) throws IOException
Tells if we can perform duplicate/copy between given paths.This should be a rather cheap operation, preferably not involving any remote accesses. You can check e.g. if both paths are on the same host.
- Parameters:
source- The path of the source file to duplicatedestination- The path where to duplicate the source file- Returns:
- true, if we can perform the duplication
- Throws:
IOException
-
duplicate
void duplicate(List<DuplicatingFileSystem.CopyRequest> requests) throws IOException
Duplicates the source path into the destination path.You should first check if you can duplicate with
canFastDuplicate(Path, Path).- Parameters:
requests- Pairs of src/dst to copy.- Throws:
IOException
-
-