java.lang.Object
org.apache.hadoop.hbase.favored.TestFavoredNodeAssignmentHelper
@Tag("org.apache.hadoop.hbase.testclassification.MasterTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests")
public class TestFavoredNodeAssignmentHelper
extends Object
Field Summary
Fields
private static final int
private static final org.apache.hadoop.hbase.master.RackManager
private static final Map <String ,List <org.apache.hadoop.hbase.ServerName>>
private static final List <org.apache.hadoop.hbase.ServerName>
Constructor Summary
Constructors
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
private void
private void
checkDuplicateFN (List <org.apache.hadoop.hbase.ServerName> fnList,
org.apache.hadoop.hbase.ServerName genFN)
private void
private void
checkFNRacks (List <org.apache.hadoop.hbase.ServerName> fnList,
org.apache.hadoop.hbase.ServerName genFN)
private void
checkNumRegions (int firstRackSize,
int secondRackSize,
int thirdRackSize,
int regionsOnRack1,
int regionsOnRack2,
int regionsOnRack3)
private static List <org.apache.hadoop.hbase.ServerName>
private void
primaryRSPlacement (int regionCount,
Map <org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName> primaryRSMap,
int firstRackSize,
int secondRackSize,
int thirdRackSize)
printProportions (int firstRackSize,
int secondRackSize,
int thirdRackSize,
int regionsOnRack1,
int regionsOnRack2,
int regionsOnRack3)
private org.apache.hadoop.hbase.util.Triple<Map <org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName>,org.apache.hadoop.hbase.favored.FavoredNodeAssignmentHelper,List <org.apache.hadoop.hbase.client.RegionInfo>>
static void
void
setupEach (org.junit.jupiter.api.TestInfo testInfo)
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
Field Details
servers
private static final List <org.apache.hadoop.hbase.ServerName> servers
rackManager
private static final org.apache.hadoop.hbase.master.RackManager rackManager
Constructor Details
TestFavoredNodeAssignmentHelper
Method Details
setupEach
@BeforeEach
public void setupEach (org.junit.jupiter.api.TestInfo testInfo)
testPlacePrimaryRSAsRoundRobin
testRoundRobinAssignmentsWithUnevenSizedRacks
testSecondaryAndTertiaryPlacementWithSingleRack
testSecondaryAndTertiaryPlacementWithSingleServer
testSecondaryAndTertiaryPlacementWithMultipleRacks
testSecondaryAndTertiaryPlacementWithLessThanTwoServersInRacks
testSecondaryAndTertiaryPlacementWithMoreThanOneServerInPrimaryRack
secondaryAndTertiaryRSPlacementHelper
private org.apache.hadoop.hbase.util.Triple<Map <org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName>,org.apache.hadoop.hbase.favored.FavoredNodeAssignmentHelper,List <org.apache.hadoop.hbase.client.RegionInfo>> secondaryAndTertiaryRSPlacementHelper (int regionCount,
Map <String ,Integer > rackToServerCount)
primaryRSPlacement
private void primaryRSPlacement (int regionCount,
Map <org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName> primaryRSMap,
int firstRackSize,
int secondRackSize,
int thirdRackSize)
checkNumRegions
private void checkNumRegions (int firstRackSize,
int secondRackSize,
int thirdRackSize,
int regionsOnRack1,
int regionsOnRack2,
int regionsOnRack3)
printProportions
private String printProportions (int firstRackSize,
int secondRackSize,
int thirdRackSize,
int regionsOnRack1,
int regionsOnRack2,
int regionsOnRack3)
checkDuplicateFN
private void checkDuplicateFN (List <org.apache.hadoop.hbase.ServerName> fnList,
org.apache.hadoop.hbase.ServerName genFN)
checkFNRacks
private void checkFNRacks (List <org.apache.hadoop.hbase.ServerName> fnList,
org.apache.hadoop.hbase.ServerName genFN)