Commit 44cdd3e0 authored by yu's avatar yu

start to write the multi dir tree

parent 286c8e2b
......@@ -101,6 +101,11 @@ public class FilenameFileInputPlugin implements FileInputPlugin
public interface PluginTask extends Task
{
@Config("multi_dir")
@ConfigDefault("null")
Optional<List<String>> getMultiDir();
@Config("path_prefix")
String getPathPrefix();
......@@ -157,6 +162,13 @@ public class FilenameFileInputPlugin implements FileInputPlugin
public ConfigDiff transaction(ConfigSource config, FileInputPlugin.Control control)
{
PluginTask task = config.loadConfig(PluginTask.class);
Optional<List<String>> dirlst = task.getMultiDir();
if (dirlst.isPresent()) {
log.info("The list of dir: " + dirlst);
}
// list files recursively
List<String> files = listFiles(task);
......@@ -236,7 +248,6 @@ public class FilenameFileInputPlugin implements FileInputPlugin
log.info("The File order is {}",files);
configDiff.set("last_path", files.get(files.size() - 1));
}
log.info("FileName 3 stop point");
return configDiff;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment