@@ -6364,43 +6364,6 @@ private static Pair<byte[][], byte[][]> getStartEndKeys(List<RegionLocations> re
63646364 return new Pair <>(startKeyList , endKeyList );
63656365 }
63666366
6367- @ Test
6368- public void testGetStartEndKeysWithRegionReplicas () throws IOException {
6369- HTableDescriptor htd = new HTableDescriptor (TableName .valueOf (name .getMethodName ()));
6370- HColumnDescriptor fam = new HColumnDescriptor (FAMILY );
6371- htd .addFamily (fam );
6372- byte [][] KEYS = HBaseTestingUtility .KEYS_FOR_HBA_CREATE_TABLE ;
6373- Admin admin = TEST_UTIL .getAdmin ();
6374- admin .createTable (htd , KEYS );
6375- List <HRegionInfo > regions = admin .getTableRegions (htd .getTableName ());
6376-
6377- HRegionLocator locator =
6378- (HRegionLocator ) admin .getConnection ().getRegionLocator (htd .getTableName ());
6379- for (int regionReplication = 1 ; regionReplication < 4 ; regionReplication ++) {
6380- List <RegionLocations > regionLocations = new ArrayList <>();
6381-
6382- // mock region locations coming from meta with multiple replicas
6383- for (HRegionInfo region : regions ) {
6384- HRegionLocation [] arr = new HRegionLocation [regionReplication ];
6385- for (int i = 0 ; i < arr .length ; i ++) {
6386- arr [i ] = new HRegionLocation (RegionReplicaUtil .getRegionInfoForReplica (region , i ), null );
6387- }
6388- regionLocations .add (new RegionLocations (arr ));
6389- }
6390-
6391- Pair <byte [][], byte [][]> startEndKeys = getStartEndKeys (regionLocations );
6392-
6393- assertEquals (KEYS .length + 1 , startEndKeys .getFirst ().length );
6394-
6395- for (int i = 0 ; i < KEYS .length + 1 ; i ++) {
6396- byte [] startKey = i == 0 ? HConstants .EMPTY_START_ROW : KEYS [i - 1 ];
6397- byte [] endKey = i == KEYS .length ? HConstants .EMPTY_END_ROW : KEYS [i ];
6398- assertArrayEquals (startKey , startEndKeys .getFirst ()[i ]);
6399- assertArrayEquals (endKey , startEndKeys .getSecond ()[i ]);
6400- }
6401- }
6402- }
6403-
64046367 @ Test
64056368 public void testFilterAllRecords () throws IOException {
64066369 Scan scan = new Scan ();
@@ -6745,4 +6708,4 @@ public void testModifyTableWithZeroRegionReplicas() throws Exception {
67456708
67466709 TEST_UTIL .getAdmin ().modifyTable (newDesc );
67476710 }
6748- }
6711+ }
0 commit comments