目录上的FileWatcher

问题描述 投票:0回答:1

我有一个Spark / Scala应用程序,我的要求是在目录中查找文件并处理它,最后清理该目录。

这不可能在spark应用程序本身中这样做

- Watching for a file in a directory
- When it finds the file continue the process 
- Cleans up the directory before ending the app
- Repeat the above for the next new run and so on...

我们目前使用外部应用程序执行此file-watching process,因此为了删除dependency上的third-party application,我们希望在我们的spark / scala应用程序本身中执行此操作。

是否有一个可行的解决方案只使用scala / spark为文件观察者?请指导我。

scala apache-spark
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.