InMemoryLevelDBAliasMapServer (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.aliasmap, class: InMemoryLevelDBAliasMapServer

Package org.apache.hadoop.hdfs.server.aliasmap

# Class InMemoryLevelDBAliasMapServer

java.lang.Object
org.apache.hadoop.hdfs.server.aliasmap.InMemoryLevelDBAliasMapServer

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `org.apache.hadoop.conf.Configurable`, `InMemoryAliasMapProtocol`

@Private @Unstable public class InMemoryLevelDBAliasMapServer extends Object implements InMemoryAliasMapProtocol, org.apache.hadoop.conf.Configurable, Closeable
InMemoryLevelDBAliasMapServer is the entry point from the Namenode into the `InMemoryAliasMap`.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.hadoop.hdfs.server.aliasmap.InMemoryAliasMapProtocol

  `InMemoryAliasMapProtocol.IterationResult`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InMemoryLevelDBAliasMapServer(InMemoryAliasMap.CheckedFunction2<org.apache.hadoop.conf.Configuration,String,InMemoryAliasMap> initFun, String blockPoolId)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `InMemoryAliasMap`
  `getAliasMap()`
  Get the `InMemoryAliasMap` used by this server.
  `String`
  `getBlockPoolId()`
  Get the associated block pool id.
  `org.apache.hadoop.conf.Configuration`
  `getConf()`
  `InMemoryAliasMapProtocol.IterationResult`
  `list(Optional<org.apache.hadoop.hdfs.protocol.Block> marker)`
  List the next batch of `FileRegion`s in the alias map starting from the given `marker`.
  `Optional<org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation>`
  `read(org.apache.hadoop.hdfs.protocol.Block block)`
  Gets the `ProvidedStorageLocation` associated with the specified block.
  `void`
  `setConf(org.apache.hadoop.conf.Configuration conf)`
  `void`
  `start()`
  `void`
  `write(org.apache.hadoop.hdfs.protocol.Block block, org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation)`
  Stores the block and it's associated `ProvidedStorageLocation` in the alias map.

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

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

- ## Constructor Details

  - ### InMemoryLevelDBAliasMapServer

    public InMemoryLevelDBAliasMapServer(InMemoryAliasMap.CheckedFunction2<org.apache.hadoop.conf.Configuration,String,InMemoryAliasMap> initFun, String blockPoolId)

- ## Method Details

  - ### start

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

  - ### list

    public InMemoryAliasMapProtocol.IterationResult list(Optional<org.apache.hadoop.hdfs.protocol.Block> marker) throws IOException
    Description copied from interface: `InMemoryAliasMapProtocol`
    List the next batch of `FileRegion`s in the alias map starting from the given `marker`. To retrieve all `FileRegion`s stored in the alias map, multiple calls to this function might be required.
    Specified by:
      `list` in interface `InMemoryAliasMapProtocol`
    Parameters:
      `marker` - the next block to get fileregions from.
    Returns:
      the `InMemoryAliasMapProtocol.IterationResult` with a set of FileRegions and the next marker.
    Throws:
      `IOException`

  - ### read

    @Nonnull public Optional<org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation> read(@Nonnull org.apache.hadoop.hdfs.protocol.Block block) throws IOException
    Description copied from interface: `InMemoryAliasMapProtocol`
    Gets the `ProvidedStorageLocation` associated with the specified block.
    Specified by:
      `read` in interface `InMemoryAliasMapProtocol`
    Parameters:
      `block` - the block to lookup
    Returns:
      the associated `ProvidedStorageLocation`.
    Throws:
      `IOException`

  - ### write

    public void write(@Nonnull org.apache.hadoop.hdfs.protocol.Block block, @Nonnull org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation) throws IOException
    Description copied from interface: `InMemoryAliasMapProtocol`
    Stores the block and it's associated `ProvidedStorageLocation` in the alias map.
    Specified by:
      `write` in interface `InMemoryAliasMapProtocol`
    Throws:
      `IOException`

  - ### getBlockPoolId

    public String getBlockPoolId()
    Description copied from interface: `InMemoryAliasMapProtocol`
    Get the associated block pool id.
    Specified by:
      `getBlockPoolId` in interface `InMemoryAliasMapProtocol`
    Returns:
      the block pool id associated with the Namenode running the in-memory alias map.

  - ### setConf

    public void setConf(org.apache.hadoop.conf.Configuration conf)
    Specified by:
      `setConf` in interface `org.apache.hadoop.conf.Configurable`

  - ### getConf

    public org.apache.hadoop.conf.Configuration getConf()
    Specified by:
      `getConf` in interface `org.apache.hadoop.conf.Configurable`

  - ### getAliasMap

    public InMemoryAliasMap getAliasMap()
    Get the `InMemoryAliasMap` used by this server.
    Returns:
      the inmemoryaliasmap used.

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`