Hey Vishal, Check out the chooseTarget() method(s) of ReplicationTargetChooser.java in the org.apache.hadoop.hdfs.server.namenode package: http://svn.apache.org/viewvc/hadoop/core/trunk/src/hdfs/org/apache/hadoop/hdfs/server/namenode/ReplicationTargetChooser.java?view=markup .
In words: assuming you're using the default replication level (3), the default strategy will put one block on the local node, one on a node in a remote rack, and another on that same remote rack. Note that HADOOP-3799 (http://issues.apache.org/jira/browse/HADOOP-3799) proposes making this strategy pluggable. As for the example of a topology.script file, I'll let others handle that. Regards, Jeff On Sun, May 10, 2009 at 11:20 PM, Vishal Ghawate < vishal_ghaw...@persistent.co.in> wrote: > > > hi, > i just cant resolve how the namenode decide on where to place the replicas > of the datanode > can u also send me the example of the topology.script.file > and how exactly it works > thanks for referring my problem > > Vishal S. Ghawate > > DISCLAIMER > ========== > This e-mail may contain privileged and confidential information which is > the property of Persistent Systems Ltd. It is intended only for the use of > the individual or entity to which it is addressed. If you are not the > intended recipient, you are not authorized to read, retain, copy, print, > distribute or use this message. If you have received this communication in > error, please notify the sender and delete all copies of this message. > Persistent Systems Ltd. does not accept any liability for virus infected > mails. >