Class LevelDBFileRegionAliasMap

java.lang.Object
org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap<FileRegion>
org.apache.hadoop.hdfs.server.common.blockaliasmap.impl.LevelDBFileRegionAliasMap
All Implemented Interfaces:
Configurable

@Public @Unstable public class LevelDBFileRegionAliasMap extends BlockAliasMap<FileRegion> implements Configurable
A LevelDB based implementation of BlockAliasMap.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    org.apache.hadoop.hdfs.server.common.blockaliasmap.impl.LevelDBFileRegionAliasMap.LevelDBOptions
    Class specifying reader options for the LevelDBFileRegionAliasMap.
    static class 
    org.apache.hadoop.hdfs.server.common.blockaliasmap.impl.LevelDBFileRegionAliasMap.LevelDBReader
    This class is used as a reader for block maps which are stored as LevelDB files.
    static class 
    org.apache.hadoop.hdfs.server.common.blockaliasmap.impl.LevelDBFileRegionAliasMap.LevelDBWriter
    This class is used as a writer for block maps which are stored as LevelDB files.

    Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap

    org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.ImmutableIterator, org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Reader<U extends BlockAlias>, org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Writer<U extends BlockAlias>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    Return the configuration used by this object.
    org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Reader<FileRegion>
    getReader(org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Reader.Options opts, String blockPoolID)
    Returns a reader to the alias map.
    org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Writer<FileRegion>
    getWriter(org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Writer.Options opts, String blockPoolID)
    Returns the writer for the alias map.
    void
    Refresh the alias map.
    void
    Set the configuration to be used by this object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • LevelDBFileRegionAliasMap

      public LevelDBFileRegionAliasMap()
  • Method Details

    • setConf

      public void setConf(Configuration conf)
      Description copied from interface: Configurable
      Set the configuration to be used by this object.
      Specified by:
      setConf in interface Configurable
      Parameters:
      conf - configuration to be used
    • getConf

      public Configuration getConf()
      Description copied from interface: Configurable
      Return the configuration used by this object.
      Specified by:
      getConf in interface Configurable
      Returns:
      Configuration
    • getReader

      public org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Reader<FileRegion> getReader(org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Reader.Options opts, String blockPoolID) throws IOException
      Description copied from class: BlockAliasMap
      Returns a reader to the alias map.
      Specified by:
      getReader in class BlockAliasMap<FileRegion>
      Parameters:
      opts - reader options
      blockPoolID - block pool id to use
      Returns:
      BlockAliasMap.Reader to the alias map. If a Reader for the blockPoolID cannot be created, this will return null.
      Throws:
      IOException
    • getWriter

      public org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Writer<FileRegion> getWriter(org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap.Writer.Options opts, String blockPoolID) throws IOException
      Description copied from class: BlockAliasMap
      Returns the writer for the alias map.
      Specified by:
      getWriter in class BlockAliasMap<FileRegion>
      Parameters:
      opts - writer options.
      blockPoolID - block pool id to use
      Returns:
      BlockAliasMap.Writer to the alias map.
      Throws:
      IOException
    • refresh

      public void refresh() throws IOException
      Description copied from class: BlockAliasMap
      Refresh the alias map.
      Specified by:
      refresh in class BlockAliasMap<FileRegion>
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in class BlockAliasMap<FileRegion>
      Throws:
      IOException