Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
0.94.8, 0.95.0
-
None
-
None
Description
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); }
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.