@Override public List<THRegionLocation> getAllRegionLocations(ByteBuffer table) throws TIOError, TException { RegionLocator locator = null; try { locator = getLocator(table); return ThriftUtilities.regionLocationsFromHBase(locator.getAllRegionLocations()); } catch (IOException e) { throw getTIOError(e); } finally { if (locator != null) { try { locator.close(); } catch (IOException e) { LOG.warn("Couldn't close the locator.", e); } } } }
@Override public THRegionLocation getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload) throws TIOError, TException { RegionLocator locator = null; try { locator = getLocator(table); byte[] rowBytes = byteBufferToByteArray(row); HRegionLocation hrl = locator.getRegionLocation(rowBytes, reload); return ThriftUtilities.regionLocationFromHBase(hrl); } catch (IOException e) { throw getTIOError(e); } finally { if (locator != null) { try { locator.close(); } catch (IOException e) { LOG.warn("Couldn't close the locator.", e); } } } }
@Override public List<THRegionLocation> getAllRegionLocations(ByteBuffer table) throws TIOError, TException { RegionLocator locator = null; try { locator = getLocator(table); return ThriftUtilities.regionLocationsFromHBase(locator.getAllRegionLocations()); } catch (IOException e) { throw getTIOError(e); } finally { if (locator != null) { try { locator.close(); } catch (IOException e) { LOG.warn("Couldn't close the locator.", e); } } } }
@Override public List<THRegionLocation> getAllRegionLocations(ByteBuffer table) throws TIOError, TException { RegionLocator locator = null; try { locator = getLocator(table); return ThriftUtilities.regionLocationsFromHBase(locator.getAllRegionLocations()); } catch (IOException e) { throw getTIOError(e); } finally { if (locator != null) { try { locator.close(); } catch (IOException e) { LOG.warn("Couldn't close the locator.", e); } } } }
@Override public THRegionLocation getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload) throws TIOError, TException { RegionLocator locator = null; try { locator = getLocator(table); byte[] rowBytes = byteBufferToByteArray(row); HRegionLocation hrl = locator.getRegionLocation(rowBytes, reload); return ThriftUtilities.regionLocationFromHBase(hrl); } catch (IOException e) { throw getTIOError(e); } finally { if (locator != null) { try { locator.close(); } catch (IOException e) { LOG.warn("Couldn't close the locator.", e); } } } }
@Override public THRegionLocation getRegionLocation(ByteBuffer table, ByteBuffer row, boolean reload) throws TIOError, TException { RegionLocator locator = null; try { locator = getLocator(table); byte[] rowBytes = byteBufferToByteArray(row); HRegionLocation hrl = locator.getRegionLocation(rowBytes, reload); return ThriftUtilities.regionLocationFromHBase(hrl); } catch (IOException e) { throw getTIOError(e); } finally { if (locator != null) { try { locator.close(); } catch (IOException e) { LOG.warn("Couldn't close the locator.", e); } } } }