diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java index 86c061b735..b2cbc930fc 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/StorageContainerManager.java @@ -759,6 +759,13 @@ public void stop() { } unregisterMXBean(); + // Event queue must be stopped before the DB store is closed at the end. + try { + LOG.info("Stopping SCM Event Queue."); + eventQueue.close(); + } catch (Exception ex) { + LOG.error("SCM Event Queue stop failed", ex); + } IOUtils.cleanupWithLogger(LOG, scmContainerManager); }