Improve fault tolerance: handle parse errors, fix logging, and minor cleanup #1931
Merged
Conversation
- FetcherBolt: catch NumberFormatException for crawl delay and max thread
metadata values; log warning and fall back to defaults
- ConfigurableTopology, URLFilters: replace e.printStackTrace() with
SLF4J LOG.error()
- CloudSearchUtils: fix error message ("must be" -> "must NOT be");
replace manual MessageDigest with DigestUtils.sha512Hex()
- S3CacheChecker, S3Cacher: use StandardCharsets.UTF_8 overload of
URLEncoder.encode() to remove unnecessary checked exception
- JsRenderingDetector: use CharsetIdentification.getCharsetFast() instead
of hardcoded UTF-8
rzo1
approved these changes
Jun 4, 2026
jnioche
approved these changes
Jun 5, 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.
A collection of small but concrete correctness and robustness improvements.
FetcherBolt: catchNumberFormatExceptionwhen parsing crawl delay andmax thread values from metadata; log a warning and fall back to defaults
instead of crashing the bolt
ConfigurableTopology,URLFilters: replacee.printStackTrace()withproper SLF4J
LOG.error()callsCloudSearchUtils: fix misleading error message ("must be score" →"must NOT be score"); replace manual
MessageDigestboilerplate withDigestUtils.sha512Hex()S3CacheChecker,S3Cacher: use theStandardCharsets.UTF_8overload ofURLEncoder.encode()to remove an unnecessary checked exceptionJsRenderingDetector: useCharsetIdentification.getCharsetFast()todetect the actual document charset instead of hardcoding UTF-8