#1955 - Make FileSpout work in distributed mode#1956
Merged
Merged
Conversation
jnioche
reviewed
Jun 18, 2026
jnioche
left a comment
Contributor
There was a problem hiding this comment.
looks good, a few minor suggestions
rzo1
approved these changes
Jun 18, 2026
Contributor
|
Thanks @dpol1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FileSpout read the seed directory and filled its input queue inside the constructor. In distributed mode the constructor runs only on the client that submits the topology, so the resolved queue (usually empty, since the seed files live on the workers) was serialised and shipped out. The spout then sat idle with no activity in the logs.
The constructors now only keep the values they are given: the directory and filter, or the explicit file list. The seeds are resolved in
open(), which runs on each worker.WARCSpoutalready callssuper.open(), so it gets the same behaviour without any change.While moving the code I also fixed a log call that used printf-style
%sformatting instead of SLF4J{}placeholders.Tests: a regression test builds the spout against an empty directory and creates the seed file only after construction, before
open(). It fails on the old code and passes now. There is also a directory happy-path test and a serialisation round-trip.Closes #1955
For all changes
Is there a issue associated with this PR? Is it referenced in the commit message?
Does your PR title start with
#XXXXwhereXXXXis the issue number you are trying to resolve?Has your PR been rebased against the latest commit within the target branch (typically main)?
Is your initial contribution a single, squashed commit?
Is the code properly formatted with
mvn git-code-format:format-code -Dgcf.globPattern="**/*" -Dskip.format.code=false?For code changes
mvn clean verify?Note
Please ensure that once the PR is submitted, you check GitHub Actions for build issues and submit an update to your PR as soon as possible.