final byte[] startKey = keys.getFirst()[i]; final byte[] endKey = keys.getSecond()[i]; final String regionLocation = table.getRegionLocator().getRegionLocation(startKey, false).getHostnamePort();
TableSplit split = new TableSplit(tableName, scan, HConstants.EMPTY_BYTE_ARRAY, HConstants.EMPTY_BYTE_ARRAY, regLoc .getHostnamePort().split(Addressing.HOSTNAME_PORT_SEPARATOR)[0], regionSize); splits.add(split); return splits;
averageCalcCount += averageComponents.getValue(); this.serverToBufferedCounterMap.put(addr.getHostnamePort(), bufferedCounter); this.serverToFailedCounterMap .put(addr.getHostnamePort(), failedCounter); this.serverToAverageLatencyMap.put(addr.getHostnamePort(), serverAvgLatency); this.serverToMaxLatencyMap .put(addr.getHostnamePort(), serverMaxLatency);
+ addr.getHostnamePort(), arf.getErrors()); + addr.getHostnamePort() + " and " + failedCount + " failed" + ", latency for this send: " + elapsed); + addr.getHostnamePort(), e); } catch (Exception e) { if (e instanceof InterruptedException) { + addr.getHostnamePort(), e); } finally {
/** @return the server name * @deprecated Just use {@link #toString()} instead. */ public String getServerName() { if (location == null) return null; return location.getHostnamePort(); }
/** * Constructs a new HBaseFijiRegion backed by an HRegionInfo. * * @param hRegionInfo The underlying HRegionInfo. * @param locations The HRegionLocations that this region spans. */ HBaseFijiRegion(HRegionInfo hRegionInfo, List<HRegionLocation> locations) { mHRegionInfo = hRegionInfo; Builder<String> locationsBuilder = ImmutableList.builder(); for (HRegionLocation hLocation : locations) { locationsBuilder.add(hLocation.getHostnamePort()); } mRegionLocations = locationsBuilder.build(); }
private void clearCachedLocationForServer(final String server) { boolean deletedSomething = false; synchronized (this.cachedRegionLocations) { if (!cachedServers.contains(server)) { return; } for (Map<byte[], HRegionLocation> tableLocations : cachedRegionLocations.values()) { for (Entry<byte[], HRegionLocation> e : tableLocations.entrySet()) { if (e.getValue().getHostnamePort().equals(server)) { tableLocations.remove(e.getKey()); deletedSomething = true; } } } cachedServers.remove(server); } if (deletedSomething && LOG.isDebugEnabled()) { LOG.debug("Removed all cached region locations that map to " + server); } }
private void cacheLocation(final byte [] tableName, final HRegionLocation location) { byte [] startKey = location.getRegionInfo().getStartKey(); Map<byte [], HRegionLocation> tableLocations = getTableLocations(tableName); boolean hasNewCache = false; synchronized (this.cachedRegionLocations) { cachedServers.add(location.getHostnamePort()); hasNewCache = (tableLocations.put(startKey, location) == null); } if (hasNewCache) { LOG.debug("Cached location for " + location.getRegionInfo().getRegionNameAsString() + " is " + location.getHostnamePort()); } }
averageCalcCount += averageComponents.getValue(); this.serverToBufferedCounterMap.put(addr.getHostnamePort(), bufferedCounter); this.serverToFailedCounterMap .put(addr.getHostnamePort(), failedCounter); this.serverToAverageLatencyMap.put(addr.getHostnamePort(), serverAvgLatency); this.serverToMaxLatencyMap .put(addr.getHostnamePort(), serverMaxLatency);
averageCalcCount += averageComponents.getValue(); this.serverToBufferedCounterMap.put(addr.getHostnamePort(), bufferedCounter); this.serverToFailedCounterMap .put(addr.getHostnamePort(), failedCounter); this.serverToAverageLatencyMap.put(addr.getHostnamePort(), serverAvgLatency); this.serverToMaxLatencyMap .put(addr.getHostnamePort(), serverMaxLatency);
+ addr.getHostnamePort(), arf.getErrors()); + addr.getHostnamePort() + " and " + failedCount + " failed" + ", latency for this send: " + elapsed); + addr.getHostnamePort(), e); } catch (Exception e) { if (e instanceof InterruptedException) { + addr.getHostnamePort(), e); } finally {
+ addr.getHostnamePort(), arf.getErrors()); + addr.getHostnamePort() + " and " + failedCount + " failed" + ", latency for this send: " + elapsed); + addr.getHostnamePort(), e); } catch (Exception e) { if (e instanceof InterruptedException) { + addr.getHostnamePort(), e); } finally {
getConnection().clearCaches(hrl.getHostnamePort());
final byte[] startKey = keys.getFirst()[i]; final byte[] endKey = keys.getSecond()[i]; final String regionLocation = table.getRegionLocator().getRegionLocation(startKey, false).getHostnamePort();
final byte[] startKey = keys.getFirst()[i]; final byte[] endKey = keys.getSecond()[i]; final String regionLocation = table.getRegionLocator().getRegionLocation(startKey, false).getHostnamePort();
HConstants.EMPTY_BYTE_ARRAY, regLoc.getHostnamePort().split( Addressing.HOSTNAME_PORT_SEPARATOR)[0], regionSize); splits.add(split);
InputSplit split = new TableSplit(table.getTableName(), HConstants.EMPTY_BYTE_ARRAY, HConstants.EMPTY_BYTE_ARRAY, regLoc .getHostnamePort().split(Addressing.HOSTNAME_PORT_SEPARATOR)[0]); splits.add(split); return splits;
TableSplit split = new TableSplit(tableName, scan, HConstants.EMPTY_BYTE_ARRAY, HConstants.EMPTY_BYTE_ARRAY, regLoc .getHostnamePort().split(Addressing.HOSTNAME_PORT_SEPARATOR)[0], regionSize); splits.add(split); return splits;
TableSplit split = new TableSplit(tableName, scan, HConstants.EMPTY_BYTE_ARRAY, HConstants.EMPTY_BYTE_ARRAY, regLoc .getHostnamePort().split(Addressing.HOSTNAME_PORT_SEPARATOR)[0], regionSize); splits.add(split); return splits;
TableSplit split = new TableSplit(table.getName(), HConstants.EMPTY_BYTE_ARRAY, HConstants.EMPTY_BYTE_ARRAY, regLoc .getHostnamePort().split(Addressing.HOSTNAME_PORT_SEPARATOR)[0], regionSize); splits.add(split); return splits;