Skip to content

Commit

Permalink
feat: create experimental controller interface. (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealChrisL authored Aug 21, 2024
1 parent be56ee0 commit 5c3ecb5
Show file tree
Hide file tree
Showing 2 changed files with 239 additions and 0 deletions.
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;
}
}
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);
}

0 comments on commit 5c3ecb5

Please sign in to comment.