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_r257327861
########## 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. Review comment: Should we do a null check on `removed` just for our own sanity? ---------------------------------------------------------------- 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