You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/02/01 10:33:25 UTC
[GitHub] [nifi] tpalfy commented on a change in pull request #4792: NIFI-8183 TailFile intermittently creates records with ascii NULL after rollover
tpalfy commented on a change in pull request #4792:
URL: https://github.com/apache/nifi/pull/4792#discussion_r567717333
##########
File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TailFile.java
##########
@@ -1172,19 +1188,28 @@ private boolean recoverRolledFiles(final ProcessContext context, final ProcessSe
final File firstFile = rolledOffFiles.get(0);
final long startNanos = System.nanoTime();
+ final Boolean reReadOnNul = context.getProperty(REREAD_ON_NUL).asBoolean();
if (position > 0) {
- try (final InputStream fis = new FileInputStream(firstFile);
- final CheckedInputStream in = new CheckedInputStream(fis, new CRC32())) {
- StreamUtils.copy(in, new NullOutputStream(), position);
+ try (final FileInputStream fis = new FileInputStream(firstFile)) {
Review comment:
I think we don't need `readLines` here because we already processed to content up to this point.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org