diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java index 9f0f674325b..36db8313012 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/flush/RegionServerFlushTableProcedureManager.java @@ -282,11 +282,8 @@ public class RegionServerFlushTableProcedureManager extends RegionServerProcedur } // evict remaining tasks and futures from taskPool. - while (!futures.isEmpty()) { - // block to remove cancelled futures; - LOG.warn("Removing cancelled elements from taskPool"); - futures.remove(taskPool.take()); - } + futures.clear(); + while (taskPool.poll() != null) {} stop(); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/snapshot/RegionServerSnapshotManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/snapshot/RegionServerSnapshotManager.java index 4e2c6c2a238..a4fccc66fc1 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/snapshot/RegionServerSnapshotManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/snapshot/RegionServerSnapshotManager.java @@ -360,11 +360,8 @@ public class RegionServerSnapshotManager extends RegionServerProcedureManager { } // evict remaining tasks and futures from taskPool. - while (!futures.isEmpty()) { - // block to remove cancelled futures; - LOG.warn("Removing cancelled elements from taskPool"); - futures.remove(taskPool.take()); - } + futures.clear(); + while (taskPool.poll() != null) {} stop(); }