nickwallen commented on a change in pull request #1338: METRON-2005: Batch Writer writes 0-byte files to HDFS on rotation URL: https://github.com/apache/metron/pull/1338#discussion_r257327514
########## File path: metron-platform/metron-writer/src/main/java/org/apache/metron/writer/hdfs/SourceHandlerCallback.java ########## @@ -29,7 +34,10 @@ } public void removeKey() { - sourceHandlerMap.remove(key); + SourceHandler removed = sourceHandlerMap.remove(key); + removed.close(); // If it's getting removed, we want to close it to ensure things like Timers are ended. + LOG.debug("Removed {} -> {}", key, removed); + LOG.debug("Current state of sourceHandlerMap: {}", sourceHandlerMap); Review comment: Would it make sense to just push this into a single log statement? I'm worried that out-of-order logging would make it difficult to connect the dots that after I removed X, the current state is Y. If its one statement, you don't have that potential problem. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services