opensearch-project / opensearch-project/data-prepper
Add tailing support to the File Source
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 374
- Forks
- 355
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
The File source can be useful for users who want to run Data Prepper directly on an application host. Using the file source in a production environment as it is now would not work, however, as it only supports reading a single file completely from start to finish.
Describe the solution you'd like
The File Source should have support for tailing a file as new data comes into it. This can be done by keeping a file as a mini internal database of currently tracked files. This would allow for Data Prepper to be restarted and still be able to keep track of what has already been read from a file. There are a couple of additional features that are required for using the file source in production, such as rotation/deletion of large files and support for multiple file sources at once. However, this issue should be kept solely for adding tail support to the file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the File Source entry point and its existing tests, then read how file reading state is currently handled. Define the persisted tracking behavior for newly appended data and restarts, keeping rotation, deletion, and multiple file sources out of scope. Done means the source tails a file and resumes from the previously tracked position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100