Class DatanodeStorageInfo
java.lang.Object
org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo
A Datanode has one or more storages. A storage in the Datanode is represented
by this class.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo.AddBlockResultbooleanstatic voiddecrementBlocksScheduled(DatanodeStorageInfo... storages) Decrement the number of blocks scheduled for each given storage.booleanintorg.apache.hadoop.fs.StorageTypeinthashCode()static voidincrementBlocksScheduled(DatanodeStorageInfo... storages) Increment the number of blocks scheduled for each given storagevoidvoidsetBlockContentsStale(boolean value) voidsetUtilizationForTesting(long capacity, long dfsUsed, long remaining, long blockPoolUsed) static org.apache.hadoop.hdfs.protocol.DatanodeInfo[]toDatanodeInfos(DatanodeStorageInfo[] storages) static String[]toStorageIDs(DatanodeStorageInfo[] storages) static org.apache.hadoop.fs.StorageType[]toStorageTypes(DatanodeStorageInfo[] storages) toString()voidupdateFromStorage(org.apache.hadoop.hdfs.server.protocol.DatanodeStorage storage)
-
Field Details
-
EMPTY_ARRAY
-
-
Method Details
-
toDatanodeInfos
public static org.apache.hadoop.hdfs.protocol.DatanodeInfo[] toDatanodeInfos(DatanodeStorageInfo[] storages) -
toStorageIDs
-
toStorageTypes
-
updateFromStorage
public void updateFromStorage(org.apache.hadoop.hdfs.server.protocol.DatanodeStorage storage) -
getBlockReportCount
public int getBlockReportCount() -
areBlockContentsStale
public boolean areBlockContentsStale() -
setBlockContentsStale
@VisibleForTesting public void setBlockContentsStale(boolean value) -
setUtilizationForTesting
@VisibleForTesting public void setUtilizationForTesting(long capacity, long dfsUsed, long remaining, long blockPoolUsed) -
getStorageID
-
getStorageType
public org.apache.hadoop.fs.StorageType getStorageType() -
addBlock
public org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo.AddBlockResult addBlock(BlockInfo b, org.apache.hadoop.hdfs.protocol.Block reportedBlock) -
insertToList
-
getDatanodeDescriptor
-
incrementBlocksScheduled
Increment the number of blocks scheduled for each given storage -
decrementBlocksScheduled
Decrement the number of blocks scheduled for each given storage. This will be called during abandon block or delete of UC block. -
equals
-
hashCode
public int hashCode() -
toString
-