Package org.apache.hadoop.hbase.thrift
Class THBaseThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.apache.hadoop.hbase.thrift.THBaseThreadPoolExecutor
- All Implemented Interfaces:
Executor
,ExecutorService
A ThreadPoolExecutor customized for working with HBase thrift to update metrics before and after
the execution of a task.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTHBaseThreadPoolExecutor
(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, ThriftMetrics metrics) THBaseThreadPoolExecutor
(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThriftMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterExecute
(Runnable r, Throwable t) protected void
beforeExecute
(Thread t, Runnable r) Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated, toString
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
Field Details
-
metrics
-
-
Constructor Details
-
THBaseThreadPoolExecutor
public THBaseThreadPoolExecutor(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThriftMetrics metrics) -
THBaseThreadPoolExecutor
public THBaseThreadPoolExecutor(int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, ThriftMetrics metrics)
-
-
Method Details
-
beforeExecute
- Overrides:
beforeExecute
in classThreadPoolExecutor
-
afterExecute
- Overrides:
afterExecute
in classThreadPoolExecutor
-