dlmarion commented on a change in pull request #1818:
URL: https://github.com/apache/accumulo/pull/1818#discussion_r532910387
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/util/time/SimpleTimer.java
##########
@@ -100,10 +93,19 @@ static int getInstanceThreadPoolSize() {
return instanceThreadPoolSize;
}
- private SimpleTimer(int threadPoolSize) {
+ protected SimpleTimer(int threadPoolSize) {
executor = Executors.newScheduledThreadPool(threadPoolSize,
new
ThreadFactoryBuilder().setNameFormat("SimpleTimer-%d").setDaemon(true)
- .setUncaughtExceptionHandler(new ExceptionHandler()).build());
+
.setUncaughtExceptionHandler(getUncaughtExceptionHandler()).build());
+ }
+
+ protected Thread.UncaughtExceptionHandler getUncaughtExceptionHandler() {
+ return new Thread.UncaughtExceptionHandler() {
+ @Override
+ public void uncaughtException(Thread t, Throwable e) {
+ log.warn("SimpleTimer task failed", e);
+ }
+ };
Review comment:
It looks like this new parameter does not work in all cases.
https://bugs.openjdk.java.net/browse/JDK-8155004.
----------------------------------------------------------------
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]