dpol1 opened a new pull request, #1956:
URL: https://github.com/apache/stormcrawler/pull/1956
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. `WARCSpout` already calls `super.open()`, so it gets
the same behaviour without any change.
While moving the code I also fixed a log call that used printf-style `%s`
formatting 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
- [x] Is there a issue associated with this PR? Is it referenced in the
commit message?
- [x] Does your PR title start with `#XXXX` where `XXXX` is the issue number
you are trying to resolve?
- [x] Has your PR been rebased against the latest commit within the target
branch (typically main)?
- [x] Is your initial contribution a single, squashed commit?
- [x] Is the code properly formatted with `mvn git-code-format:format-code
-Dgcf.globPattern="**/*" -Dskip.format.code=false`?
### For code changes
- [x] Have you ensured that the full suite of tests is executed via `mvn
clean verify`?
- [x] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file?
### 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]