-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create experimental controller interface. (#399)
- Loading branch information
1 parent
be56ee0
commit 5c3ecb5
Showing
2 changed files
with
239 additions
and
0 deletions.
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
restli-resources/src/main/java/com/linkedin/metadata/restli/lix/DummyResourceLix.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,93 @@ | ||
package com.linkedin.metadata.restli.lix; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
|
||
public class DummyResourceLix implements ResourceLix { | ||
|
||
@Override | ||
public boolean testGet(@Nonnull String urn, @Nonnull String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBatchGet(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBatchGetWithErrors(@Nullable String urn, @Nullable String type) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testIngest(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testIngestWithTracking(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testGetSnapshot(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBackfillLegacy(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBackfillWithUrns(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testEmitNoChangeMetadataAuditEvent(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBackfillWithNewValue(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBackfillEntityTables(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBackfillRelationshipTables(@Nullable String urn, @Nullable String entityType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testBackfill(@Nonnull String assetType, @Nonnull String mode) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testFilter(@Nonnull String assetType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testGetAll(@Nullable String urnType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testSearch(@Nullable String urnType) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean testSearchV2(@Nullable String urnType) { | ||
return false; | ||
} | ||
} |
146 changes: 146 additions & 0 deletions
146
restli-resources/src/main/java/com/linkedin/metadata/restli/lix/ResourceLix.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,146 @@ | ||
package com.linkedin.metadata.restli.lix; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
|
||
/** | ||
* Experimental controls on resources APIs. | ||
* LI internal: go/gma/experimentalLiX | ||
*/ | ||
public interface ResourceLix { | ||
|
||
/** | ||
* Experiment on the GET. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testGet(@Nonnull String urn, @Nonnull String entityType); | ||
|
||
/** | ||
* Experiment on the BatchGet. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testBatchGet(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the BatchGetWithErrors. | ||
* @param urn urnString of the entity | ||
* @param type type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testBatchGetWithErrors(@Nullable String urn, @Nullable String type); | ||
|
||
/** | ||
* Experiment on the Ingest. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @param aspectName aspect FQCN of the urn | ||
* @return enabling/not | ||
*/ | ||
boolean testIngest(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName); | ||
|
||
/** | ||
* Experiment on the IngestWithTracking. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @param aspectName aspect FQCN of the urn | ||
* @return enabling/not enabling/not | ||
*/ | ||
boolean testIngestWithTracking(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName); | ||
|
||
/** | ||
* Experiment on the GetSnapshot. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testGetSnapshot(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the BackfillLegacy. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testBackfillLegacy(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the BackfillWithUrns. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testBackfillWithUrns(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the EmitNoChangeMetadataAuditEvent. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testEmitNoChangeMetadataAuditEvent(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the BackfillWithNewValue. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testBackfillWithNewValue(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the BackfillEntityTables. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testBackfillEntityTables(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the BackfillRelationshipTables. | ||
* @param urn urnString of the entity | ||
* @param entityType type of the entity | ||
* @return enabling/not | ||
*/ | ||
boolean testBackfillRelationshipTables(@Nullable String urn, @Nullable String entityType); | ||
|
||
/** | ||
* Experiment on the Backfill. | ||
* @param assetType the type of the asset | ||
* @param mode backfill mode | ||
* @return enabling/not | ||
*/ | ||
boolean testBackfill(@Nonnull String assetType, @Nonnull String mode); | ||
|
||
/** | ||
* Experiment on the Filter. | ||
* @param assetType the type of the asset | ||
* @return enabling/not | ||
*/ | ||
boolean testFilter(@Nonnull String assetType); | ||
|
||
/** | ||
* Experiment on the GetAll. | ||
* @param urnType the type of the urn | ||
* @return enabling/not | ||
*/ | ||
boolean testGetAll(@Nullable String urnType); | ||
|
||
/** | ||
* Experiment on the Search. | ||
* @param urnType the type of the urn | ||
* @return enabling/not | ||
*/ | ||
boolean testSearch(@Nullable String urnType); | ||
|
||
/** | ||
* Experiment on the SearchV2. | ||
* @param urnType the type of the urn | ||
* @return enabling/not | ||
*/ | ||
boolean testSearchV2(@Nullable String urnType); | ||
} |