public class BlockUnderConstructionFeature
extends java.lang.Object
| Constructor | Description |
|---|---|
BlockUnderConstructionFeature(org.apache.hadoop.hdfs.protocol.Block blk,
HdfsServerConstants.BlockUCState state,
DatanodeStorageInfo[] targets,
org.apache.hadoop.hdfs.protocol.BlockType blockType) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
appendUCPartsConcise(java.lang.StringBuilder sb) |
|
byte[] |
getBlockIndices() |
|
byte[] |
getBlockIndicesForSpecifiedStorages(java.util.List<java.lang.Integer> storageIdx) |
|
long |
getBlockRecoveryId() |
|
HdfsServerConstants.BlockUCState |
getBlockUCState() |
Return the state of the block under construction.
|
DatanodeStorageInfo[] |
getExpectedStorageLocations() |
Create array of expected replica locations
(as has been assigned by chooseTargets()).
|
java.util.Iterator<DatanodeStorageInfo> |
getExpectedStorageLocationsIterator() |
Note that this iterator doesn't guarantee thread-safe.
|
int |
getNumExpectedLocations() |
|
BlockInfo |
getTruncateBlock() |
Get recover block
|
void |
initializeBlockRecovery(BlockInfo blockInfo,
long recoveryId,
boolean startRecovery) |
Initialize lease recovery for this block.
|
void |
setExpectedLocations(org.apache.hadoop.hdfs.protocol.Block block,
DatanodeStorageInfo[] targets,
org.apache.hadoop.hdfs.protocol.BlockType blockType) |
Set expected locations
|
void |
setTruncateBlock(BlockInfo recoveryBlock) |
|
java.lang.String |
toString() |
public BlockUnderConstructionFeature(org.apache.hadoop.hdfs.protocol.Block blk,
HdfsServerConstants.BlockUCState state,
DatanodeStorageInfo[] targets,
org.apache.hadoop.hdfs.protocol.BlockType blockType)
public void setExpectedLocations(org.apache.hadoop.hdfs.protocol.Block block,
DatanodeStorageInfo[] targets,
org.apache.hadoop.hdfs.protocol.BlockType blockType)
public DatanodeStorageInfo[] getExpectedStorageLocations()
public java.util.Iterator<DatanodeStorageInfo> getExpectedStorageLocationsIterator()
public byte[] getBlockIndices()
public byte[] getBlockIndicesForSpecifiedStorages(java.util.List<java.lang.Integer> storageIdx)
public int getNumExpectedLocations()
public HdfsServerConstants.BlockUCState getBlockUCState()
HdfsServerConstants.BlockUCStatepublic long getBlockRecoveryId()
public BlockInfo getTruncateBlock()
public void setTruncateBlock(BlockInfo recoveryBlock)
public void initializeBlockRecovery(BlockInfo blockInfo, long recoveryId, boolean startRecovery)
blockInfo - Block to be recoveredrecoveryId - Recovery ID (new gen stamp)startRecovery - Issue recovery command to datanode if true.public java.lang.String toString()
toString in class java.lang.Objectpublic void appendUCPartsConcise(java.lang.StringBuilder sb)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.