Github user HeartSaVioR commented on a diff in the pull request:
https://github.com/apache/storm/pull/2482#discussion_r158762585
--- Diff:
storm-client/src/jvm/org/apache/storm/metric/FileBasedEventLogger.java ---
@@ -59,8 +62,12 @@ private void initLogWriter(Path logFilePath) {
private void setUpFlushTask() {
- ScheduledExecutorService scheduler =
Executors.newSingleThreadScheduledExecutor();
- Runnable task = new Runnable() {
+ ThreadFactory threadFactory = new ThreadFactoryBuilder()
+ .setNameFormat("event-logger-flush-%d")
--- End diff --
@arunmahadevan @satishd
I intended to set daemon as false, since I would like to provide a chance
to shutdown gracefully, via to wait for current running task to be finished
instead of killing immediately.
Typically `shutdownNow()` will trigger interrupt and run() method looks
like be able to handle interrupt (though it will throw RuntimeException).
If we are in favor of guaranteeing JVM shutdown more than graceful
shutdown, I'm happy to change it.
---