Github user satishd commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2482#discussion_r158760474
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/metric/FileBasedEventLogger.java ---
    @@ -120,8 +127,30 @@ protected String buildLogMessage(EventInfo event) {
         public void close() {
             try {
                 eventLogWriter.close();
    +
             } catch (IOException ex) {
                 LOG.error("Error closing event log.", ex);
             }
    +
    +        closeFlushScheduler();
    +    }
    +
    +    private void closeFlushScheduler() {
    +        if (flushScheduler != null) {
    +            flushScheduler.shutdown();
    +            try {
    +                if (!flushScheduler.awaitTermination(1, TimeUnit.SECONDS)) 
{
    --- End diff --
    
    nit: You may want to have multiple iterations(which can be 2 or more) with 
while loop instead of nested if conditionals.


---

Reply via email to