Package io.delta.kernel.defaults.engine
Class DefaultFileSystemClient
Object
io.delta.kernel.defaults.engine.DefaultFileSystemClient
- All Implemented Interfaces:
io.delta.kernel.engine.FileSystemClient
public class DefaultFileSystemClient
extends Object
implements io.delta.kernel.engine.FileSystemClient
Default implementation of
FileSystemClient based on Hadoop APIs. It takes a Hadoop Configuration object to interact with the file system. The following optional configurations can
be set to customize the behavior of the client:
io.delta.kernel.logStore.<scheme>.impl- The class name of the customLogStoreimplementation to use for operations on storage systems with the specifiedscheme. For example, to use a customLogStorefor S3 storage objects:
If not set, the default LogStore implementation for the scheme will be used.<property> <name>io.delta.kernel.logStore.s3.impl</name> <value>com.example.S3LogStore</value> </property>delta.enableFastS3AListFrom- Set totrueto enable fast listing functionality when using aLogStorecreated for S3 storage objects.
FileSystem.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFileSystemClient(FileIO fileIO) Create an instance of the defaultFileSystemClientimplementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFileAtomically(String srcPath, String destPath, boolean overwrite) booleanio.delta.kernel.utils.FileStatusgetFileStatus(String path) io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.FileStatus> booleanio.delta.kernel.utils.CloseableIterator<ByteArrayInputStream> readFiles(io.delta.kernel.utils.CloseableIterator<io.delta.kernel.engine.FileReadRequest> readRequests) resolvePath(String path)
-
Constructor Details
-
DefaultFileSystemClient
Create an instance of the defaultFileSystemClientimplementation.- Parameters:
fileIO- TheFileIOimplementation to use for file operations.
-
-
Method Details
-
listFrom
public io.delta.kernel.utils.CloseableIterator<io.delta.kernel.utils.FileStatus> listFrom(String filePath) throws IOException - Specified by:
listFromin interfaceio.delta.kernel.engine.FileSystemClient- Throws:
IOException
-
resolvePath
- Specified by:
resolvePathin interfaceio.delta.kernel.engine.FileSystemClient- Throws:
IOException
-
readFiles
public io.delta.kernel.utils.CloseableIterator<ByteArrayInputStream> readFiles(io.delta.kernel.utils.CloseableIterator<io.delta.kernel.engine.FileReadRequest> readRequests) throws IOException - Specified by:
readFilesin interfaceio.delta.kernel.engine.FileSystemClient- Throws:
IOException
-
mkdirs
- Specified by:
mkdirsin interfaceio.delta.kernel.engine.FileSystemClient- Throws:
IOException
-
delete
- Specified by:
deletein interfaceio.delta.kernel.engine.FileSystemClient- Throws:
IOException
-
getFileStatus
- Specified by:
getFileStatusin interfaceio.delta.kernel.engine.FileSystemClient- Throws:
IOException
-
copyFileAtomically
public void copyFileAtomically(String srcPath, String destPath, boolean overwrite) throws IOException - Specified by:
copyFileAtomicallyin interfaceio.delta.kernel.engine.FileSystemClient- Throws:
IOException
-