From 352eb3fff0e3a2ebb5d3ec318cfb6a6e1fff9345 Mon Sep 17 00:00:00 2001 From: Mars Lan Date: Sun, 2 Aug 2020 14:06:20 -0700 Subject: [PATCH] fix(models): remove unused model (#1748) * fix(models): remove unused model Fixes https://github.com/linkedin/datahub/issues/1719 * Drop DeploymentInfo from Dataset's value model & rebuild snapshot --- .../pegasus/com/linkedin/dataset/Dataset.pdl | 5 -- ...om.linkedin.dataset.datasets.snapshot.json | 77 +------------------ .../com/linkedin/dataset/DeploymentInfo.pdl | 45 ----------- 3 files changed, 1 insertion(+), 126 deletions(-) delete mode 100644 metadata-models/src/main/pegasus/com/linkedin/dataset/DeploymentInfo.pdl diff --git a/gms/api/src/main/pegasus/com/linkedin/dataset/Dataset.pdl b/gms/api/src/main/pegasus/com/linkedin/dataset/Dataset.pdl index c2eda0743b422..235905fc770e7 100644 --- a/gms/api/src/main/pegasus/com/linkedin/dataset/Dataset.pdl +++ b/gms/api/src/main/pegasus/com/linkedin/dataset/Dataset.pdl @@ -61,11 +61,6 @@ record Dataset includes DatasetKey, ChangeAuditStamps, VersionTag { */ uri: optional Uri - /** - * List of dataset instances for this dataset - */ - deploymentInfos: array[DeploymentInfo] = [ ] - /** * tags for searching dataset */ diff --git a/gms/api/src/main/snapshot/com.linkedin.dataset.datasets.snapshot.json b/gms/api/src/main/snapshot/com.linkedin.dataset.datasets.snapshot.json index 0955ba78eb22f..8fa7ea19c1eff 100644 --- a/gms/api/src/main/snapshot/com.linkedin.dataset.datasets.snapshot.json +++ b/gms/api/src/main/snapshot/com.linkedin.dataset.datasets.snapshot.json @@ -125,32 +125,6 @@ "EI" : "Designates early-integration (staging) fabrics", "PROD" : "Designates production fabrics" } - }, { - "type" : "typeref", - "name" : "FabricUrn", - "namespace" : "com.linkedin.common", - "doc" : "Should match the forms used in configs: envInfoFinder.envToEnvByteMap. PROD-ELA4, PROD-ECH3, EI, EI2, prod-lva1, etc", - "ref" : "string", - "java" : { - "class" : "com.linkedin.common.urn.FabricUrn" - }, - "validate" : { - "com.linkedin.common.validator.TypedUrnValidator" : { - "doc" : "Should match the forms used in configs: envInfoFinder.envToEnvByteMap. PROD-ELA4, PROD-ECH3, EI, EI2, prod-lva1, etc", - "entityType" : "fabric", - "fields" : [ { - "doc" : "", - "maxLength" : 36, - "name" : "fabricName", - "type" : "string" - } ], - "maxLength" : 50, - "name" : "Fabric", - "namespace" : "li", - "owners" : [ "urn:li:corpuser:fbar", "urn:li:corpuser:bfoo" ], - "owningTeam" : "urn:li:internalTeam:Tools" - } - } }, { "type" : "record", "name" : "InstitutionalMemory", @@ -295,30 +269,6 @@ "type" : "string", "optional" : true } ] - }, { - "type" : "record", - "name" : "DataLocation", - "namespace" : "com.linkedin.dataset", - "doc" : "DataLocation describes where dataset is located within LinkedIn environment. Location is identified with fabric:cluster pair.", - "fields" : [ { - "name" : "fabricGroup", - "type" : "com.linkedin.common.FabricType", - "doc" : "Fabric group type of Linkedin internal data center fabrics." - }, { - "name" : "fabric", - "type" : "com.linkedin.common.FabricUrn", - "doc" : "Designated fabric where dataset is located such as prod-ltx1, ei-lva1 etc.", - "optional" : true - }, { - "name" : "cluster", - "type" : "string", - "doc" : "Designated cluster where dataset is located such as kafka-tracking-cluster, queuing, etc." - }, { - "name" : "region", - "type" : "string", - "doc" : "Standardized geographical region where dataset is deployed.", - "optional" : true - } ] }, { "type" : "record", "name" : "Dataset", @@ -386,31 +336,6 @@ "type" : "com.linkedin.common.Uri", "doc" : "The abstracted such as hdfs:///data/tracking/PageViewEvent, file:///dir/file_name. Uri should not include any environment specific properties. Some datasets might not have a standardized uri, which makes this field optional (i.e. kafka topic).", "optional" : true - }, { - "name" : "deploymentInfos", - "type" : { - "type" : "array", - "items" : { - "type" : "record", - "name" : "DeploymentInfo", - "doc" : "Deployment information of a dataset. Locations were dataset is deployed.", - "fields" : [ { - "name" : "dataLocation", - "type" : "DataLocation", - "doc" : "Deployment location" - }, { - "name" : "additionalDeploymentInfo", - "type" : { - "type" : "map", - "values" : "string" - }, - "doc" : "Additional deployment info, such as Zookeeper, Connection, Graphite URL, native reference ID or KEY", - "optional" : true - } ] - } - }, - "doc" : "List of dataset instances for this dataset", - "default" : [ ] }, { "name" : "tags", "type" : { @@ -504,7 +429,7 @@ "doc" : "A key-value map to capture any other non-standardized properties for the dataset", "default" : { } } ] - }, "com.linkedin.dataset.DeploymentInfo", { + }, { "type" : "record", "name" : "Downstream", "namespace" : "com.linkedin.dataset", diff --git a/metadata-models/src/main/pegasus/com/linkedin/dataset/DeploymentInfo.pdl b/metadata-models/src/main/pegasus/com/linkedin/dataset/DeploymentInfo.pdl deleted file mode 100644 index 5a4fe6cb3dceb..0000000000000 --- a/metadata-models/src/main/pegasus/com/linkedin/dataset/DeploymentInfo.pdl +++ /dev/null @@ -1,45 +0,0 @@ -namespace com.linkedin.dataset - -import com.linkedin.common.FabricType -import com.linkedin.common.FabricUrn - -/** - * Deployment information of a dataset. Locations were dataset is deployed. - */ -record DeploymentInfo { - - /** - * Deployment location - */ - dataLocation: - /** - * DataLocation describes where dataset is located within LinkedIn environment. Location is identified with fabric:cluster pair. - */ - record DataLocation { - - /** - * Fabric group type of Linkedin internal data center fabrics. - */ - fabricGroup: FabricType - - /** - * Designated fabric where dataset is located such as prod-ltx1, ei-lva1 etc. - */ - fabric: optional FabricUrn - - /** - * Designated cluster where dataset is located such as kafka-tracking-cluster, queuing, etc. - */ - cluster: string - - /** - * Standardized geographical region where dataset is deployed. - */ - region: optional string - } - - /** - * Additional deployment info, such as Zookeeper, Connection, Graphite URL, native reference ID or KEY - */ - additionalDeploymentInfo: optional map[string, string] -} \ No newline at end of file