From 236d16e3a5611b8ca4f80cb7e8ffd63f167db8e0 Mon Sep 17 00:00:00 2001 From: Nanda kumar Date: Thu, 20 Sep 2018 01:22:18 +0530 Subject: [PATCH] HDDS-507. EventQueue should be shutdown on SCM shutdown. Contributed by Xiaoyu Yao. --- .../hadoop/hdds/scm/server/StorageContainerManager.java | 7 +++++++ 1 file changed, 7 insertions(+) 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); }