binlijin created HBASE-8720: ------------------------------- Summary: Only one snapshot region tasks that can run at a time Key: HBASE-8720 URL: https://issues.apache.org/jira/browse/HBASE-8720 Project: HBase Issue Type: Bug Components: snapshots Affects Versions: 0.95.0, 0.94.8 Reporter: binlijin
{code} SnapshotSubprocedurePool(String name, Configuration conf) { // configure the executor service long keepAlive = conf.getLong( RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_KEY, RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT); int threads = conf.getInt(CONCURENT_SNAPSHOT_TASKS_KEY, DEFAULT_CONCURRENT_SNAPSHOT_TASKS); this.name = name; executor = new ThreadPoolExecutor(1, threads, keepAlive, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), new DaemonThreadFactory("rs(" + name + ")-snapshot-pool")); taskPool = new ExecutorCompletionService<Void>(executor); } {code} ThreadPoolExecutor: corePoolSize:1 maximumPoolSize:3 workQueue:LinkedBlockingQueue,unlimited so when a new task submit to the ThreadPoolExecutor, if there is a task is running, the new task is queued in the queue, so all snapshot region tasks execute one by one. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira