I've noticed inconsistencies in the default block placement policy between what one can read on several websites and what is stated in the official documentation.
After digging, I've found out that the proper default placement policy is :
* The replica placement strategy is that if the writer is on a datanode,
* the 1st replica is placed on the local machine,
* otherwise a random datanode. The 2nd replica is placed on a datanode
* that is on a different rack. The 3rd replica is placed on a datanode
* which is on a different node of the rack as the second replica.
HADOOP-5734 has been opened regarding this mistake several years ago and has eventually been merged but unfortunately this fix has been overwritten by Alejandro Abdelnur in SVN commit.