NUTCH-3162 Latency metrics to properly merge data from all threads and tasks#906
Open
lewismc wants to merge 4 commits intoapache:masterfrom
Open
NUTCH-3162 Latency metrics to properly merge data from all threads and tasks#906lewismc wants to merge 4 commits intoapache:masterfrom
lewismc wants to merge 4 commits intoapache:masterfrom
Conversation
lewismc
commented
Mar 11, 2026
| + RANDOM.nextInt()); | ||
|
|
||
| FileOutputFormat.setOutputPath(job, tmp); | ||
| // Driver-level error tracking: categorization + LOG.error only (no job counters; see ErrorTracker Javadoc). |
Member
Author
There was a problem hiding this comment.
I've put this comment in here for the time being. Ultimately I think it is fine to track driver-level errors in memory (via errorTracker) even though they are not written to the MapReduce counter(s). I've documented this behavior in ErrorTracker.java.
Member
Author
|
Refactored tests and introduced |
|
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.


PR for NUTCH-3162 which addresses shortcomings in job-level latency percentiles (p50, p95, p99) for Fetcher, ParseSegment, and Indexer by merging TDigest data from all map tasks and threads and writing counters in a single reducer (or a dedicated merge job for Indexer). It should fix the cases where per-task counters were summed and percentiles were not merged.
This patch touches the following jobs
LATENCY_KEYLATENCY_KEYto partition 0 so one reducer merges all TDigestsLOG.errorand driver-levelErrorTrackercategorization is only run.I think this fixes the issues. Arguably it is more complex than logging to file and performing some ETL to extract metrics from logs however this solution does stick with convention by keeping metrics within the Hadoop ecosystem.
Finally, the PR is complemented with unit tests. This asllowed me to think more about how we can add metrics validation in Nutch but that will come in a separate issue/PR under NUTCH-3131.
Thanks for any review.