-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Generic DAO][Part 2] Implement backfill method (#385)
* [Generic DAO][Part 2] Implement backfill method * fix * fix * support backfill event * address comment * fix * fix test --------- Co-authored-by: Jesse Jia <[email protected]>
- Loading branch information
1 parent
6f0bf31
commit 793bd8c
Showing
8 changed files
with
324 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
29 changes: 29 additions & 0 deletions
29
dao-api/src/main/java/com/linkedin/metadata/dao/producer/GenericMetadataProducer.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.linkedin.metadata.dao.producer; | ||
|
||
import com.linkedin.common.AuditStamp; | ||
import com.linkedin.common.urn.Urn; | ||
import com.linkedin.data.template.RecordTemplate; | ||
import com.linkedin.metadata.events.IngestionMode; | ||
import com.linkedin.metadata.events.IngestionTrackingContext; | ||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
|
||
/** | ||
* Generic metadata producer without type-bound. | ||
*/ | ||
public interface GenericMetadataProducer { | ||
|
||
/** | ||
* Produces an aspect specific Metadata Audit Event (MAE) after a metadata aspect is updated for an entity. | ||
* | ||
* @param urn {@link Urn} of the entity | ||
* @param oldValue The value prior to the update, or null if there's none. | ||
* @param newValue The value after the update | ||
* @param auditStamp Containing version auditing information for the metadata change | ||
* @param trackingContext Nullable tracking context passed in to be appended to produced MAEv5s | ||
* @param ingestionMode Different options for ingestion. | ||
*/ | ||
void produceAspectSpecificMetadataAuditEvent(@Nonnull Urn urn, @Nullable RecordTemplate oldValue, @Nonnull RecordTemplate newValue, | ||
@Nullable AuditStamp auditStamp, @Nullable IngestionTrackingContext trackingContext, @Nullable IngestionMode ingestionMode); | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.