Search in sources :

Example 1 with PairOfSameType

use of org.apache.hadoop.hbase.util.PairOfSameType in project hbase by apache.

the class TestRegionMergeTransactionOnCluster method requestMergeRegion.

private PairOfSameType<HRegionInfo> requestMergeRegion(HMaster master, TableName tablename, int regionAnum, int regionBnum) throws Exception {
    List<Pair<HRegionInfo, ServerName>> tableRegions = MetaTableAccessor.getTableRegionsAndLocations(TEST_UTIL.getConnection(), tablename);
    HRegionInfo regionA = tableRegions.get(regionAnum).getFirst();
    HRegionInfo regionB = tableRegions.get(regionBnum).getFirst();
    ADMIN.mergeRegionsAsync(regionA.getEncodedNameAsBytes(), regionB.getEncodedNameAsBytes(), false);
    return new PairOfSameType<>(regionA, regionB);
}
Also used : HRegionInfo(org.apache.hadoop.hbase.HRegionInfo) PairOfSameType(org.apache.hadoop.hbase.util.PairOfSameType) Pair(org.apache.hadoop.hbase.util.Pair)

Aggregations

HRegionInfo (org.apache.hadoop.hbase.HRegionInfo)1 Pair (org.apache.hadoop.hbase.util.Pair)1 PairOfSameType (org.apache.hadoop.hbase.util.PairOfSameType)1