ivakegg commented on a change in pull request #1622:
URL: https://github.com/apache/accumulo/pull/1622#discussion_r444332545
##########
File path:
core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java
##########
@@ -28,15 +28,16 @@
*/
public class SimpleThreadPool extends ThreadPoolExecutor {
- public SimpleThreadPool(int max, final String name) {
- super(max, max, 4L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
+ public SimpleThreadPool(int coreAndMax, boolean allowCoreThreadTimeOut,
final String name) {
+ super(coreAndMax, coreAndMax, 4L, TimeUnit.SECONDS, new
LinkedBlockingQueue<>(),
new NamingThreadFactory(name));
- allowCoreThreadTimeOut(true);
+ allowCoreThreadTimeOut(allowCoreThreadTimeOut);
}
- public SimpleThreadPool(int max, final String name, BlockingQueue<Runnable>
queue) {
- super(max, max, 4L, TimeUnit.SECONDS, queue, new
NamingThreadFactory(name));
- allowCoreThreadTimeOut(true);
+ public SimpleThreadPool(int coreAndMax, boolean allowCoreThreadTimeOut,
final String name,
+ BlockingQueue<Runnable> queue) {
+ super(coreAndMax, coreAndMax, 4L, TimeUnit.SECONDS, queue, new
NamingThreadFactory(name));
Review comment:
I changed this to TIMEOUT_SECS with a value of 180. I am wondering
whether this should be configurable as well. @keith-turner thoughts?
----------------------------------------------------------------
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]