Skip to content

Commit

Permalink
Remove unused dataset models
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerem Sahin committed Dec 2, 2019
1 parent f5e4972 commit 1a16f5f
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 737 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.linkedin.common.FabricType;
import com.linkedin.common.urn.DataPlatformUrn;
import com.linkedin.common.urn.DatasetUrn;
import com.linkedin.dataset.ComplianceInfo;
import com.linkedin.dataset.DatasetKey;
import com.linkedin.metadata.dao.utils.ModelUtils;
import com.linkedin.metadata.snapshot.DatasetSnapshot;
Expand All @@ -25,18 +24,4 @@ public void testUrnClass() {

assertEquals(builder.urnClass(), DatasetUrn.class);
}

@Test
public void testGetRequest() {
DatasetSnapshotRequestBuilder builder = new DatasetSnapshotRequestBuilder();
String aspectName = ModelUtils.getAspectName(ComplianceInfo.class);
DatasetUrn urn = new DatasetUrn(new DataPlatformUrn("mysql"), "QUEUING.bar", FabricType.EI);

GetRequest<DatasetSnapshot> request = builder.getRequest(aspectName, urn, 0);

Map<String, Object> keyPaths = Collections.singletonMap("key", new ComplexResourceKey<>(
new DatasetKey().setPlatform(new DataPlatformUrn("mysql")).setName("QUEUING.bar").setOrigin(FabricType.EI),
new EmptyRecord()));
validateRequest(request, "datasets/{key}/snapshot", keyPaths, aspectName, 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.common.collect.ImmutableSet;
import com.linkedin.common.Ownership;
import com.linkedin.data.template.RecordTemplate;
import com.linkedin.dataset.ComplianceInfo;
import com.linkedin.metadata.aspect.AspectVersion;
import com.linkedin.metadata.query.Condition;
import com.linkedin.metadata.query.Criterion;
Expand Down Expand Up @@ -41,18 +40,6 @@ public void testNewFilter() {
assertEquals(filter.getCriteria().size(), 0);
}

@Test
public void testLatestAspectVersions() {
Set<Class<? extends RecordTemplate>> aspects = ImmutableSet.of(Ownership.class, ComplianceInfo.class);

Set<AspectVersion> aspectVersions = QueryUtils.latestAspectVersions(aspects);

assertEquals(aspectVersions.size(), 2);

assertTrue(hasAspectVersion(aspectVersions, Ownership.class.getCanonicalName(), 0));
assertTrue(hasAspectVersion(aspectVersions, ComplianceInfo.class.getCanonicalName(), 0));
}

private boolean hasAspectVersion(Set<AspectVersion> aspectVersions, String aspectName, long version) {
return aspectVersions.stream()
.filter(av -> av.getAspect().equals(aspectName) && av.getVersion().equals(version))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
}
}
},
{
"name": "supportedPurgePolicies",
"type": {
"type": "array",
"items": "com.linkedin.dataset.CompliancePurgeType"
},
"doc": "The purge policies supported by this platform"
},
{
"name": "datasetNameDelimiter",
"type": "string",
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 1a16f5f

Please sign in to comment.