限定符和类型 | 方法和说明 |
---|---|
Block |
DFSClient.DFSInputStream.getCurrentBlock()
Returns the block containing the target position.
|
Block |
DFSClient.DFSDataInputStream.getCurrentBlock()
Returns the block containing the target position.
|
限定符和类型 | 方法和说明 |
---|---|
Block |
LocatedBlock.getBlock() |
Block |
ClientDatanodeProtocol.getBlockInfo(Block block)
Returns a block object that contains the specified block object
from the specified Datanode.
|
Block |
Block.getWithWildcardGS() |
限定符和类型 | 方法和说明 |
---|---|
void |
ClientProtocol.abandonBlock(Block b,
String src,
String holder)
The client can give up on a blcok by calling abandonBlock().
|
int |
Block.compareTo(Block b) |
static long[] |
BlockListAsLongs.convertToArrayLongs(Block[] blockArray)
Converting a block[] to a long[]
|
Block |
ClientDatanodeProtocol.getBlockInfo(Block block)
Returns a block object that contains the specified block object
from the specified Datanode.
|
BlockLocalPathInfo |
ClientDatanodeProtocol.getBlockLocalPathInfo(Block block,
Token<BlockTokenIdentifier> token)
Retrieves the path names of the block file and metadata file stored on the
local file system.
|
LocatedBlock |
ClientDatanodeProtocol.recoverBlock(Block block,
boolean keepLength,
DatanodeInfo[] targets)
Start generation-stamp recovery for specified block
|
构造器和说明 |
---|
Block(Block blk) |
BlockLocalPathInfo(Block b,
String file,
String metafile)
Constructs BlockLocalPathInfo.
|
LocatedBlock(Block b,
DatanodeInfo[] locs) |
LocatedBlock(Block b,
DatanodeInfo[] locs,
long startOffset) |
LocatedBlock(Block b,
DatanodeInfo[] locs,
long startOffset,
boolean corrupt) |
限定符和类型 | 方法和说明 |
---|---|
void |
BlockTokenSecretManager.checkAccess(BlockTokenIdentifier id,
String userId,
Block block,
BlockTokenSecretManager.AccessMode mode)
Check if access should be allowed. userID is not checked if null.
|
void |
BlockTokenSecretManager.checkAccess(Token<BlockTokenIdentifier> token,
String userId,
Block block,
BlockTokenSecretManager.AccessMode mode)
Check if access should be allowed. userID is not checked if null
|
Token<BlockTokenIdentifier> |
BlockTokenSecretManager.generateToken(Block block,
EnumSet<BlockTokenSecretManager.AccessMode> modes)
Generate an block token for current user
|
Token<BlockTokenIdentifier> |
BlockTokenSecretManager.generateToken(String userId,
Block block,
EnumSet<BlockTokenSecretManager.AccessMode> modes)
Generate a block token for a specified user
|
限定符和类型 | 方法和说明 |
---|---|
Block |
DataNode.getBlockInfo(Block block)
Returns a block object that contains the specified block object
from the specified Datanode.
|
Block[] |
FSDatasetInterface.getBlockReport()
Returns the block report - the full list of blocks stored
Returns only finalized blocks
|
Block[] |
FSDataset.getBlockReport()
Return a table of block data.
|
Block[] |
FSDatasetInterface.getBlocksBeingWrittenReport()
Returns the blocks being written report
|
Block[] |
FSDataset.getBlocksBeingWrittenReport()
Return a table of blocks being written data
|
Block |
FSDatasetInterface.getStoredBlock(long blkid) |
Block |
FSDataset.getStoredBlock(long blkid) |
Block[] |
FSDatasetInterface.retrieveAsyncBlockReport()
Retrieve an asynchronously prepared block report.
|
Block[] |
FSDataset.retrieveAsyncBlockReport() |
限定符和类型 | 方法和说明 |
---|---|
boolean |
FSDataset.detachBlock(Block block,
int numLinks)
Make a copy of the block if this block is linked to an existing
snapshot.
|
void |
FSDatasetInterface.finalizeBlock(Block b)
Finalizes the block previously opened for writing using writeToBlock.
|
void |
FSDataset.finalizeBlock(Block b) |
void |
FSDatasetInterface.finalizeBlockIfNeeded(Block b)
Finalizes the block previously opened for writing using writeToBlock
if not already finalized
|
void |
FSDataset.finalizeBlockIfNeeded(Block b) |
File |
FSDataset.getBlockFile(Block b)
Get File name for a given block.
|
Block |
DataNode.getBlockInfo(Block block)
Returns a block object that contains the specified block object
from the specified Datanode.
|
InputStream |
FSDatasetInterface.getBlockInputStream(Block b)
Returns an input stream to read the contents of the specified block
|
InputStream |
FSDataset.getBlockInputStream(Block b) |
InputStream |
FSDatasetInterface.getBlockInputStream(Block b,
long seekOffset)
Returns an input stream at specified offset of the specified block
|
InputStream |
FSDataset.getBlockInputStream(Block b,
long seekOffset) |
BlockLocalPathInfo |
FSDatasetInterface.getBlockLocalPathInfo(Block b)
Get
BlockLocalPathInfo for the given block. |
BlockLocalPathInfo |
FSDataset.getBlockLocalPathInfo(Block block) |
BlockLocalPathInfo |
DataNode.getBlockLocalPathInfo(Block block,
Token<BlockTokenIdentifier> token) |
BlockMetaDataInfo |
DataNode.getBlockMetaDataInfo(Block block) |
long |
FSDatasetInterface.getChannelPosition(Block b,
FSDatasetInterface.BlockWriteStreams stream)
Returns the current offset in the data stream.
|
long |
FSDataset.getChannelPosition(Block b,
FSDatasetInterface.BlockWriteStreams streams)
Retrieves the offset in the block to which the
the next write will write data to.
|
File |
FSDataset.getFile(Block b)
Turn the block identifier into a filename.
|
long |
FSDatasetInterface.getLength(Block b)
Returns the specified block's on-disk length (excluding metadata)
|
long |
FSDataset.getLength(Block b)
Find the block's on-disk length
|
FSDatasetInterface.MetaDataInputStream |
FSDatasetInterface.getMetaDataInputStream(Block b)
Returns metaData of block b as an input stream (and its length)
|
FSDatasetInterface.MetaDataInputStream |
FSDataset.getMetaDataInputStream(Block b) |
long |
FSDatasetInterface.getMetaDataLength(Block b)
Returns the length of the metadata file of the specified block
|
long |
FSDataset.getMetaDataLength(Block b) |
protected File |
FSDataset.getMetaFile(Block b) |
FSDatasetInterface.BlockInputStreams |
FSDatasetInterface.getTmpInputStreams(Block 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
|
FSDatasetInterface.BlockInputStreams |
FSDataset.getTmpInputStreams(Block b,
long blkOffset,
long ckoff)
Returns handles to the block file and its metadata file
|
long |
FSDatasetInterface.getVisibleLength(Block b)
Returns the specified block's visible length (has metadata for this)
|
long |
FSDataset.getVisibleLength(Block b) |
void |
FSDatasetInterface.invalidate(Block[] invalidBlks)
Invalidates the specified blocks
|
void |
FSDataset.invalidate(Block[] invalidBlks)
We're informed that a block is no longer valid.
|
boolean |
FSDatasetInterface.isValidBlock(Block b)
Is the block valid?
|
boolean |
FSDataset.isValidBlock(Block b)
Check whether the given block is a valid one.
|
boolean |
FSDatasetInterface.metaFileExists(Block b)
Does the meta file exist for this block?
|
boolean |
FSDataset.metaFileExists(Block b) |
protected void |
DataNode.notifyNamenodeReceivedBlock(Block block,
String delHint) |
LocatedBlock |
DataNode.recoverBlock(Block block,
boolean keepLength,
DatanodeInfo[] targets)
Start generation-stamp recovery for specified block
|
Daemon |
DataNode.recoverBlocks(Block[] blocks,
DatanodeInfo[][] targets) |
void |
FSDatasetInterface.setChannelPosition(Block b,
FSDatasetInterface.BlockWriteStreams stream,
long dataOffset,
long ckOffset)
Sets the file pointer of the data stream and checksum stream to
the specified values.
|
void |
FSDataset.setChannelPosition(Block b,
FSDatasetInterface.BlockWriteStreams streams,
long dataOffset,
long ckOffset)
Sets the offset in the block to which the
the next write will write data to.
|
void |
FSDatasetInterface.setVisibleLength(Block b,
long length)
update the specified blocks visible meta data.
|
void |
FSDataset.setVisibleLength(Block b,
long length) |
BlockRecoveryInfo |
DataNode.startBlockRecovery(Block block) |
void |
FSDatasetInterface.unfinalizeBlock(Block b)
Unfinalizes the block previously opened for writing using writeToBlock.
|
void |
FSDataset.unfinalizeBlock(Block b)
Remove the temporary block file (if any)
|
void |
FSDatasetInterface.updateBlock(Block oldblock,
Block newblock)
Update the block to the new generation stamp and length.
|
void |
FSDataset.updateBlock(Block oldblock,
Block newblock)
Update the block to the new generation stamp and length.
|
void |
DataNode.updateBlock(Block oldblock,
Block newblock,
boolean finalize)
Update the block to the new generation stamp and length.
|
void |
FSDatasetInterface.validateBlockMetadata(Block b)
Validate that the contents in the Block matches
the file on disk.
|
void |
FSDataset.validateBlockMetadata(Block b)
Validate that the contents in the Block matches
the file on disk.
|
FSDatasetInterface.BlockWriteStreams |
FSDatasetInterface.writeToBlock(Block b,
boolean isRecovery,
boolean isReplicationRequest)
Creates the block and returns output streams to write data and CRC
|
FSDatasetInterface.BlockWriteStreams |
FSDataset.writeToBlock(Block b,
boolean isRecovery,
boolean replicationRequest)
Start writing to a block file
If isRecovery is true and the block pre-exists, then we kill all
volumeMap.put(b, v);
volumeMap.put(b, v);
other threads that might be writing to this block, and then reopen the file.
|
限定符和类型 | 字段和说明 |
---|---|
Block |
DatanodeDescriptor.BlockTargetPair.block |
限定符和类型 | 方法和说明 |
---|---|
void |
NameNode.abandonBlock(Block b,
String src,
String holder)
The client needs to give up on the block.
|
boolean |
FSNamesystem.abandonBlock(Block b,
String src,
String holder)
The client would like to let go of the given block
|
void |
CorruptReplicasMap.addToCorruptReplicasMap(Block blk,
DatanodeDescriptor dn)
Mark the block belonging to datanode as corrupt.
|
void |
FSNamesystem.blockReceived(DatanodeID nodeID,
Block block,
String delHint)
The given node is reporting that it received a certain block.
|
void |
NameNode.blockReceived(DatanodeRegistration nodeReg,
Block[] blocks,
String[] delHints) |
DatanodeDescriptor |
BlockPlacementPolicyDefault.chooseReplicaToDelete(FSInodeInfo inode,
Block block,
short replicationFactor,
Collection<DatanodeDescriptor> first,
Collection<DatanodeDescriptor> second)
Decide whether deleting the specified replica of the block still makes
the block conform to the configured block placement policy.
|
abstract DatanodeDescriptor |
BlockPlacementPolicy.chooseReplicaToDelete(FSInodeInfo srcInode,
Block block,
short replicationFactor,
Collection<DatanodeDescriptor> existingReplicas,
Collection<DatanodeDescriptor> moreExistingReplicas)
Decide whether deleting the specified replica of the block still makes
the block conform to the configured block placement policy.
|
void |
NameNode.commitBlockSynchronization(Block block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets)
Commit block synchronization in lease recovery
|
void |
FSNamesystem.commitBlockSynchronization(Block lastblock,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets) |
void |
FSNamesystem.markBlockAsCorrupt(Block blk,
DatanodeInfo dn)
Mark the block belonging to datanode as corrupt
|
long |
NameNode.nextGenerationStamp(Block block,
boolean fromNN)
Get the next GenerationStamp to be associated with the specified
block.
|
int |
CorruptReplicasMap.numCorruptReplicas(Block blk) |
限定符和类型 | 类和说明 |
---|---|
class |
BlockMetaDataInfo
Meta data information for a block
|
限定符和类型 | 方法和说明 |
---|---|
Block |
BlocksWithLocations.BlockWithLocations.getBlock()
get the block
|
Block |
BlockRecoveryInfo.getBlock() |
Block[] |
BlockCommand.getBlocks() |
限定符和类型 | 方法和说明 |
---|---|
void |
DatanodeProtocol.blockReceived(DatanodeRegistration registration,
Block[] blocks,
String[] delHints)
blockReceived() allows the DataNode to tell the NameNode about
recently-received block data, with a hint for pereferred replica
to be deleted when there is any excessive blocks.
|
void |
DatanodeProtocol.commitBlockSynchronization(Block block,
long newgenerationstamp,
long newlength,
boolean closeFile,
boolean deleteblock,
DatanodeID[] newtargets)
Commit block synchronization in lease recovery
|
BlockMetaDataInfo |
InterDatanodeProtocol.getBlockMetaDataInfo(Block block) |
long |
DatanodeProtocol.nextGenerationStamp(Block block,
boolean fromNN)
Get the next GenerationStamp to be associated with the specified
block.
|
BlockRecoveryInfo |
InterDatanodeProtocol.startBlockRecovery(Block block)
Begin recovery on a block - this interrupts writers and returns the
necessary metadata for recovery to begin.
|
void |
InterDatanodeProtocol.updateBlock(Block oldblock,
Block newblock,
boolean finalize)
Update the block to the new generation stamp and length.
|
构造器和说明 |
---|
BlockCommand(int action,
Block[] blocks)
Create BlockCommand for the given action
|
BlockMetaDataInfo(Block b,
long lastScanTime) |
BlockRecoveryInfo(Block block,
boolean wasRecoveredOnStartup) |
BlocksWithLocations.BlockWithLocations(Block b,
String[] datanodes)
constructor
|
Copyright © 2009 The Apache Software Foundation