java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.conf.Configurable, InMemoryAliasMapProtocol@Private @Unstable public class InMemoryLevelDBAliasMapServer extends java.lang.Object implements InMemoryAliasMapProtocol, org.apache.hadoop.conf.Configurable, java.io.Closeable
InMemoryAliasMap.InMemoryAliasMapProtocol.IterationResult| Constructor | Description |
|---|---|
InMemoryLevelDBAliasMapServer(InMemoryAliasMap.CheckedFunction2<org.apache.hadoop.conf.Configuration,java.lang.String,InMemoryAliasMap> initFun,
java.lang.String blockPoolId) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
InMemoryAliasMap |
getAliasMap() |
Get the
InMemoryAliasMap used by this server. |
java.lang.String |
getBlockPoolId() |
Get the associated block pool id.
|
org.apache.hadoop.conf.Configuration |
getConf() |
|
InMemoryAliasMapProtocol.IterationResult |
list(java.util.Optional<org.apache.hadoop.hdfs.protocol.Block> marker) |
List the next batch of
FileRegions in the alias map starting from
the given marker. |
java.util.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. |
public InMemoryLevelDBAliasMapServer(InMemoryAliasMap.CheckedFunction2<org.apache.hadoop.conf.Configuration,java.lang.String,InMemoryAliasMap> initFun, java.lang.String blockPoolId)
public void start()
throws java.io.IOException
java.io.IOExceptionpublic InMemoryAliasMapProtocol.IterationResult list(java.util.Optional<org.apache.hadoop.hdfs.protocol.Block> marker) throws java.io.IOException
InMemoryAliasMapProtocolFileRegions in the alias map starting from
the given marker. To retrieve all FileRegions stored in the
alias map, multiple calls to this function might be required.list in interface InMemoryAliasMapProtocolmarker - the next block to get fileregions from.InMemoryAliasMapProtocol.IterationResult with a set of
FileRegions and the next marker.java.io.IOException@Nonnull
public java.util.Optional<org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation> read(@Nonnull
org.apache.hadoop.hdfs.protocol.Block block)
throws java.io.IOException
InMemoryAliasMapProtocolProvidedStorageLocation associated with the
specified block.read in interface InMemoryAliasMapProtocolblock - the block to lookupProvidedStorageLocation.java.io.IOExceptionpublic void write(@Nonnull
org.apache.hadoop.hdfs.protocol.Block block,
@Nonnull
org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation)
throws java.io.IOException
InMemoryAliasMapProtocolProvidedStorageLocation
in the alias map.write in interface InMemoryAliasMapProtocoljava.io.IOExceptionpublic java.lang.String getBlockPoolId()
InMemoryAliasMapProtocolgetBlockPoolId in interface InMemoryAliasMapProtocolpublic void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurablepublic InMemoryAliasMap getAliasMap()
InMemoryAliasMap used by this server.public void close()
close in interface java.lang.AutoCloseableclose in interface java.io.CloseableCopyright © 2008–2025 Apache Software Foundation. All rights reserved.