hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <qwertyman...@gmail.com>
Subject Re: how does hdfs determine what node to use?
Date Thu, 10 Mar 2011 20:02:41 GMT
On Thu, Mar 10, 2011 at 9:11 PM, Ayon Sinha <ayonsinha@yahoo.com> wrote:
> So I am guessing if you have a rep factor of 2, both the blocks will be on
> the same rack.

The default block placement strategy of HDFS is to place at least one
block in another rack, for all replication factors greater than one.
This is controlled using the BlockPlacementPolicyDefault class (an
alternate implementation may be specified to the NameNode, I suppose)
and the test cases have such a case for 2-replicas asserting that the
two blocks are not on the same rack :-)

-- 
Harsh J
www.harshj.com

Mime
View raw message