public class BlockUnderConstructionFeature extends Object
| Constructor and Description | 
|---|
| BlockUnderConstructionFeature(org.apache.hadoop.hdfs.protocol.Block blk,
                             HdfsServerConstants.BlockUCState state,
                             DatanodeStorageInfo[] targets) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | appendUCPartsConcise(StringBuilder sb) | 
| 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()). | 
| int | getNumExpectedLocations()Get the number of expected locations | 
| org.apache.hadoop.hdfs.protocol.Block | getTruncateBlock()Get recover block | 
| void | initializeBlockRecovery(org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo blockInfo,
                       long recoveryId,
                       boolean startRecovery)Initialize lease recovery for this block. | 
| void | setExpectedLocations(org.apache.hadoop.hdfs.protocol.Block block,
                    DatanodeStorageInfo[] targets)Set expected locations | 
| void | setTruncateBlock(org.apache.hadoop.hdfs.protocol.Block recoveryBlock) | 
| String | toString() | 
public BlockUnderConstructionFeature(org.apache.hadoop.hdfs.protocol.Block blk,
                             HdfsServerConstants.BlockUCState state,
                             DatanodeStorageInfo[] targets)
public void setExpectedLocations(org.apache.hadoop.hdfs.protocol.Block block,
                        DatanodeStorageInfo[] targets)
public DatanodeStorageInfo[] getExpectedStorageLocations()
public int getNumExpectedLocations()
public HdfsServerConstants.BlockUCState getBlockUCState()
HdfsServerConstants.BlockUCStatepublic long getBlockRecoveryId()
public org.apache.hadoop.hdfs.protocol.Block getTruncateBlock()
public void setTruncateBlock(org.apache.hadoop.hdfs.protocol.Block recoveryBlock)
public void initializeBlockRecovery(org.apache.hadoop.hdfs.server.blockmanagement.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 void appendUCPartsConcise(StringBuilder sb)
Copyright © 2017 Apache Software Foundation. All Rights Reserved.