Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9509 +/- ##
============================================
+ Coverage 63.56% 64.55% +0.98%
- Complexity 23489 23571 +82
============================================
Files 3040 2932 -108
Lines 125895 119897 -5998
Branches 17410 16048 -1362
============================================
- Hits 80026 77394 -2632
+ Misses 38673 35519 -3154
+ Partials 7196 6984 -212
Continue to review full report at Codecov.
|
jon-wei
reviewed
Mar 17, 2020
|
|
||
| public Map<String, Long> getPartitionTimeLag(Map<String, String> currentOffsets) | ||
| { | ||
| return partitionResources.entrySet() |
Contributor
There was a problem hiding this comment.
The number of partitions can be on the order of hundreds, would it make sense to avoid streams here for performance (I remember various issues in the past around stream perf)
| protected abstract Map<PartitionIdType, Long> getPartitionRecordLag(); | ||
|
|
||
| /** | ||
| * Gets 'lag'of currently processed offset behind latest offset as a measure of the difference in time inserted. |
| final String offsetToUse; | ||
| if (offset == null || KinesisSupervisor.NOT_SET.equals(offset)) { | ||
| // this should probably check if will start processing earliest or latest rather than assuming earliest | ||
| // if latest we could skip this because latest will not be behing latest so lag is 0. |
…s from kinesis supervisor report since always null, review stuffs
jon-wei
approved these changes
Mar 17, 2020
jihoonson
added a commit
to jihoonson/druid
that referenced
this pull request
May 4, 2020
This reverts commit 142742f.
jihoonson
added a commit
to jihoonson/druid
that referenced
this pull request
May 5, 2020
This reverts commit 142742f.
ccaominh
pushed a commit
to implydata/druid-public
that referenced
this pull request
May 5, 2020
This reverts commit 142742f.
jihoonson
added a commit
that referenced
this pull request
May 5, 2020
clintropolis
added a commit
to implydata/druid-public
that referenced
this pull request
May 19, 2020
This reverts commit 05fbcab.
clintropolis
added a commit
to implydata/druid-public
that referenced
this pull request
May 20, 2020
* Revert "Revert "add kinesis lag metric (apache#9509)" (#88)" This reverts commit 05fbcab. * refactor SeekableStreamSupervisor usage of RecordSupplier (apache#9819) * refactor SeekableStreamSupervisor usage of RecordSupplier to reduce contention between background threads and main thread, refactor KinesisRecordSupplier, refactor Kinesis lag metric collection and emitting * fix style and test * cleanup, refactor, javadocs, test * fixes * keep collecting current offsets and lag if unhealthy in background reporting thread * review stuffs * add comment
Merged
9 tasks
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.
Fixes #6739.
Description
This PR adds an additional set of
SeekableStreamSupervisorlag metrics, based on time in millis behind the latest offsets of the stream, allowing the Kinesis indexing service extension to have a lag metric.scheduleReportingandemitLagwere pushed down fromKafkaSupervisorintoSeekableStreamSupervisor, and two additional abstract methods,getPartitionRecordLagandgetPartitionTimeLagwhich collect the two types of lag metrics per partition of the stream.Kafka's existing lag metrics are still collected in the same format for backwards compatibility.
and the new time metrics have a
/timesuffix.Currently
KafkaSupervisoronly emits the former set of metrics, andKinesisSupervisor, after this PR, will emit only the latter. It seems possible forKafkaSupervisorto emit both sets of metrics, but I will save that for a follow-up PR.Lag is also available on the supervisor status reports:
example kinesis supervisor status report:
example status report with suspended supervisor:
This PR has:
Key changed/added classes in this PR
SeekableStreamSupervisorKafkaSupervisorKinesisSupervisor