forked from linkedin/datahub-gma
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement backfill endpoint with aspect routing (linkedin#167)
- Loading branch information
1 parent
57937d2
commit dcb00a9
Showing
6 changed files
with
147 additions
and
18 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
14 changes: 11 additions & 3 deletions
14
restli-resources/src/main/java/com/linkedin/metadata/restli/BaseAspectRoutingGmsClient.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 |
---|---|---|
@@ -1,21 +1,29 @@ | ||
package com.linkedin.metadata.restli; | ||
|
||
import com.linkedin.common.urn.Urn; | ||
import com.linkedin.data.template.RecordTemplate; | ||
import com.linkedin.restli.server.RestLiServiceException; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
|
||
/** | ||
* A client interacts with standard GMS APIs. | ||
*/ | ||
public abstract class BaseAspectRoutingGmsClient { | ||
public abstract class BaseAspectRoutingGmsClient<ASPECT extends RecordTemplate> { | ||
|
||
/** | ||
* Retrieves the latest version of the routing aspect for an entity. | ||
*/ | ||
public abstract <KEY, ASPECT extends RecordTemplate> ASPECT get(KEY id) throws RestLiServiceException; | ||
public abstract <URN extends Urn> ASPECT get(URN urn) throws RestLiServiceException; | ||
|
||
/** | ||
* Batch retrieve the latest version of the routing aspect for a set of entities. | ||
*/ | ||
public abstract <URN extends Urn> Map<URN, ASPECT> batchGet(Set<URN> urn) throws RestLiServiceException; | ||
|
||
/** | ||
* Ingests the latest version of the routing aspect for an entity. | ||
*/ | ||
public abstract <KEY, ASPECT extends RecordTemplate> void ingest(KEY id, ASPECT aspect) throws RestLiServiceException; | ||
public abstract <URN extends Urn> void ingest(URN urn, ASPECT aspect) throws RestLiServiceException; | ||
} |
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
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