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

Add RampedResourceImpl Lix to set New MG Kernal as default #442

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.linkedin.metadata.query.IndexSortCriterion;
import com.linkedin.metadata.query.ListResultMetadata;
import com.linkedin.metadata.query.MapMetadata;
import com.linkedin.metadata.restli.lix.DummyResourceLix;
import com.linkedin.metadata.restli.lix.RampedResourceImpl;
import com.linkedin.metadata.restli.lix.ResourceLix;
import com.linkedin.parseq.Task;
import com.linkedin.restli.common.EmptyRecord;
Expand Down Expand Up @@ -96,7 +96,7 @@ public abstract class BaseEntityResource<
private final Class<ASSET> _assetClass;
protected final Class<URN> _urnClass;
protected BaseTrackingManager _trackingManager = null;
private ResourceLix _defaultResourceLix = new DummyResourceLix();
private ResourceLix _defaultResourceLix = new RampedResourceImpl();

/**
* This method is to be overriden by specific resource endpoint implementation with real lix impl.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;


/**
* Dummy Resource Lix will always choose using the old GMA logic, equivalent to Lix is always 'control'.
* Usage: assign to 'resourceLix' fields at each GMS entity resource.
*/
public class DummyResourceLix implements ResourceLix {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
package com.linkedin.metadata.restli.lix;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;


/**
* Ramped Resource will always choose using the new MG Kernel logic, equivalent to Lix is always 'treatment'.
* Usage: assign to 'resourceLix' fields at each GMS entity resource, after all validation is complete.
*/
public class RampedResourceImpl implements ResourceLix {
@Override
public boolean testGet(@Nonnull String urn, @Nonnull String entityType) {
return true;
}

@Override
public boolean testBatchGet(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testBatchGetWithErrors(@Nullable String urn, @Nullable String type) {
return true;
}

@Override
public boolean testGetSnapshot(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testBackfillLegacy(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testBackfillWithUrns(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testEmitNoChangeMetadataAuditEvent(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testBackfillWithNewValue(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testBackfillEntityTables(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testBackfillRelationshipTables(@Nullable String urn, @Nullable String entityType) {
return true;
}

@Override
public boolean testBackfill(@Nonnull String assetType, @Nonnull String mode) {
return true;
}

@Override
public boolean testFilter(@Nonnull String assetType) {
return true;
}

@Override
public boolean testGetAll(@Nullable String urnType) {
return true;
}

@Override
public boolean testSearch(@Nullable String urnType) {
return true;
}

@Override
public boolean testSearchV2(@Nullable String urnType) {
return true;
}
}
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.6.*
version=1.0.*
Loading