Class RegionServerFlushTableProcedureManager.FlushTableSubprocedurePool
java.lang.Object
org.apache.hadoop.hbase.procedure.flush.RegionServerFlushTableProcedureManager.FlushTableSubprocedurePool
- Enclosing class:
- RegionServerFlushTableProcedureManager
We use the FlushTableSubprocedurePool, a class specific thread pool instead of
ExecutorService
. It uses a
ExecutorCompletionService
which provides queuing of completed
tasks which lets us efficiently cancel pending tasks upon the earliest operation failures.-
Field Summary
-
Constructor Summary
ConstructorDescriptionFlushTableSubprocedurePool
(String name, org.apache.hadoop.conf.Configuration conf, Abortable abortable) -
Method Summary
Modifier and TypeMethodDescription(package private) void
This attempts to cancel out all pending and in progress tasks.(package private) boolean
hasTasks()
(package private) void
stop()
Gracefully shutdown the thread pool.(package private) void
submitTask
(Callable<Void> task) Submit a task to the pool.(package private) boolean
Wait for all of the currently outstanding tasks submitted viasubmitTask(Callable)
.
-
Field Details
-
abortable
-
taskPool
-
executor
-
stopped
-
futures
-
name
-
-
Constructor Details
-
FlushTableSubprocedurePool
FlushTableSubprocedurePool(String name, org.apache.hadoop.conf.Configuration conf, Abortable abortable)
-
-
Method Details
-
hasTasks
boolean hasTasks() -
submitTask
Submit a task to the pool. NOTE: all must be submitted before you can safelywaitForOutstandingTasks()
. -
waitForOutstandingTasks
Wait for all of the currently outstanding tasks submitted viasubmitTask(Callable)
. This *must* be called after all tasks are submitted via submitTask.- Returns:
- true on success, false otherwise
- Throws:
ForeignException
InterruptedException
-
cancelTasks
This attempts to cancel out all pending and in progress tasks. Does not interrupt the running tasks itself. An ongoing HRegion.flush() should not be interrupted (see HBASE-13877).- Throws:
InterruptedException
-
stop
void stop()Gracefully shutdown the thread pool. An ongoing HRegion.flush() should not be interrupted (see HBASE-13877)
-