private void cleanServerCache(ServerName server, Throwable regionException) { if (ClientExceptionsUtil.isMetaClearingException(regionException)) { // We want to make sure to clear the cache in case there were location-related exceptions. // We don't to clear the cache for every possible exception that comes through, however. asyncProcess.connection.clearCaches(server); } }
static void updateCachedLocationOnError(HRegionLocation loc, Throwable exception, Function<HRegionLocation, HRegionLocation> cachedLocationSupplier, Consumer<HRegionLocation> addToCache, Consumer<HRegionLocation> removeFromCache) { HRegionLocation oldLoc = cachedLocationSupplier.apply(loc); LOG.debug("Try updating {} , the old value is {}", loc, oldLoc, exception); if (!canUpdateOnError(loc, oldLoc)) { return; } Throwable cause = findException(exception); LOG.debug("The actual exception when updating {}", loc, cause); if (cause == null || !isMetaClearingException(cause)) { LOG.debug("Will not update {} because the exception is null or not the one we care about", loc); return; } if (cause instanceof RegionMovedException) { RegionMovedException rme = (RegionMovedException) cause; HRegionLocation newLoc = new HRegionLocation(loc.getRegion(), rme.getServerName(), rme.getLocationSeqNum()); LOG.debug("Try updating {} with the new location {} constructed by {}", loc, newLoc, rme); addToCache.accept(newLoc); } else { LOG.debug("Try removing {} from cache", loc); removeFromCache.accept(loc); } }
ClientExceptionsUtil.isMetaClearingException(t) ? null : t); for (Action action : e.getValue()) { Retry retry = manageError(
Throwable cause = ClientExceptionsUtil.findException(exception); if (cause != null) { if (!ClientExceptionsUtil.isMetaClearingException(cause)) {
} catch (IOException ex) { if (ClientExceptionsUtil.isMetaClearingException(ex) || success) { exp = ex; if (exp != null && ClientExceptionsUtil.isMetaClearingException(exp)) { assertNull(conn.getCachedLocation(TABLE_NAME, row)); } else if (success) {
private void cleanServerCache(ServerName server, Throwable regionException) { if (tableName == null && ClientExceptionsUtil.isMetaClearingException(regionException)) { // For multi-actions, we don't have a table name, but we want to make sure to clear the // cache in case there were location-related exceptions. We don't to clear the cache // for every possible exception that comes through, however. asyncProcess.connection.clearCaches(server); } }
LOG.debug("The actual exception when updating " + loc, cause); if (cause == null || !isMetaClearingException(cause)) { if (LOG.isDebugEnabled()) { LOG.debug(
ClientExceptionsUtil.isMetaClearingException(t) ? null : t); for (Action action : e.getValue()) { Retry retry = manageError(
Throwable cause = ClientExceptionsUtil.findException(exception); if (cause != null) { if (!ClientExceptionsUtil.isMetaClearingException(cause)) {
private void cleanServerCache(ServerName server, Throwable regionException) { if (tableName == null && ClientExceptionsUtil.isMetaClearingException(regionException)) { // For multi-actions, we don't have a table name, but we want to make sure to clear the // cache in case there were location-related exceptions. We don't to clear the cache // for every possible exception that comes through, however. asyncProcess.connection.clearCaches(server); } }
LOG.debug("The actual exception when updating " + loc, cause); if (cause == null || !isMetaClearingException(cause)) { if (LOG.isDebugEnabled()) { LOG.debug(
ClientExceptionsUtil.isMetaClearingException(t) ? null : t); for (Action action : e.getValue()) { Retry retry = manageError(
Throwable cause = ClientExceptionsUtil.findException(exception); if (cause != null) { if (!ClientExceptionsUtil.isMetaClearingException(cause)) {
} catch (IOException ex) { if (ClientExceptionsUtil.isMetaClearingException(ex) || success) { exp = ex; if (exp != null && ClientExceptionsUtil.isMetaClearingException(exp)) { assertNull(conn.getCachedLocation(TABLE_NAME, row)); } else if (success) {
Throwable cause = ClientExceptionsUtil.findException(exception); if (cause != null) { if (!ClientExceptionsUtil.isMetaClearingException(cause)) {