public class TestFavoredNodeAssignmentHelper extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static int |
MAX_ATTEMPTS |
org.junit.rules.TestName |
name |
private static org.apache.hadoop.hbase.master.RackManager |
rackManager |
private static Map<String,List<org.apache.hadoop.hbase.ServerName>> |
rackToServers |
private static List<org.apache.hadoop.hbase.ServerName> |
servers |
Constructor and Description |
---|
TestFavoredNodeAssignmentHelper() |
Modifier and Type | Method and Description |
---|---|
private void |
checkDuplicateFN(List<org.apache.hadoop.hbase.ServerName> fnList) |
private void |
checkDuplicateFN(List<org.apache.hadoop.hbase.ServerName> fnList,
org.apache.hadoop.hbase.ServerName genFN) |
private void |
checkFNRacks(List<org.apache.hadoop.hbase.ServerName> fnList) |
private void |
checkFNRacks(List<org.apache.hadoop.hbase.ServerName> fnList,
org.apache.hadoop.hbase.ServerName genFN) |
private void |
checkNumRegions(int regionCount,
int firstRackSize,
int secondRackSize,
int thirdRackSize,
int regionsOnRack1,
int regionsOnRack2,
int regionsOnRack3,
Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> assignmentMap) |
private static List<org.apache.hadoop.hbase.ServerName> |
getServersFromRack(Map<String,Integer> rackToServerCount) |
private void |
primaryRSPlacement(int regionCount,
Map<org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName> primaryRSMap,
int firstRackSize,
int secondRackSize,
int thirdRackSize) |
private String |
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>> |
secondaryAndTertiaryRSPlacementHelper(int regionCount,
Map<String,Integer> rackToServerCount) |
static void |
setupBeforeClass() |
void |
testConstrainedPlacement() |
void |
testGenMissingFavoredNodeMultiRack() |
void |
testGenMissingFavoredNodeOneRack() |
void |
testGetFavoredNodes() |
void |
testGetOneRandomRack() |
void |
testGetRandomServerMultiRack() |
void |
testGetRandomServerSingleRack() |
void |
testPlacePrimaryRSAsRoundRobin() |
void |
testRoundRobinAssignmentsWithUnevenSizedRacks() |
void |
testSecondaryAndTertiaryPlacementWithLessThanTwoServersInRacks() |
void |
testSecondaryAndTertiaryPlacementWithMoreThanOneServerInPrimaryRack() |
void |
testSecondaryAndTertiaryPlacementWithMultipleRacks() |
void |
testSecondaryAndTertiaryPlacementWithSingleRack() |
void |
testSecondaryAndTertiaryPlacementWithSingleServer() |
void |
testSmallCluster() |
public static final HBaseClassTestRule CLASS_RULE
private static Map<String,List<org.apache.hadoop.hbase.ServerName>> rackToServers
private static org.apache.hadoop.hbase.master.RackManager rackManager
private static final int MAX_ATTEMPTS
public org.junit.rules.TestName name
public TestFavoredNodeAssignmentHelper()
public static void setupBeforeClass() throws Exception
Exception
private static List<org.apache.hadoop.hbase.ServerName> getServersFromRack(Map<String,Integer> rackToServerCount)
public void testSmallCluster()
public void testPlacePrimaryRSAsRoundRobin()
public void testRoundRobinAssignmentsWithUnevenSizedRacks()
public void testSecondaryAndTertiaryPlacementWithSingleRack()
public void testSecondaryAndTertiaryPlacementWithSingleServer()
public void testSecondaryAndTertiaryPlacementWithMultipleRacks()
public void testSecondaryAndTertiaryPlacementWithLessThanTwoServersInRacks()
public void testSecondaryAndTertiaryPlacementWithMoreThanOneServerInPrimaryRack()
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)
private void primaryRSPlacement(int regionCount, Map<org.apache.hadoop.hbase.client.RegionInfo,org.apache.hadoop.hbase.ServerName> primaryRSMap, int firstRackSize, int secondRackSize, int thirdRackSize)
private void checkNumRegions(int regionCount, int firstRackSize, int secondRackSize, int thirdRackSize, int regionsOnRack1, int regionsOnRack2, int regionsOnRack3, Map<org.apache.hadoop.hbase.ServerName,List<org.apache.hadoop.hbase.client.RegionInfo>> assignmentMap)
private String printProportions(int firstRackSize, int secondRackSize, int thirdRackSize, int regionsOnRack1, int regionsOnRack2, int regionsOnRack3)
public void testConstrainedPlacement() throws Exception
Exception
public void testGetOneRandomRack() throws IOException
IOException
public void testGetRandomServerSingleRack() throws IOException
IOException
public void testGetRandomServerMultiRack() throws IOException
IOException
public void testGetFavoredNodes() throws IOException
IOException
public void testGenMissingFavoredNodeOneRack() throws IOException
IOException
public void testGenMissingFavoredNodeMultiRack() throws IOException
IOException
private void checkDuplicateFN(List<org.apache.hadoop.hbase.ServerName> fnList, org.apache.hadoop.hbase.ServerName genFN)
private void checkDuplicateFN(List<org.apache.hadoop.hbase.ServerName> fnList)
private void checkFNRacks(List<org.apache.hadoop.hbase.ServerName> fnList, org.apache.hadoop.hbase.ServerName genFN)
private void checkFNRacks(List<org.apache.hadoop.hbase.ServerName> fnList)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.