Class InMemoryLevelDBAliasMapClient
java.lang.Object
org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap<FileRegion>
org.apache.hadoop.hdfs.server.common.blockaliasmap.impl.InMemoryLevelDBAliasMapClient
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
@Private
@Unstable
public class InMemoryLevelDBAliasMapClient
extends BlockAliasMap<FileRegion>
implements org.apache.hadoop.conf.Configurable
InMemoryLevelDBAliasMapClient is the client for the InMemoryAliasMapServer.
This is used by the Datanode and fs2img to store and retrieve FileRegions
based on the given Block.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.common.blockaliasmap.BlockAliasMap
BlockAliasMap.ImmutableIterator, BlockAliasMap.Reader<U extends BlockAlias>, BlockAliasMap.Writer<U extends BlockAlias> -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.apache.hadoop.conf.ConfigurationgetConf()getReader(BlockAliasMap.Reader.Options opts, String blockPoolID) Returns a reader to the alias map.getWriter(BlockAliasMap.Writer.Options opts, String blockPoolID) Returns the writer for the alias map.voidrefresh()Refresh the alias map.voidsetConf(org.apache.hadoop.conf.Configuration conf)
-
Method Details
-
close
public void close()- Specified by:
closein classBlockAliasMap<FileRegion>
-
getReader
public BlockAliasMap.Reader<FileRegion> getReader(BlockAliasMap.Reader.Options opts, String blockPoolID) throws IOException Description copied from class:BlockAliasMapReturns a reader to the alias map.- Specified by:
getReaderin classBlockAliasMap<FileRegion>- Parameters:
opts- reader optionsblockPoolID- block pool id to use- Returns:
BlockAliasMap.Readerto the alias map. If a Reader for the blockPoolID cannot be created, this will return null.- Throws:
IOException
-
getWriter
public BlockAliasMap.Writer<FileRegion> getWriter(BlockAliasMap.Writer.Options opts, String blockPoolID) throws IOException Description copied from class:BlockAliasMapReturns the writer for the alias map.- Specified by:
getWriterin classBlockAliasMap<FileRegion>- Parameters:
opts- writer options.blockPoolID- block pool id to use- Returns:
BlockAliasMap.Writerto the alias map.- Throws:
IOException
-
setConf
public void setConf(org.apache.hadoop.conf.Configuration conf) - Specified by:
setConfin interfaceorg.apache.hadoop.conf.Configurable
-
getConf
public org.apache.hadoop.conf.Configuration getConf()- Specified by:
getConfin interfaceorg.apache.hadoop.conf.Configurable
-
refresh
Description copied from class:BlockAliasMapRefresh the alias map.- Specified by:
refreshin classBlockAliasMap<FileRegion>- Throws:
IOException
-