org.apache.hadoop.hdfs.server.namenode
Class CorruptReplicasMap
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.CorruptReplicasMap
@InterfaceAudience.Private
public class CorruptReplicasMap
- extends Object
Stores information about all corrupt blocks in the File System.
A Block is considered corrupt only if all of its replicas are
corrupt. While reporting replicas of a Block, we hide any corrupt
copies. These copies are removed once Block is found to have
expected number of good replicas.
Mapping: Block -> TreeSet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CorruptReplicasMap
public CorruptReplicasMap()
addToCorruptReplicasMap
public void addToCorruptReplicasMap(Block blk,
DatanodeDescriptor dn)
- Mark the block belonging to datanode as corrupt.
- Parameters:
blk
- Block to be added to CorruptReplicasMapdn
- DatanodeDescriptor which holds the corrupt replica
numCorruptReplicas
public int numCorruptReplicas(Block blk)
size
public int size()
Copyright © 2009 The Apache Software Foundation