public interface DuplicatingFileSystem
FileSystems
that can perform cheap DFS side
duplicate operation. Such an operation can improve the time required for creating cheaply
independent snapshots from incremental snapshots.Modifier and Type | Interface and Description |
---|---|
static interface |
DuplicatingFileSystem.CopyRequest
A pair of source and destination to duplicate a file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canFastDuplicate(Path source,
Path destination)
Tells if we can perform duplicate/copy between given paths.
|
void |
duplicate(List<DuplicatingFileSystem.CopyRequest> requests)
Duplicates the source path into the destination path.
|
boolean canFastDuplicate(Path source, Path destination) throws IOException
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.
source
- The path of the source file to duplicatedestination
- The path where to duplicate the source fileIOException
void duplicate(List<DuplicatingFileSystem.CopyRequest> requests) throws IOException
You should first check if you can duplicate with canFastDuplicate(Path, Path)
.
requests
- Pairs of src/dst to copy.IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.