Class BlockPlacementPolicyWithNodeGroup


public class BlockPlacementPolicyWithNodeGroup extends BlockPlacementPolicyDefault
The class is responsible for choosing the desired number of targets for placing block replicas on environment with node-group layer. The replica placement strategy is adjusted to: If the writer is on a datanode, the 1st replica is placed on the local node(or local node-group or on local rack), otherwise a random datanode. The 2nd replica is placed on a datanode that is on a different rack with 1st replica node. The 3rd replica is placed on a datanode which is on a different node-group but the same rack as the second replica node.