org.apache.hadoop.hdfs.server.namenode
Class CorruptReplicasMap

java.lang.Object
  extended by 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


Constructor Summary
CorruptReplicasMap()
           
 
Method Summary
 void addToCorruptReplicasMap(Block blk, DatanodeDescriptor dn)
          Mark the block belonging to datanode as corrupt.
 int numCorruptReplicas(Block blk)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorruptReplicasMap

public CorruptReplicasMap()
Method Detail

addToCorruptReplicasMap

public void addToCorruptReplicasMap(Block blk,
                                    DatanodeDescriptor dn)
Mark the block belonging to datanode as corrupt.

Parameters:
blk - Block to be added to CorruptReplicasMap
dn - DatanodeDescriptor which holds the corrupt replica

numCorruptReplicas

public int numCorruptReplicas(Block blk)

size

public int size()


Copyright © 2009 The Apache Software Foundation