 <p>Yes, it is possible to do so.</p> <p><strong>CAUTION:</strong> Proceed at your own risk. Writing block placement strategy is extremely complicated and risky. It's seems a code smell that your apps need to determine how replicas are placed. Think about if you really really need to write block placement strategies. Having warned you, proceed if you want to know how to accomplish this. Typically this feature is used to control how well balanced a cluster is. E.g. one of the strategies that was built by one of the Hadoop vendors is to place blocks on the disk with the lowest percentage disk used.</p> <p>Here's a bunch of resources for you to check out:</p> <ol> <li>SO post with the same problem: <a href="http://stackoverflow.com/questions/14494179/modifying-the-block-placement-strategy-of-hdfs">Modifying the block placement strategy of HDFS</a></li> <li>Another SO: <a href="http://stackoverflow.com/questions/13129599/how-does-hdfs-choose-a-datanode-to-store">how does hdfs choose a datanode to store</a></li> <li>Blog from 2009 when the feature was first released: <a href="http://hadoopblog.blogspot.com/2009/09/hdfs-block-replica-placement-in-your.html" rel="nofollow">http://hadoopblog.blogspot.com/2009/09/hdfs-block-replica-placement-in-your.html</a></li> </ol>