Search in sources :

Example 11 with FavoredNodesPlan

use of org.apache.hadoop.hbase.favored.FavoredNodesPlan in project hbase by apache.

the class TestRegionPlacement method verifyMETAUpdated.

/**
 * Verify the meta has updated to the latest assignment plan
 * @param expectedPlan the region assignment plan
 * @throws IOException if an IO problem is encountered
 */
private void verifyMETAUpdated(FavoredNodesPlan expectedPlan) throws IOException {
    FavoredNodesPlan planFromMETA = rp.getRegionAssignmentSnapshot().getExistingAssignmentPlan();
    assertTrue("The assignment plan is NOT consistent with the expected plan ", planFromMETA.equals(expectedPlan));
}
Also used : FavoredNodesPlan(org.apache.hadoop.hbase.favored.FavoredNodesPlan)

Aggregations

FavoredNodesPlan (org.apache.hadoop.hbase.favored.FavoredNodesPlan)11 RegionInfo (org.apache.hadoop.hbase.client.RegionInfo)8 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)7 List (java.util.List)7 ServerName (org.apache.hadoop.hbase.ServerName)7 Map (java.util.Map)6 TableName (org.apache.hadoop.hbase.TableName)6 TreeMap (java.util.TreeMap)3 ParseException (org.apache.hbase.thirdparty.org.apache.commons.cli.ParseException)3 IOException (java.io.IOException)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 DecimalFormat (java.text.DecimalFormat)1 Scanner (java.util.Scanner)1 Configuration (org.apache.hadoop.conf.Configuration)1 HBaseConfiguration (org.apache.hadoop.hbase.HBaseConfiguration)1 AsyncRegionServerAdmin (org.apache.hadoop.hbase.client.AsyncRegionServerAdmin)1 UpdateFavoredNodesRequest (org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateFavoredNodesRequest)1 UpdateFavoredNodesResponse (org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.UpdateFavoredNodesResponse)1