opensearch-project / opensearch-project/data-prepper

Add tailing support to the File Source

Open
#602 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

backlog enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.