@Evolving public interface FileSystemClient
Modifier and Type | Method and Description |
---|---|
boolean |
delete(String path)
Delete the file at given path.
|
CloseableIterator<FileStatus> |
listFrom(String filePath)
List the paths in the same directory that are lexicographically greater or equal to (UTF-8
sorting) the given `path`.
|
boolean |
mkdirs(String path)
Create a directory at the given path including parent directories.
|
CloseableIterator<java.io.ByteArrayInputStream> |
readFiles(CloseableIterator<FileReadRequest> readRequests)
Return an iterator of byte streams one for each read request in
readRequests . |
String |
resolvePath(String path)
Resolve the given path to a fully qualified path.
|
CloseableIterator<FileStatus> listFrom(String filePath) throws java.io.IOException
filePath
- Fully qualified path to a filejava.io.FileNotFoundException
- if the file at the given path is not foundjava.io.IOException
- for any other IO error.String resolvePath(String path) throws java.io.IOException
path
- Input pathjava.io.FileNotFoundException
- If the given path doesn't exist.java.io.IOException
- for any other IO error.CloseableIterator<java.io.ByteArrayInputStream> readFiles(CloseableIterator<FileReadRequest> readRequests) throws java.io.IOException
readRequests
. The
returned streams are in the same order as the given FileReadRequest
s. It is the
responsibility of the caller to close each returned stream.readRequests
- Iterator of read requestsByteArrayInputStream
.java.io.IOException
boolean mkdirs(String path) throws java.io.IOException
path
- Full qualified path to create a directory at.java.io.IOException
- for any IO error.boolean delete(String path) throws java.io.IOException
path
- the path to delete. If path is a directory throws an exception.java.io.IOException
- for any IO error.