Package io.delta.storage
Class LocalLogStore
Object
io.delta.storage.LogStore
io.delta.storage.HadoopFileSystemLogStore
io.delta.storage.LocalLogStore
Default
LogStore implementation (should be used for testing only!).
Production users should specify the appropriate LogStore implementation in Spark properties.
We assume the following from FileSystem implementations:
- Rename without overwrite is atomic.
- List-after-write is consistent.
- Uses atomic rename when overwrite is false; if the destination file exists or the rename fails, throws an exception.
- Uses create-with-overwrite when overwrite is true. This does not make the file atomically visible and therefore the caller must handle partial files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionisPartialWriteVisible(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration hadoopConf) :: DeveloperApi :: Whether a partial write is visible for the underlying file system of `path`.voidwrite(org.apache.hadoop.fs.Path path, Iterator<String> actions, Boolean overwrite, org.apache.hadoop.conf.Configuration hadoopConf) This write implementation needs to wrap `writeWithRename` with `synchronized` as rename() forRawLocalFileSystemdoesn't throw an exception when the target file exists.Methods inherited from class io.delta.storage.HadoopFileSystemLogStore
listFrom, read, resolvePathOnPhysicalStorageMethods inherited from class io.delta.storage.LogStore
initHadoopConf
-
Constructor Details
-
LocalLogStore
public LocalLogStore(org.apache.hadoop.conf.Configuration hadoopConf)
-
-
Method Details
-
write
public void write(org.apache.hadoop.fs.Path path, Iterator<String> actions, Boolean overwrite, org.apache.hadoop.conf.Configuration hadoopConf) throws IOException This write implementation needs to wrap `writeWithRename` with `synchronized` as rename() forRawLocalFileSystemdoesn't throw an exception when the target file exists. Hence, we must make sure `exists + rename` in `writeWithRename` is atomic in our tests.- Specified by:
writein classLogStore- Throws:
IOException- if there's an issue resolving the FileSystemFileAlreadyExistsException- if the file already exists and overwrite is false
-
isPartialWriteVisible
public Boolean isPartialWriteVisible(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration hadoopConf) throws IOException Description copied from class:LogStore:: DeveloperApi :: Whether a partial write is visible for the underlying file system of `path`.- Specified by:
isPartialWriteVisiblein classLogStore- Throws:
IOException- if there's an issue resolving the FileSystem
-