Modifier and Type | Method and Description |
---|---|
ExtendedBlock |
DFSInputStream.getCurrentBlock()
Returns the block containing the target position.
|
Modifier and Type | Method and Description |
---|---|
protected BlockReader |
DFSInputStream.getBlockReader(InetSocketAddress dnAddr,
DatanodeInfo chosenNode,
String file,
ExtendedBlock block,
Token<BlockTokenIdentifier> blockToken,
long startOffset,
long len,
int bufferSize,
boolean verifyChecksum,
String clientName)
Retrieve a BlockReader suitable for reading.
|
static BlockReader |
BlockReaderFactory.newBlockReader(DFSClient.Conf conf,
String file,
ExtendedBlock block,
Token<BlockTokenIdentifier> blockToken,
long startOffset,
long len,
boolean verifyChecksum,
String clientName,
Peer peer,
DatanodeID datanodeID,
org.apache.hadoop.hdfs.DomainSocketFactory domSockFactory,
org.apache.hadoop.hdfs.PeerCache peerCache,
org.apache.hadoop.hdfs.FileInputStreamCache fisCache,
boolean allowShortCircuitLocalReads,
CachingStrategy cachingStrategy)
Create a new BlockReader specifically to satisfy a read.
|
static BlockReader |
RemoteBlockReader2.newBlockReader(String file,
ExtendedBlock block,
Token<BlockTokenIdentifier> blockToken,
long startOffset,
long len,
boolean verifyChecksum,
String clientName,
Peer peer,
DatanodeID datanodeID,
org.apache.hadoop.hdfs.PeerCache peerCache,
CachingStrategy cachingStrategy)
Create a new BlockReader specifically to satisfy a read.
|
static RemoteBlockReader |
RemoteBlockReader.newBlockReader(String file,
ExtendedBlock block,
Token<BlockTokenIdentifier> blockToken,
long startOffset,
long len,
int bufferSize,
boolean verifyChecksum,
String clientName,
Peer peer,
DatanodeID datanodeID,
org.apache.hadoop.hdfs.PeerCache peerCache,
CachingStrategy cachingStrategy)
Deprecated.
Create a new BlockReader specifically to satisfy a read.
|
Modifier and Type | Method and Description |
---|---|
ExtendedBlock |
HdfsDataInputStream.getCurrentBlock()
Get the block containing the target position.
|
Modifier and Type | Method and Description |
---|---|
ExtendedBlock |
LocatedBlock.getBlock() |
ExtendedBlock |
BlockLocalPathInfo.getBlock() |
ExtendedBlock[] |
HdfsBlocksMetadata.getBlocks()
Get the array of blocks.
|
Modifier and Type | Method and Description |
---|---|
void |
ClientProtocol.abandonBlock(ExtendedBlock b,
String src,
String holder)
The client can give up on a block by calling abandonBlock().
|
LocatedBlock |
ClientProtocol.addBlock(String src,
String clientName,
ExtendedBlock previous,
DatanodeInfo[] excludeNodes,
long fileId,
String[] favoredNodes)
A client that wants to write an additional block to the
indicated filename (which must currently be open for writing)
should call addBlock().
|
boolean |
ClientProtocol.complete(String src,
String clientName,
ExtendedBlock last,
long fileId)
The client is done writing data to the given filename, and would
like to complete it.
|
LocatedBlock |
ClientProtocol.getAdditionalDatanode(String src,
ExtendedBlock blk,
DatanodeInfo[] existings,
DatanodeInfo[] excludes,
int numAdditionalNodes,
String clientName)
Get a datanode for an existing pipeline.
|
BlockLocalPathInfo |
ClientDatanodeProtocol.getBlockLocalPathInfo(ExtendedBlock block,
Token<BlockTokenIdentifier> token)
Retrieves the path names of the block file and metadata file stored on the
local file system.
|
static Block |
ExtendedBlock.getLocalBlock(ExtendedBlock b) |
long |
ClientDatanodeProtocol.getReplicaVisibleLength(ExtendedBlock b)
Return the visible length of a replica.
|
LocatedBlock |
ClientProtocol.updateBlockForPipeline(ExtendedBlock block,
String clientName)
Get a new generation stamp together with an access token for
a block under construction
This method is called only when a client needs to recover a failed
pipeline or set up a pipeline for appending to a block.
|
void |
ClientProtocol.updatePipeline(String clientName,
ExtendedBlock oldBlock,
ExtendedBlock newBlock,
DatanodeID[] newNodes)
Update a pipeline for a block under construction
|
Modifier and Type | Method and Description |
---|---|
HdfsBlocksMetadata |
ClientDatanodeProtocol.getHdfsBlocksMetadata(List<ExtendedBlock> blocks,
List<Token<BlockTokenIdentifier>> tokens)
Retrieves volume location information about a list of blocks on a datanode.
|
Constructor and Description |
---|
BlockLocalPathInfo(ExtendedBlock b,
String file,
String metafile)
Constructs BlockLocalPathInfo.
|
ExtendedBlock(ExtendedBlock b) |
HdfsBlocksMetadata(ExtendedBlock[] blocks,
List<byte[]> volumeIds,
List<Integer> volumeIndexes)
Constructs HdfsBlocksMetadata.
|
LocatedBlock(ExtendedBlock b,
DatanodeInfo[] locs) |
LocatedBlock(ExtendedBlock b,
DatanodeInfo[] locs,
long startOffset) |
LocatedBlock(ExtendedBlock b,
DatanodeInfo[] locs,
long startOffset,
boolean corrupt) |
Modifier and Type | Method and Description |
---|---|
void |
Sender.blockChecksum(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken) |
void |
DataTransferProtocol.blockChecksum(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken)
Get block checksum (MD5 of CRC32).
|
void |
Sender.copyBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken) |
void |
DataTransferProtocol.copyBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken)
Copy a block.
|
void |
Sender.readBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String clientName,
long blockOffset,
long length,
boolean sendChecksum,
CachingStrategy cachingStrategy) |
void |
DataTransferProtocol.readBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String clientName,
long blockOffset,
long length,
boolean sendChecksum,
CachingStrategy cachingStrategy)
Read a block.
|
void |
Sender.replaceBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String delHint,
DatanodeInfo source) |
void |
DataTransferProtocol.replaceBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String delHint,
DatanodeInfo source)
Receive a block from a source datanode
and then notifies the namenode
to remove the copy from the original datanode.
|
void |
Sender.requestShortCircuitFds(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
int maxVersion) |
void |
DataTransferProtocol.requestShortCircuitFds(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
int maxVersion)
Request short circuit access file descriptors from a DataNode.
|
void |
Sender.transferBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String clientName,
DatanodeInfo[] targets) |
void |
DataTransferProtocol.transferBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String clientName,
DatanodeInfo[] targets)
Transfer a block to another datanode.
|
void |
Sender.writeBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String clientName,
DatanodeInfo[] targets,
DatanodeInfo source,
BlockConstructionStage stage,
int pipelineSize,
long minBytesRcvd,
long maxBytesRcvd,
long latestGenerationStamp,
DataChecksum requestedChecksum,
CachingStrategy cachingStrategy) |
void |
DataTransferProtocol.writeBlock(ExtendedBlock blk,
Token<BlockTokenIdentifier> blockToken,
String clientName,
DatanodeInfo[] targets,
DatanodeInfo source,
BlockConstructionStage stage,
int pipelineSize,
long minBytesRcvd,
long maxBytesRcvd,
long latestGenerationStamp,
DataChecksum requestedChecksum,
CachingStrategy cachingStrategy)
Write a block to a datanode pipeline.
|
Modifier and Type | Method and Description |
---|---|
static ExtendedBlock |
PBHelper.convert(HdfsProtos.ExtendedBlockProto eb) |
Modifier and Type | Method and Description |
---|---|
void |
ClientNamenodeProtocolTranslatorPB.abandonBlock(ExtendedBlock b,
String src,
String holder) |
LocatedBlock |
ClientNamenodeProtocolTranslatorPB.addBlock(String src,
String clientName,
ExtendedBlock previous,
DatanodeInfo[] excludeNodes,
long fileId,
String[] favoredNodes) |
void |
DatanodeProtocolClientSideTranslatorPB.commitBlockSynchronization(ExtendedBlock block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets,
String[] newtargetstorages) |
boolean |
ClientNamenodeProtocolTranslatorPB.complete(String src,
String clientName,
ExtendedBlock last,
long fileId) |
static HdfsProtos.ExtendedBlockProto |
PBHelper.convert(ExtendedBlock b) |
LocatedBlock |
ClientNamenodeProtocolTranslatorPB.getAdditionalDatanode(String src,
ExtendedBlock blk,
DatanodeInfo[] existings,
DatanodeInfo[] excludes,
int numAdditionalNodes,
String clientName) |
BlockLocalPathInfo |
ClientDatanodeProtocolTranslatorPB.getBlockLocalPathInfo(ExtendedBlock block,
Token<BlockTokenIdentifier> token) |
long |
ClientDatanodeProtocolTranslatorPB.getReplicaVisibleLength(ExtendedBlock b) |
LocatedBlock |
ClientNamenodeProtocolTranslatorPB.updateBlockForPipeline(ExtendedBlock block,
String clientName) |
void |
ClientNamenodeProtocolTranslatorPB.updatePipeline(String clientName,
ExtendedBlock oldBlock,
ExtendedBlock newBlock,
DatanodeID[] newNodes) |
String |
InterDatanodeProtocolTranslatorPB.updateReplicaUnderRecovery(ExtendedBlock oldBlock,
long recoveryId,
long newLength) |
Modifier and Type | Method and Description |
---|---|
HdfsBlocksMetadata |
ClientDatanodeProtocolTranslatorPB.getHdfsBlocksMetadata(List<ExtendedBlock> blocks,
List<Token<BlockTokenIdentifier>> tokens) |
Modifier and Type | Method and Description |
---|---|
void |
BlockManager.findAndMarkBlockAsCorrupt(ExtendedBlock blk,
DatanodeInfo dn,
String reason)
Mark the block belonging to datanode as corrupt
|
Modifier and Type | Method and Description |
---|---|
void |
DataBlockScanner.addBlock(ExtendedBlock block) |
BlockLocalPathInfo |
DataNode.getBlockLocalPathInfo(ExtendedBlock block,
Token<BlockTokenIdentifier> token) |
long |
DataNode.getReplicaVisibleLength(ExtendedBlock block) |
void |
DataNode.notifyNamenodeDeletedBlock(ExtendedBlock block)
Notify the corresponding namenode to delete the block.
|
protected void |
DataNode.notifyNamenodeReceivedBlock(ExtendedBlock block,
String delHint) |
protected void |
DataNode.notifyNamenodeReceivingBlock(ExtendedBlock block) |
void |
DataNode.reportBadBlocks(ExtendedBlock block)
Report a bad block which is hosted on the local DN.
|
void |
DataNode.reportRemoteBadBlock(DatanodeInfo srcDataNode,
ExtendedBlock block)
Report a bad block on another DN (eg if we received a corrupt replica
from a remote host).
|
String |
DataNode.updateReplicaUnderRecovery(ExtendedBlock oldBlock,
long recoveryId,
long newLength)
Update replica with the new generation stamp and length.
|
Modifier and Type | Method and Description |
---|---|
HdfsBlocksMetadata |
DataNode.getHdfsBlocksMetadata(List<ExtendedBlock> blocks,
List<Token<BlockTokenIdentifier>> tokens) |
Constructor and Description |
---|
ReplicaNotFoundException(ExtendedBlock b) |
Modifier and Type | Method and Description |
---|---|
void |
FsDatasetSpi.adjustCrcChannelPosition(ExtendedBlock b,
ReplicaOutputStreams outs,
int checksumSize)
Sets the file pointer of the checksum stream so that the last checksum
will be overwritten
|
ReplicaInPipelineInterface |
FsDatasetSpi.append(ExtendedBlock b,
long newGS,
long expectedBlockLen)
Append to a finalized replica and returns the meta info of the replica
|
boolean |
FsDatasetSpi.contains(ExtendedBlock block)
Does the dataset contain the block?
|
ReplicaInPipelineInterface |
FsDatasetSpi.convertTemporaryToRbw(ExtendedBlock temporary)
Covert a temporary replica to a RBW.
|
ReplicaInPipelineInterface |
FsDatasetSpi.createRbw(ExtendedBlock b)
Creates a RBW replica and returns the meta info of the replica
|
ReplicaInPipelineInterface |
FsDatasetSpi.createTemporary(ExtendedBlock b)
Creates a temporary replica and returns the meta information of the replica
|
void |
FsDatasetSpi.finalizeBlock(ExtendedBlock b)
Finalizes the block previously opened for writing using writeToBlock.
|
InputStream |
FsDatasetSpi.getBlockInputStream(ExtendedBlock b,
long seekOffset)
Returns an input stream at specified offset of the specified block
|
BlockLocalPathInfo |
FsDatasetSpi.getBlockLocalPathInfo(ExtendedBlock b)
Get
BlockLocalPathInfo for the given block. |
long |
FsDatasetSpi.getLength(ExtendedBlock b)
Returns the specified block's on-disk length (excluding metadata)
|
LengthInputStream |
FsDatasetSpi.getMetaDataInputStream(ExtendedBlock b) |
long |
FsDatasetSpi.getReplicaVisibleLength(ExtendedBlock block)
Get visible length of the specified replica.
|
ReplicaInputStreams |
FsDatasetSpi.getTmpInputStreams(ExtendedBlock b,
long blkoff,
long ckoff)
Returns an input stream at specified offset of the specified block
The block is still in the tmp directory and is not finalized
|
V |
FsDatasetSpi.getVolume(ExtendedBlock b) |
boolean |
FsDatasetSpi.isValidBlock(ExtendedBlock b)
Is the block valid?
|
boolean |
FsDatasetSpi.isValidRbw(ExtendedBlock b)
Is the block a valid RBW?
|
ReplicaInPipelineInterface |
FsDatasetSpi.recoverAppend(ExtendedBlock b,
long newGS,
long expectedBlockLen)
Recover a failed append to a finalized replica
and returns the meta info of the replica
|
void |
FsDatasetSpi.recoverClose(ExtendedBlock b,
long newGS,
long expectedBlockLen)
Recover a failed pipeline close
It bumps the replica's generation stamp and finalize it if RBW replica
|
ReplicaInPipelineInterface |
FsDatasetSpi.recoverRbw(ExtendedBlock b,
long newGS,
long minBytesRcvd,
long maxBytesRcvd)
Recovers a RBW replica and returns the meta info of the replica
|
void |
FsDatasetSpi.unfinalizeBlock(ExtendedBlock b)
Unfinalizes the block previously opened for writing using writeToBlock.
|
String |
FsDatasetSpi.updateReplicaUnderRecovery(ExtendedBlock oldBlock,
long recoveryId,
long newLength)
Update replica's generation stamp and length and finalize it.
|
Modifier and Type | Method and Description |
---|---|
HdfsBlocksMetadata |
FsDatasetSpi.getHdfsBlocksMetadata(List<ExtendedBlock> blocks)
Get a
HdfsBlocksMetadata corresponding to the list of blocks in
blocks . |
Modifier and Type | Method and Description |
---|---|
void |
DatanodeProtocol.commitBlockSynchronization(ExtendedBlock block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets,
String[] newtargetstorages)
Commit block synchronization in lease recovery
|
String |
InterDatanodeProtocol.updateReplicaUnderRecovery(ExtendedBlock oldBlock,
long recoveryId,
long newLength)
Update replica with the new generation stamp and length.
|
Constructor and Description |
---|
BlockRecoveryCommand.RecoveringBlock(ExtendedBlock b,
DatanodeInfo[] locs,
long newGS)
Create RecoveringBlock.
|
Copyright © 2013 Apache Software Foundation. All rights reserved.