[ 
https://issues.apache.org/jira/browse/HDFS-14960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16984147#comment-16984147
 ] 

Ayush Saxena commented on HDFS-14960:
-------------------------------------

[~Jim_Brennan] you can use method {{verifyBlockPlacement(..)}} by providing 
dummy locations, say locations in different rack but in same nodegroup. for 
DefaultBPP the verify result should be true but for NodeGroup BPP that shall be 
false.

You can get to reach to this method by :

{code:java}
  BlockPlacementPolicy replicator = cluster.getNameNode(0).getNamesystem()
          .getBlockManager().getBlockPlacementPolicy();
      replicator.verifyBlockPlacement(locs, numOfReplicas, blockSize, 
storagePolicy)
{code}

Give a check if you can achieve the result by this, if not I will try to find 
some other solution for you.


> TestBalancerWithNodeGroup should not succeed with DFSNetworkTopology
> --------------------------------------------------------------------
>
>                 Key: HDFS-14960
>                 URL: https://issues.apache.org/jira/browse/HDFS-14960
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs
>    Affects Versions: 3.1.3
>            Reporter: Jim Brennan
>            Priority: Minor
>
> As reported in HDFS-14958, TestBalancerWithNodeGroup was succeeding even 
> though it was using DFSNetworkTopology instead of 
> NetworkTopologyWithNodeGroup.
> [~inigoiri] rightly suggested that this indicates the test is not very good - 
> it should fail when run without NetworkTopologyWithNodeGroup.
> We should improve this test.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to