Java Code Examples for org.apache.hadoop.hbase.HBaseTestingUtility#KEYS_FOR_HBA_CREATE_TABLE

The following examples show how to use org.apache.hadoop.hbase.HBaseTestingUtility#KEYS_FOR_HBA_CREATE_TABLE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestAsyncTableLocatePrefetch.java    From hbase with Apache License 2.0 5 votes vote down vote up
@Test
public void test() throws InterruptedException, ExecutionException {
  assertNotNull(LOCATOR.getRegionLocations(TABLE_NAME, Bytes.toBytes("zzz"),
    RegionReplicaUtil.DEFAULT_REPLICA_ID, RegionLocateType.CURRENT, false).get());
  // we finish the request before we adding the remaining results to cache so sleep a bit here
  Thread.sleep(1000);
  // confirm that the locations of all the regions have been cached.
  assertNotNull(LOCATOR.getRegionLocationInCache(TABLE_NAME, Bytes.toBytes("aaa")));
  for (byte[] row : HBaseTestingUtility.KEYS_FOR_HBA_CREATE_TABLE) {
    assertNotNull(LOCATOR.getRegionLocationInCache(TABLE_NAME, row));
  }
}