TextFileRegionAliasMap.TextReader (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.common.blockaliasmap.impl, class: TextFileRegionAliasMap, class: TextReader

Package org.apache.hadoop.hdfs.server.common.blockaliasmap.impl

# Class TextFileRegionAliasMap.TextReader

java.lang.Object
org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Reader<FileRegion>
org.apache.hadoop.hdfs.server.common.blockaliasmap.impl.TextFileRegionAliasMap.TextReader

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `Iterable<FileRegion>`

Enclosing class:
  TextFileRegionAliasMap

public static class TextFileRegionAliasMap.TextReader extends BlockAliasMap.Reader<FileRegion>
This class is used as a reader for block maps which are stored as delimited text files.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `TextFileRegionAliasMap.TextReader.Options`
  Options for `TextFileRegionAliasMap.TextReader`.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `TextReader(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file, org.apache.hadoop.io.compress.CompressionCodec codec, String delim)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `InputStream`
  `createStream()`
  `static TextFileRegionAliasMap.ReaderOptions`
  `defaults()`
  `Iterator<FileRegion>`
  `iterator()`
  `Optional<FileRegion>`
  `resolve(org.apache.hadoop.hdfs.protocol.Block ident)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

- ## Constructor Details

  - ### TextReader

    protected TextReader(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path file, org.apache.hadoop.io.compress.CompressionCodec codec, String delim)

- ## Method Details

  - ### defaults

    public static TextFileRegionAliasMap.ReaderOptions defaults()

  - ### resolve

    public Optional<FileRegion> resolve(org.apache.hadoop.hdfs.protocol.Block ident) throws IOException
    Specified by:
      `resolve` in class `BlockAliasMap.Reader<FileRegion>`
    Parameters:
      `ident` - block to resolve
    Returns:
      BlockAlias corresponding to the provided block.
    Throws:
      `IOException`

  - ### createStream

    public InputStream createStream() throws IOException
    Throws:
      `IOException`

  - ### iterator

    public Iterator<FileRegion> iterator()

  - ### close

    public void close() throws IOException
    Throws:
      `IOException`