Class BlockInfoContiguous
java.lang.Object
org.apache.hadoop.hdfs.protocol.Block
org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo
org.apache.hadoop.hdfs.server.blockmanagement.BlockInfoContiguous
- All Implemented Interfaces:
Comparable<org.apache.hadoop.hdfs.protocol.Block>,org.apache.hadoop.io.Writable,org.apache.hadoop.util.LightWeightGSet.LinkedElement
Subclass of
BlockInfo, used for a block with replication scheme.-
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo
EMPTY_ARRAY, tripletsFields inherited from class org.apache.hadoop.hdfs.protocol.Block
BLOCK_FILE_PREFIX, blockFilePattern, METADATA_EXTENSION, metaFilePattern, metaOrBlockFilePattern -
Constructor Summary
ConstructorsConstructorDescriptionBlockInfoContiguous(short size) BlockInfoContiguous(org.apache.hadoop.hdfs.protocol.Block blk, short size) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hdfs.protocol.BlockTypefinal booleanintnumNodes()Count the number of data-nodes the block currently belongs to (i.e., NN has received block reports from the DN).Methods inherited from class org.apache.hadoop.hdfs.server.blockmanagement.BlockInfo
convertToBlockUnderConstruction, delete, equals, getBlockCollectionId, getBlockUCState, getCapacity, getDatanode, getNext, getReplication, getStorageInfos, getUnderConstructionFeature, hashCode, isComplete, isCompleteOrCommitted, isDeleted, isUnderRecovery, moveBlockToHead, setBlockCollectionId, setGenerationStampAndVerifyReplicas, setNext, setReplicationMethods inherited from class org.apache.hadoop.hdfs.protocol.Block
appendStringTo, compareTo, filename2id, getBlockId, getBlockId, getBlockName, getGenerationStamp, getGenerationStamp, getNumBytes, isBlockFilename, isMetaFilename, matchingIdAndGenStamp, metaToBlockFile, readFields, readId, set, setBlockId, setGenerationStamp, setNumBytes, toString, toString, write, writeId
-
Constructor Details
-
BlockInfoContiguous
public BlockInfoContiguous(short size) -
BlockInfoContiguous
public BlockInfoContiguous(org.apache.hadoop.hdfs.protocol.Block blk, short size)
-
-
Method Details
-
numNodes
public int numNodes()Description copied from class:BlockInfoCount the number of data-nodes the block currently belongs to (i.e., NN has received block reports from the DN). -
isStriped
public final boolean isStriped() -
getBlockType
public org.apache.hadoop.hdfs.protocol.BlockType getBlockType()- Specified by:
getBlockTypein classBlockInfo
-