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

feat(mae/mcl): Make ingestAspect produce both MCLs and MAEs #3737

Merged
merged 5 commits into from
Jan 5, 2022

Conversation

dexter-mh-lee
Copy link
Contributor

@dexter-mh-lee dexter-mh-lee commented Dec 14, 2021

We are migrating away from the legacy MCE/MAE setup to MCP/MCL setup detailed in this doc https://datahubproject.io/docs/advanced/mcp-mcl/

As the first step, we will change ingestAspect to produce MCLs and MAEs, and remove MAE processor to consume only from MCLs.

We are leaving MAEs as is for now, since there are external dependencies outside of DataHub that may be consuming MAEs. Note, the recommendation is to move to MCLs.

Tested locally and made sure MCLs are created correctly and that MAEs are still correctly produced.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable)

@github-actions
Copy link

github-actions bot commented Dec 14, 2021

Unit Test Results

     48 files  +  3       48 suites  +3   49m 6s ⏱️ + 6m 52s
   661 tests +14     609 ✔️ +14  52 💤 ±0  0 ±0 
1 465 runs  +12  1 391 ✔️ +  6  74 💤 +6  0 ±0 

Results for commit e8a061c. ± Comparison against base commit 450cdc1.

♻️ This comment has been updated with latest results.

produceMAETimer.stop();

Timer.Context produceMCLTimer = MetricUtils.timer(this.getClass(), "produceMCL").time();
produceMetadataChangeLog(urn, entityName, aspectName, aspectSpec, oldValue, updatedValue, oldSystemMetadata,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we produce to BOTH? (And deprecate consumption via MAE processor?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added produce to both and removed MAE consumer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the produce calls are async under the hood so no impact on latency

@dexter-mh-lee dexter-mh-lee changed the title feat(mae/mcl): Make ingestAspect produce MCLs instead of MAEs feat(mae/mcl): Make ingestAspect produce both MCLs and MAEs Jan 3, 2022

_producer.produceMetadataAuditEvent(urn, oldSnapshot, newSnapshot, oldSystemMetadata, newSystemMetadata, operation);
protected Snapshot buildKeySnapshot(@Nonnull final Urn urn) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this should prob go below produceMetadataAuditEventForKey

@@ -143,8 +147,17 @@ public void testIngestGetEntity() throws Exception {
assertTrue(DataTemplateUtil.areEqual(expectedKey,
readEntity.getValue().getCorpUserSnapshot().getAspects().get(0).getCorpUserKey())); // Key + Info aspect.

ArgumentCaptor<MetadataChangeLog> mclCaptor = ArgumentCaptor.forClass(MetadataChangeLog.class);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!!

@@ -9,7 +9,7 @@
public class MaeConsumerApplication {

public static void main(String[] args) {
Class<?>[] primarySources = {MaeConsumerApplication.class, com.linkedin.metadata.kafka.MaeConsumerConfig.class};
Class<?>[] primarySources = {MaeConsumerApplication.class, MclConsumerConfig.class};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yess!

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shirshanka shirshanka merged commit 9d04aa1 into datahub-project:master Jan 5, 2022
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