This reverts commit a12f4c90a5, reversing
changes made to 34f08df86b.
This commit is contained in:
o0Shark0o
2025-12-31 16:19:19 +08:00
parent a12f4c90a5
commit cbed6fbcd7
5 changed files with 35 additions and 11 deletions

View File

@@ -69,14 +69,12 @@ public class NfsReader extends Reader {
private Configuration jobConfig;
private String mountPoint;
private Set<String> fileType;
private List<String> files;
@Override
public void init() {
this.jobConfig = super.getPluginJobConf();
this.mountPoint = this.jobConfig.getString("mountPoint");
this.fileType = new HashSet<>(this.jobConfig.getList("fileType", Collections.emptyList(), String.class));
this.files = this.jobConfig.getList("files", Collections.emptyList(), String.class);
}
@Override
@@ -85,7 +83,6 @@ public class NfsReader extends Reader {
List<String> files = stream.filter(Files::isRegularFile)
.filter(file -> fileType.isEmpty() || fileType.contains(getFileSuffix(file)))
.map(path -> path.getFileName().toString())
.filter(fileName -> this.files.isEmpty() || this.files.contains(fileName))
.collect(Collectors.toList());
files.forEach(filePath -> {
Record record = recordSender.createRecord();