Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADAPT1 - 1543] | Internal Consumer Endpoint - Enhance to Check Lag | Remove Partition With No Data | Send Notification Having Lag Percentage | Unit Test #25

Merged
merged 6 commits into from
May 24, 2024

Conversation

abhivermaaa
Copy link

@abhivermaaa abhivermaaa commented May 21, 2024

[ADAPT1 - 1543] | Internal Consumer Endpoint - Enhance to Check Lag | Remove Partition With No Data | Send Notification Having Lag Percentage | Unit Test

Description :
We need to calculate lag on the topic “_hydra.consumer-groups” . We don’t commit offset for this internal topic. So, In order to calculate lag on this topic, we need to have committed offsets for which we have created a new stream named as “offset stream”.

With the offset stream, we created an consumer group offset facade which should hold all partition level offsets. We created a new endpoint : “v2/consumer-groups/hydra-internal-topic” for returning the partition level offset data for “_hydra.consumer-groups” which will take offsets from consumer group storage facade.

This PR contains code changes for :

  1. removing partition data from response which are not having any records
  2. calculating the partition level lag for all the partitions which are having records
  3. calculating the total lag by consolidating all partition’s data
  4. sending the notification to the provided channel in “HYDRA_SYSTEM_NOTIFICATION_SLACK_CHANNEL“ having lag percentage
  5. adding all the unit test scenarios for this new endpoint

Jira Link :
https://pluralsight.atlassian.net/browse/ADAPT1-1543

…ata from cache | optimized the method | Added code to remove the partitions having 0 latest offset | partition level lag is calucalted properly
…Added marshalling logic for new case object in ingestors/kafka/src/main/scala/hydra/kafka/marshallers/ConsumerGroupMarshallers.scala
@abhivermaaa abhivermaaa changed the base branch from master to feature-notification-subscribertab May 21, 2024 18:49
@abhivermaaa abhivermaaa changed the title Adapt1 1543 [Adapt1 - 1543] | Internal Consumer Endpoint - Enhance to Check Lag | Remove Partition With No Data | Send Notification Having Lag Percentage | Unit Test May 21, 2024
@abhivermaaa abhivermaaa self-assigned this May 21, 2024
@abhivermaaa abhivermaaa changed the title [Adapt1 - 1543] | Internal Consumer Endpoint - Enhance to Check Lag | Remove Partition With No Data | Send Notification Having Lag Percentage | Unit Test [ADAPT1 - 1543] | Internal Consumer Endpoint - Enhance to Check Lag | Remove Partition With No Data | Send Notification Having Lag Percentage | Unit Test May 21, 2024
@abhivermaaa abhivermaaa merged commit 37d2be4 into feature-notification-subscribertab May 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants