org.apache.hadoop.conf.Configurable, InMemoryAliasMapProtocol@Public @Unstable public class InMemoryAliasMap extends java.lang.Object implements InMemoryAliasMapProtocol, org.apache.hadoop.conf.Configurable
| Modifier and Type | Class | Description |
|---|---|---|
static interface |
InMemoryAliasMap.CheckedFunction2<T1,T2,R> |
CheckedFunction is akin to
Function but
specifies an IOException. |
InMemoryAliasMapProtocol.IterationResult| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
static void |
completeBootstrapTransfer(java.io.File aliasMap) |
Extract the aliasmap archive to complete the bootstrap process.
|
static org.apache.hadoop.hdfs.protocol.Block |
fromBlockBytes(byte[] blockDbFormat) |
|
static org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation |
fromProvidedStorageLocationBytes(byte[] providedStorageLocationDbFormat) |
|
java.lang.String |
getBlockPoolId() |
Get the associated block pool id.
|
org.apache.hadoop.conf.Configuration |
getConf() |
|
static InMemoryAliasMap |
init(org.apache.hadoop.conf.Configuration conf,
java.lang.String blockPoolID) |
|
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) |
|
static byte[] |
toProtoBufBytes(org.apache.hadoop.hdfs.protocol.Block block) |
|
static byte[] |
toProtoBufBytes(org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation) |
|
static void |
transferForBootstrap(javax.servlet.http.HttpServletResponse response,
org.apache.hadoop.conf.Configuration conf,
InMemoryAliasMap aliasMap) |
Transfer this aliasmap for bootstrapping standby Namenodes.
|
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 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.Configurable@Nonnull public static InMemoryAliasMap init(org.apache.hadoop.conf.Configuration conf, java.lang.String blockPoolID) 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 close()
throws java.io.IOException
java.io.IOException@Nonnull
public static org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation fromProvidedStorageLocationBytes(@Nonnull
byte[] providedStorageLocationDbFormat)
throws org.apache.hadoop.thirdparty.protobuf.InvalidProtocolBufferException
org.apache.hadoop.thirdparty.protobuf.InvalidProtocolBufferException@Nonnull
public static org.apache.hadoop.hdfs.protocol.Block fromBlockBytes(@Nonnull
byte[] blockDbFormat)
throws org.apache.hadoop.thirdparty.protobuf.InvalidProtocolBufferException
org.apache.hadoop.thirdparty.protobuf.InvalidProtocolBufferExceptionpublic static byte[] toProtoBufBytes(@Nonnull
org.apache.hadoop.hdfs.protocol.ProvidedStorageLocation providedStorageLocation)
throws java.io.IOException
java.io.IOExceptionpublic static byte[] toProtoBufBytes(@Nonnull
org.apache.hadoop.hdfs.protocol.Block block)
throws java.io.IOException
java.io.IOExceptionpublic static void transferForBootstrap(javax.servlet.http.HttpServletResponse response,
org.apache.hadoop.conf.Configuration conf,
InMemoryAliasMap aliasMap)
throws java.io.IOException
response - http response.conf - configuration to use.aliasMap - aliasmap to transfer.java.io.IOExceptionpublic static void completeBootstrapTransfer(java.io.File aliasMap)
throws java.io.IOException
aliasMap - location of the aliasmap.java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.