diff --git a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/DistributedReadWriteLock.java b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/DistributedReadWriteLock.java index 2cac30b34c8..e3f7346e4c2 100644 --- a/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/DistributedReadWriteLock.java +++ b/core/src/main/java/org/apache/accumulo/core/fate/zookeeper/DistributedReadWriteLock.java @@ -142,7 +142,8 @@ public void lock() { return; } } catch (InterruptedException ex) { - // ignored + Thread.currentThread().interrupt(); + log.warn("Interrupted while waiting to acquire lock", ex); } } } diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java index 01c7cc7625a..4153e356fe2 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/Admin.java @@ -551,7 +551,8 @@ private static void flushAll(final ClientContext context) { try { flusher.join(3000); } catch (InterruptedException e) { - // ignore + Thread.currentThread().interrupt(); + log.warn("Interrupted while waiting to join Flush thread", e); } while (flusher.isAlive() && System.currentTimeMillis() - start < 15000) { @@ -559,7 +560,8 @@ private static void flushAll(final ClientContext context) { try { flusher.join(1000); } catch (InterruptedException e) { - // ignore + Thread.currentThread().interrupt(); + log.warn("Interrupted while waiting to join Flush thread", e); } if (flushCount == flushesStarted.get()) { @@ -567,6 +569,14 @@ private static void flushAll(final ClientContext context) { break; } } + + flusher.interrupt(); + try { + flusher.join(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + log.warn("Interrupted while waiting to join Flush thread", e); + } } private static void stopServer(final ClientContext context, final boolean tabletServersToo) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java index 2aa1e87aa88..4409602e5ec 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java @@ -306,7 +306,9 @@ private synchronized void startLogMaker() { try { nextLog.offer(t, 12, TimeUnit.HOURS); } catch (InterruptedException ex) { - // ignore + // Throw an Error, not an Exception, so the AccumuloUncaughtExceptionHandler + // will log this then halt the VM. + throw new Error("Next log maker thread interrupted", ex); } continue; @@ -341,7 +343,9 @@ private synchronized void startLogMaker() { try { nextLog.offer(t, 12, TimeUnit.HOURS); } catch (InterruptedException ex) { - // ignore + // Throw an Error, not an Exception, so the AccumuloUncaughtExceptionHandler + // will log this then halt the VM. + throw new Error("Next log maker thread interrupted", ex); } continue; @@ -352,7 +356,9 @@ private synchronized void startLogMaker() { log.info("Our WAL was not used for 12 hours: {}", alog.getLogEntry()); } } catch (InterruptedException e) { - // ignore - server is shutting down + // Throw an Error, not an Exception, so the AccumuloUncaughtExceptionHandler + // will log this then halt the VM. + throw new Error("Next log maker thread interrupted", e); } } });