frostruan commented on a change in pull request #3261:
URL: https://github.com/apache/hbase/pull/3261#discussion_r631734192
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactSplit.java
##########
@@ -794,13 +795,30 @@ void shutdownLongCompactions(){
}
public void clearLongCompactionsQueue() {
+ removeFromFilesCompacting(longCompactions);
longCompactions.getQueue().clear();
}
public void clearShortCompactionsQueue() {
+ removeFromFilesCompacting(shortCompactions);
shortCompactions.getQueue().clear();
}
+ private void removeFromFilesCompacting(ThreadPoolExecutor compactor) {
+ for (Runnable runnable : compactor.getQueue()) {
+ if (!(runnable instanceof CompactionRunner)) {
+ continue;
+ }
+ CompactionRunner runner = (CompactionRunner) runnable;
+ // for system compaction, files selection will be delayed until the
compaction task
+ // actually runs, so compaction context is null for system compaction
+ if (runner.compaction != null) {
+ Collection<HStoreFile> files =
runner.compaction.getRequest().getFiles();
Review comment:
thanks for your advise. I will fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]