mirror of https://github.com/apache/nifi.git
NIFI-259: Applied patch for NIFI-1414
This commit is contained in:
parent
6af2d4a342
commit
7ef8af9eea
|
@ -629,7 +629,7 @@ public class TailFile extends AbstractProcessor {
|
|||
}
|
||||
|
||||
final List<File> rolledOffFiles = new ArrayList<>();
|
||||
final DirectoryStream<Path> dirStream = Files.newDirectoryStream(directory.toPath(), rollingPattern);
|
||||
try (final DirectoryStream<Path> dirStream = Files.newDirectoryStream(directory.toPath(), rollingPattern)) {
|
||||
for (final Path path : dirStream) {
|
||||
final File file = path.toFile();
|
||||
final long lastMod = file.lastModified();
|
||||
|
@ -645,6 +645,7 @@ public class TailFile extends AbstractProcessor {
|
|||
|
||||
rolledOffFiles.add(file);
|
||||
}
|
||||
}
|
||||
|
||||
// Sort files based on last modified timestamp. If same timestamp, use filename as a secondary sort, as often
|
||||
// files that are rolled over are given a naming scheme that is lexicographically sort in the same order as the
|
||||
|
|
Loading…
Reference in New Issue