tmgstevens commented on code in PR #367: URL: https://github.com/apache/flume/pull/367#discussion_r851552888
########## flume-ng-sources/flume-taildir-source/src/main/java/org/apache/flume/source/taildir/ReliableTaildirEventReader.java: ########## @@ -92,8 +92,11 @@ private ReliableTaildirEventReader(Map<String, String> filePaths, this.fileNameHeader = fileNameHeader; updateTailFiles(skipToEnd); - logger.info("Updating position from position file: " + positionFilePath); - loadPositionFile(positionFilePath); + File positionFile = new File(positionFilePath); + if (positionFile.exists() && positionFile.isFile() && positionFile.length() != 0) { + logger.info("Updating position from position file: " + positionFilePath); + loadPositionFile(positionFilePath); + } Review Comment: Perhaps we should log a warning in the else condition? -- 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. To unsubscribe, e-mail: dev-unsubscr...@flume.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org