void updateCachedLocation(HRegionLocation loc, Throwable exception) { if (loc.getRegionInfo().isMetaTable()) { metaRegionLocator.updateCachedLocation(loc, exception); } else { nonMetaRegionLocator.updateCachedLocation(loc, exception); } }
void clearCache(TableName tableName) { if (LOG.isDebugEnabled()) { LOG.debug("Clear meta cache for " + tableName); } if (tableName.equals(META_TABLE_NAME)) { metaRegionLocator.clearCache(); } else { nonMetaRegionLocator.clearCache(tableName); } }
CompletableFuture<HRegionLocation> getRegionLocation( TableName tableName, byte[] row, RegionLocateType type, long timeoutNs) { // meta region can not be split right now so we always call the same method. // Change it later if the meta table can have more than one regions. CompletableFuture<HRegionLocation> future = tableName.equals(META_TABLE_NAME) ? metaRegionLocator.getRegionLocation() : nonMetaRegionLocator.getRegionLocation(tableName, row, type); return withTimeout( future, timeoutNs, () -> "Timeout(" + TimeUnit.NANOSECONDS.toMillis(timeoutNs) + "ms) waiting for region location for " + tableName + ", row='" + Bytes.toStringBinary(row) + "'"); }