public abstract class HadoopFileSystemLogStore extends LogStore
LogStore for Hadoop FileSystem implementations.| Constructor and Description |
|---|
HadoopFileSystemLogStore(org.apache.hadoop.conf.Configuration hadoopConf) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.hadoop.fs.Path |
createTempPath(org.apache.hadoop.fs.Path path)
Create a temporary path (to be used as a copy) for the input
path |
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`.
|
CloseableIterator<java.lang.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.
|
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`.
|
protected void |
writeWithRename(org.apache.hadoop.fs.Path path,
java.util.Iterator<java.lang.String> actions,
java.lang.Boolean overwrite,
org.apache.hadoop.conf.Configuration hadoopConf)
An internal write implementation that uses FileSystem.rename().
|
initHadoopConf, isPartialWriteVisible, writepublic HadoopFileSystemLogStore(org.apache.hadoop.conf.Configuration hadoopConf)
public CloseableIterator<java.lang.String> read(org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration hadoopConf) throws java.io.IOException
LogStorepublic 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
LogStorepublic org.apache.hadoop.fs.Path resolvePathOnPhysicalStorage(org.apache.hadoop.fs.Path path,
org.apache.hadoop.conf.Configuration hadoopConf)
throws java.io.IOException
LogStoreresolvePathOnPhysicalStorage in class LogStorejava.io.IOException - if there's an issue resolving the FileSystemprotected void writeWithRename(org.apache.hadoop.fs.Path path,
java.util.Iterator<java.lang.String> actions,
java.lang.Boolean overwrite,
org.apache.hadoop.conf.Configuration hadoopConf)
throws java.io.IOException
This implementation should only be used for the underlying file systems that support atomic renames, e.g., Azure is OK but HDFS is not.
java.io.IOExceptionprotected org.apache.hadoop.fs.Path createTempPath(org.apache.hadoop.fs.Path path)
path