diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java index d68668b..841b757 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java @@ -563,15 +563,20 @@ class AsyncProcess { try { incTaskCounters(multiAction.getRegions(), loc.getServerName()); this.pool.submit(runnable); - } catch (RejectedExecutionException ree) { - // This should never happen. But as the pool is provided by the end user, let's secure - // this a little. + } catch (Throwable t) { + if (t instanceof RejectedExecutionException) { + // This should never happen. But as the pool is provided by the end user, let's secure + // this a little. + LOG.warn("#" + id + ", the task was rejected by the pool. This is unexpected." + + " Server is " + loc.getServerName(), t); + } else { + // see #HBASE-14359 for more details + LOG.warn("Caught unexpected exception/error: ", t); + } decTaskCounters(multiAction.getRegions(), loc.getServerName()); - LOG.warn("#" + id + ", the task was rejected by the pool. This is unexpected." + - " Server is " + loc.getServerName(), ree); // We're likely to fail again, but this will increment the attempt counter, so it will // finish. - receiveGlobalFailure(initialActions, multiAction, loc, numAttempt, ree, errorsByServer); + receiveGlobalFailure(initialActions, multiAction, loc, numAttempt, t, errorsByServer); } } }