On Thu, Mar 10, 2011 at 9:11 PM, Ayon Sinha <ayonsi...@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