Class HDFSLogStore


public class HDFSLogStore extends HadoopFileSystemLogStore
The LogStore implementation for HDFS, which uses Hadoop FileContext API's to provide the necessary atomic and durability guarantees:
  1. Atomic visibility of files: `FileContext.rename` is used write files which is atomic for HDFS.
  2. Consistent file listing: HDFS file listing is consistent.
  • Field Details

    • NO_ABSTRACT_FILE_SYSTEM_EXCEPTION_MESSAGE

      public static final String NO_ABSTRACT_FILE_SYSTEM_EXCEPTION_MESSAGE
      See Also:
  • Constructor Details

    • HDFSLogStore

      public HDFSLogStore(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
      Description copied from class: LogStore
      :: DeveloperApi :: Write the given `actions` to the given `path` with or without overwrite as indicated. Implementation must throw 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.
      Specified by:
      write in class LogStore
      Throws:
      IOException - if there's an issue resolving the FileSystem
      FileAlreadyExistsException - 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)
      Description copied from class: LogStore
      :: DeveloperApi :: Whether a partial write is visible for the underlying file system of `path`.
      Specified by:
      isPartialWriteVisible in class LogStore