public abstract class LogStore
extends Object
General interface for all critical file system operations required to read and write the Delta logs. The correctness is predicated on the atomicity and durability guarantees of the implementation of this interface. Specifically,
All subclasses of this interface is required to have a constructor that takes Configuration as a single parameter. This constructor is used to dynamically create the LogStore.
LogStore and its implementations are not meant for direct access but for configuration based on storage system. See [[https://docs.delta.io/latest/delta-storage.html]] for details.
Constructor and Description |
---|
LogStore(org.apache.hadoop.conf.Configuration initHadoopConf) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.conf.Configuration |
initHadoopConf()
:: DeveloperApi ::
Hadoop configuration that should only be used during initialization of LogStore.
|
abstract Boolean |
isPartialWriteVisible(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`.
|
abstract java.util.Iterator<org.apache.hadoop.fs.FileStatus> |
listFrom(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration hadoopConf)
:: DeveloperApi ::
List the paths in the same directory that are lexicographically greater or equal to
(UTF-8 sorting) the given `path`.
|
abstract CloseableIterator<String> |
read(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration hadoopConf)
:: DeveloperApi ::
Load the given file and return an `Iterator` of lines, with line breaks removed from each line.
|
abstract org.apache.hadoop.fs.Path |
resolvePathOnPhysicalStorage(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration hadoopConf)
:: DeveloperApi ::
Resolve the fully qualified path for the given `path`.
|
abstract void |
write(org.apache.hadoop.fs.Path path,
java.util.Iterator<String> actions,
Boolean overwrite,
org.apache.hadoop.conf.Configuration hadoopConf)
:: DeveloperApi ::
Write the given `actions` to the given `path` with or without overwrite as indicated.
|
public org.apache.hadoop.conf.Configuration initHadoopConf()
public abstract CloseableIterator<String> read(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration hadoopConf) throws java.io.IOException
java.io.IOException
- if there's an issue resolving the FileSystempublic abstract void write(org.apache.hadoop.fs.Path path, java.util.Iterator<String> actions, Boolean overwrite, org.apache.hadoop.conf.Configuration hadoopConf) throws java.io.IOException
FileAlreadyExistsException
exception if the
file already exists and overwrite = false. Furthermore, if isPartialWriteVisible returns false,
implementation must ensure that the entire file is made visible atomically, that is,
it should not generate partial files.java.io.IOException
- if there's an issue resolving the FileSystemjava.nio.file.FileAlreadyExistsException
- if the file already exists and overwrite is falsepublic abstract java.util.Iterator<org.apache.hadoop.fs.FileStatus> listFrom(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration hadoopConf) throws java.io.IOException
java.io.IOException
- if there's an issue resolving the FileSystemjava.nio.file.FileAlreadyExistsException
- if path
directory can't be foundpublic abstract org.apache.hadoop.fs.Path resolvePathOnPhysicalStorage(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration hadoopConf) throws java.io.IOException
java.io.IOException
- if there's an issue resolving the FileSystempublic abstract Boolean isPartialWriteVisible(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration hadoopConf) throws java.io.IOException
java.io.IOException
- if there's an issue resolving the FileSystem