You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by suja <su...@huawei.com> on 2012/05/17 07:10:01 UTC

Clarification about missing replicas calculation

Hi ,

 

I need to know when the missing replicas in fsck is displayed

 

>From Hadoop Definitive guide 3 we can see

 

"Missing Replicas

    Threse are blocks with no replicas anywhere in the cluster."

 

page number 346 Chap 10 Administrating Hadoop.

 

If we check the code 

NamenodeFsck#check() {

.

.

if(locs.length < targetFileReplication && locs.length>0) {

res.missingreplicas+=(targetFileReplication - locs.length );

res.numUnderReplicatedBlocks+=1;

.

.

}

 

currently from code i can make out the number of replicas required to meet
the expected replication.

 

 

1. By the definition from Definitive guide res.missingreplicas should be
incremented when locs.length==0,

    

I am not able make out which one to follow .

 

2. Should missing replicas be considered as UnderReplicatedBlocks while
displaying in fsck ?

 

 

Thanks in Advance

 

Suja