You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2018/11/19 21:08:02 UTC

[1/2] atlas git commit: ATLAS-2968: Update model files to include service-type for each entityDef

Repository: atlas
Updated Branches:
  refs/heads/master 8129bade5 -> 36656ea75


http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java b/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java
index e2b33bd..25dd81d 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java
@@ -40,6 +40,7 @@ import org.apache.atlas.model.typedef.AtlasTypesDef;
 import org.apache.atlas.store.AtlasTypeDefStore;
 import org.apache.atlas.type.AtlasType;
 import org.apache.atlas.type.AtlasTypeRegistry;
+import org.apache.atlas.type.AtlasTypeUtil;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.MapUtils;
 import org.apache.commons.configuration.Configuration;
@@ -404,8 +405,9 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler {
 
             PatchHandler[] patchHandlers = new PatchHandler[] {
                     new AddAttributePatchHandler(atlasTypeDefStore, atlasTypeRegistry),
+                    new UpdateAttributePatchHandler(atlasTypeDefStore, atlasTypeRegistry),
                     new UpdateTypeDefOptionsPatchHandler(atlasTypeDefStore, atlasTypeRegistry),
-                    new UpdateAttributePatchHandler(atlasTypeDefStore, atlasTypeRegistry)
+                    new SetServiceTypePatchHandler(atlasTypeDefStore, atlasTypeRegistry)
             };
 
             Map<String, PatchHandler> patchHandlerRegistry = new HashMap<>();
@@ -471,6 +473,7 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler {
         private Map<String, Object>     params;
         private List<AtlasAttributeDef> attributeDefs;
         private Map<String, String>     typeDefOptions;
+        private String                  serviceType;
 
         public String getAction() {
             return action;
@@ -527,6 +530,14 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler {
         public void setTypeDefOptions(Map<String, String> typeDefOptions) {
             this.typeDefOptions = typeDefOptions;
         }
+
+        public String getServiceType() {
+            return serviceType;
+        }
+
+        public void setServiceType(String serviceType) {
+            this.serviceType = serviceType;
+        }
     }
 
     /**
@@ -709,57 +720,43 @@ public class AtlasTypeDefStoreInitializer implements ActiveStateChangeHandler {
             }
 
             if (isPatchApplicable(patch, typeDef)) {
-                if (typeDef.getClass().equals(AtlasEntityDef.class)) {
-                    AtlasEntityDef updatedDef = new AtlasEntityDef((AtlasEntityDef)typeDef);
-
-                    if (updatedDef.getOptions() == null) {
-                        updatedDef.setOptions(patch.getTypeDefOptions());
-                    } else {
-                        updatedDef.getOptions().putAll(patch.getTypeDefOptions());
-                    }
-                    updatedDef.setTypeVersion(patch.getUpdateToVersion());
-
-                    typeDefStore.updateEntityDefByName(typeName, updatedDef);
-                } else if (typeDef.getClass().equals(AtlasClassificationDef.class)) {
-                    AtlasClassificationDef updatedDef = new AtlasClassificationDef((AtlasClassificationDef)typeDef);
+                if (typeDef.getOptions() == null) {
+                    typeDef.setOptions(patch.getTypeDefOptions());
+                } else {
+                    typeDef.getOptions().putAll(patch.getTypeDefOptions());
+                }
+                typeDef.setTypeVersion(patch.getUpdateToVersion());
 
-                    if (updatedDef.getOptions() == null) {
-                        updatedDef.setOptions(patch.getTypeDefOptions());
-                    } else {
-                        updatedDef.getOptions().putAll(patch.getTypeDefOptions());
-                    }
-                    updatedDef.setTypeVersion(patch.getUpdateToVersion());
+                typeDefStore.updateTypesDef(AtlasTypeUtil.getTypesDef(typeDef));
+            } else {
+                LOG.info("patch skipped: typeName={}; applyToVersion={}; updateToVersion={}",
+                         patch.getTypeName(), patch.getApplyToVersion(), patch.getUpdateToVersion());
+            }
+        }
+    }
 
-                    typeDefStore.updateClassificationDefByName(typeName, updatedDef);
-                } else if (typeDef.getClass().equals(AtlasStructDef.class)) {
-                    AtlasStructDef updatedDef = new AtlasStructDef((AtlasStructDef)typeDef);
+    class SetServiceTypePatchHandler extends PatchHandler {
+        public SetServiceTypePatchHandler(AtlasTypeDefStore typeDefStore, AtlasTypeRegistry typeRegistry) {
+            super(typeDefStore, typeRegistry, new String[] { "SET_SERVICE_TYPE" });
+        }
 
-                    if (updatedDef.getOptions() == null) {
-                        updatedDef.setOptions(patch.getTypeDefOptions());
-                    } else {
-                        updatedDef.getOptions().putAll(patch.getTypeDefOptions());
-                    }
-                    updatedDef.setTypeVersion(patch.getUpdateToVersion());
+        @Override
+        public void applyPatch(TypeDefPatch patch) throws AtlasBaseException {
+            String           typeName = patch.getTypeName();
+            AtlasBaseTypeDef typeDef  = typeRegistry.getTypeDefByName(typeName);
 
-                    typeDefStore.updateStructDefByName(typeName, updatedDef);
-                } else if (typeDef.getClass().equals(AtlasEnumDef.class)) {
-                    AtlasEnumDef updatedDef = new AtlasEnumDef((AtlasEnumDef)typeDef);
+            if (typeDef == null) {
+                throw new AtlasBaseException(AtlasErrorCode.PATCH_FOR_UNKNOWN_TYPE, patch.getAction(), typeName);
+            }
 
-                    if (updatedDef.getOptions() == null) {
-                        updatedDef.setOptions(patch.getTypeDefOptions());
-                    } else {
-                        updatedDef.getOptions().putAll(patch.getTypeDefOptions());
-                    }
-                    updatedDef.setTypeVersion(patch.getUpdateToVersion());
+            if (isPatchApplicable(patch, typeDef)) {
+                typeDef.setServiceType(patch.getServiceType());
+                typeDef.setTypeVersion(patch.getUpdateToVersion());
 
-                    typeDefStore.updateEnumDefByName(typeName, updatedDef);
-                } else {
-                    throw new AtlasBaseException(AtlasErrorCode.PATCH_NOT_APPLICABLE_FOR_TYPE,
-                                                 patch.getAction(), typeDef.getClass().getSimpleName());
-                }
+                typeDefStore.updateTypesDef(AtlasTypeUtil.getTypesDef(typeDef));
             } else {
                 LOG.info("patch skipped: typeName={}; applyToVersion={}; updateToVersion={}",
-                         patch.getTypeName(), patch.getApplyToVersion(), patch.getUpdateToVersion());
+                        patch.getTypeName(), patch.getApplyToVersion(), patch.getUpdateToVersion());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
index 3421331..418ce49 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java
@@ -184,6 +184,7 @@ public class AtlasTypeDefGraphStoreV2 extends AtlasTypeDefGraphStore {
         ret.setProperty(Constants.TYPENAME_PROPERTY_KEY, typeDef.getName());
         ret.setProperty(Constants.TYPEDESCRIPTION_PROPERTY_KEY,
                 StringUtils.isNotBlank(typeDef.getDescription()) ? typeDef.getDescription() : typeDef.getName());
+        ret.setProperty(Constants.TYPESERVICETYPE_PROPERTY_KEY, typeDef.getServiceType());
         ret.setProperty(Constants.TYPEVERSION_PROPERTY_KEY, typeDef.getTypeVersion());
         ret.setProperty(Constants.GUID_PROPERTY_KEY, typeDef.getGuid());
         ret.setProperty(Constants.CREATED_BY_KEY, getCurrentUser());
@@ -214,6 +215,10 @@ public class AtlasTypeDefGraphStoreV2 extends AtlasTypeDefGraphStore {
         updateVertexProperty(vertex, Constants.TYPEVERSION_PROPERTY_KEY, typeDef.getTypeVersion());
         updateVertexProperty(vertex, Constants.TYPEOPTIONS_PROPERTY_KEY, AtlasType.toJson(typeDef.getOptions()));
 
+        if (StringUtils.isNotEmpty(typeDef.getServiceType())) {
+            updateVertexProperty(vertex, Constants.TYPESERVICETYPE_PROPERTY_KEY, typeDef.getServiceType());
+        }
+
         markVertexUpdated(vertex);
     }
 
@@ -265,6 +270,7 @@ public class AtlasTypeDefGraphStoreV2 extends AtlasTypeDefGraphStore {
     void vertexToTypeDef(AtlasVertex vertex, AtlasBaseTypeDef typeDef) {
         String name        = vertex.getProperty(Constants.TYPENAME_PROPERTY_KEY, String.class);
         String description = vertex.getProperty(Constants.TYPEDESCRIPTION_PROPERTY_KEY, String.class);
+        String serviceType = vertex.getProperty(Constants.TYPESERVICETYPE_PROPERTY_KEY, String.class);
         String typeVersion = vertex.getProperty(Constants.TYPEVERSION_PROPERTY_KEY, String.class);
         String guid        = vertex.getProperty(Constants.GUID_PROPERTY_KEY, String.class);
         String createdBy   = vertex.getProperty(Constants.CREATED_BY_KEY, String.class);
@@ -287,6 +293,7 @@ public class AtlasTypeDefGraphStoreV2 extends AtlasTypeDefGraphStore {
 
         typeDef.setName(name);
         typeDef.setDescription(description);
+        typeDef.setServiceType(serviceType);
         typeDef.setTypeVersion(typeVersion);
         typeDef.setGuid(guid);
         typeDef.setCreatedBy(createdBy);


[2/2] atlas git commit: ATLAS-2968: Update model files to include service-type for each entityDef

Posted by sa...@apache.org.
ATLAS-2968: Update model files to include service-type for each entityDef

Signed-off-by: Sarath Subramanian <ss...@hortonworks.com>


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/36656ea7
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/36656ea7
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/36656ea7

Branch: refs/heads/master
Commit: 36656ea75eb2f3ad43a7bdf78f8ba9a471fce1b6
Parents: 8129bad
Author: Kapildeo Nayak <kn...@hortonworks.com>
Authored: Mon Nov 19 10:50:57 2018 -0800
Committer: Sarath Subramanian <ss...@hortonworks.com>
Committed: Mon Nov 19 10:50:57 2018 -0800

----------------------------------------------------------------------
 addons/models/0000-Area0/0010-base_model.json   |  13 +
 .../models/0000-Area0/0011-glossary_model.json  |  18 +
 .../002-base_model_add_service_type.json        | 221 +++++++++++
 addons/models/1000-Hadoop/1020-fs_model.json    |   4 +
 addons/models/1000-Hadoop/1030-hive_model.json  |  14 +
 addons/models/1000-Hadoop/1040-sqoop_model.json |   2 +
 .../models/1000-Hadoop/1050-falcon_model.json   |  10 +-
 addons/models/1000-Hadoop/1060-hbase_model.json |   7 +
 addons/models/1000-Hadoop/1065-avro_model.json  |  11 +
 addons/models/1000-Hadoop/1070-kafka_model.json |   3 +
 addons/models/1000-Hadoop/1080-storm_model.json |   5 +
 .../007-hadoop_model_add_service_type.json      | 382 +++++++++++++++++++
 addons/models/2000-RDBMS/2010-rdbms_model.json  |  15 +
 .../002-rdbms_model_add_service_type.json       | 109 ++++++
 .../3000-Cloud/3010-aws_common_typedefs.json    |   2 +
 .../models/3000-Cloud/3020-aws_s3_typedefs.json |   9 +
 .../001-cloud_model_add_service_type.json       |  81 ++++
 .../org/apache/atlas/repository/Constants.java  |   1 +
 .../atlas/model/typedef/AtlasBaseTypeDef.java   |  21 +-
 .../atlas/model/typedef/AtlasEnumDef.java       |   7 +-
 .../atlas/model/typedef/AtlasStructDef.java     |   6 +-
 .../org/apache/atlas/type/AtlasArrayType.java   |  18 +-
 .../apache/atlas/type/AtlasBuiltInTypes.java    |  28 +-
 .../org/apache/atlas/type/AtlasMapType.java     |  14 +-
 .../java/org/apache/atlas/type/AtlasType.java   |   9 +-
 .../apache/atlas/type/AtlasTypeRegistry.java    |  27 +-
 .../org/apache/atlas/type/AtlasTypeUtil.java    |  18 +
 .../graph/GraphBackedSearchIndexer.java         |   1 +
 .../bootstrap/AtlasTypeDefStoreInitializer.java |  85 ++---
 .../graph/v2/AtlasTypeDefGraphStoreV2.java      |   7 +
 30 files changed, 1052 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/0000-Area0/0010-base_model.json
----------------------------------------------------------------------
diff --git a/addons/models/0000-Area0/0010-base_model.json b/addons/models/0000-Area0/0010-base_model.json
index 3af0e0e..8b41ee8 100644
--- a/addons/models/0000-Area0/0010-base_model.json
+++ b/addons/models/0000-Area0/0010-base_model.json
@@ -6,6 +6,7 @@
         {
             "name": "Referenceable",
             "superTypes": [],
+            "serviceType": "atlas_core",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -21,6 +22,7 @@
         {
             "name": "__internal",
             "superTypes": [],
+            "serviceType": "atlas_core",
             "typeVersion": "1.0",
             "attributeDefs": []
         },
@@ -29,6 +31,7 @@
             "superTypes": [
                 "Referenceable"
             ],
+            "serviceType": "atlas_core",
             "typeVersion": "1.1",
             "attributeDefs": [
                 {
@@ -62,6 +65,7 @@
             "superTypes": [
                 "Asset"
             ],
+            "serviceType": "atlas_core",
             "typeVersion": "1.1",
             "attributeDefs": []
         },
@@ -71,6 +75,7 @@
             "superTypes": [
                 "Asset"
             ],
+            "serviceType": "atlas_core",
             "typeVersion": "1.1",
             "attributeDefs": []
         },
@@ -79,6 +84,7 @@
             "superTypes": [
                 "Asset"
             ],
+            "serviceType": "atlas_core",
             "typeVersion": "1.1",
             "attributeDefs": [
                 {
@@ -101,6 +107,7 @@
         },
         {
           "name": "AtlasServer",
+          "serviceType": "atlas_core",
           "typeVersion": "1.0",
           "superTypes": [
           ],
@@ -152,6 +159,7 @@
             "superTypes": [
                 "__internal"
             ],
+            "serviceType": "atlas_core",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -190,6 +198,7 @@
             "superTypes": [
                 "__internal"
             ],
+            "serviceType": "atlas_core",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -244,6 +253,7 @@
         },
         {
           "name": "__ExportImportAuditEntry",
+          "serviceType": "atlas_core",
           "typeVersion": "1.0",
           "superTypes": [
             "__internal"
@@ -319,6 +329,7 @@
     "relationshipDefs": [
         {
             "name": "dataset_process_inputs",
+            "serviceType": "atlas_core",
             "typeVersion": "1.0",
             "relationshipCategory": "AGGREGATION",
             "endDef1": {
@@ -338,6 +349,7 @@
         },
         {
           "name": "process_dataset_outputs",
+          "serviceType": "atlas_core",
           "typeVersion": "1.0",
           "relationshipCategory": "AGGREGATION",
           "endDef1": {
@@ -357,6 +369,7 @@
         },
         {
           "name": "__AtlasUserProfile_savedsearches",
+          "serviceType": "atlas_core",
           "typeVersion": "1.0",
           "relationshipCategory": "COMPOSITION",
           "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/0000-Area0/0011-glossary_model.json
----------------------------------------------------------------------
diff --git a/addons/models/0000-Area0/0011-glossary_model.json b/addons/models/0000-Area0/0011-glossary_model.json
index c529818..3be7a5d 100644
--- a/addons/models/0000-Area0/0011-glossary_model.json
+++ b/addons/models/0000-Area0/0011-glossary_model.json
@@ -3,6 +3,7 @@
     {
       "name": "AtlasGlossaryTermRelationshipStatus",
       "description": "TermRelationshipStatus defines how reliable the relationship is between two glossary terms",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "elementDefs": [
         {
@@ -35,6 +36,7 @@
     {
       "name": "AtlasGlossaryTermAssignmentStatus",
       "description": "TermAssignmentStatus defines how much the semantic assignment should be trusted.",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "elementDefs": [
         {
@@ -83,6 +85,7 @@
       "superTypes": [
         "__internal"
       ],
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "attributeDefs": [
         {
@@ -140,6 +143,7 @@
       "superTypes": [
         "__internal"
       ],
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "attributeDefs": [
         {
@@ -205,6 +209,7 @@
       "superTypes": [
         "__internal"
       ],
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "attributeDefs": [
         {
@@ -246,6 +251,7 @@
     {
       "name": "AtlasGlossarySemanticAssignment",
       "description": "SemanticAssignment is a relationship used to assign a term to a referenceable object. This means that the term describes the meaning of the referenceable object. The semantic assignment needs to be a controlled relationship when glossary definitions are used to provide classifications for the data assets and hence define how the data is to be governed.",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "attributeDefs": [
         {
@@ -340,6 +346,7 @@
     },
     {
       "name": "AtlasGlossaryTermAnchor",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "TermAnchor links each term to exactly one Glossary object. This means that this is its home glossary. If the Glossary object is deleted, then so are all of the terms linked to it.",
       "endDef1": {
@@ -358,6 +365,7 @@
     },
     {
       "name": "AtlasGlossaryTermCategorization",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "TermCategorization is a relationship used to organize terms into categories. A term may be linked with many categories and a category may have many terms linked to it. This relationship may connect terms and categories both in the same glossary or in different glossaries.",
       "endDef1": {
@@ -394,6 +402,7 @@
     },
     {
       "name": "AtlasGlossaryCategoryAnchor",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "CategoryAnchor links each category to exactly one Glossary object. This means that this is its home glossary. If the Glossary object is deleted then so are all of the categories linked to it.",
       "endDef1": {
@@ -412,6 +421,7 @@
     },
     {
       "name": "AtlasGlossaryCategoryHierarchyLink",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "CategoryHierarchyLink is a relationship used to organize categories into a hierarchy to, for example, create a structure for a taxonomy. A category may have none or one super-categories. This super-category may be in a different glossary.",
       "endDef1": {
@@ -430,6 +440,7 @@
     },
     {
       "name": "AtlasGlossaryRelatedTerm",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "RelatedTerm is a relationship used to say that the linked glossary term may also be of interest. It is like a 'see also' link in a dictionary.",
       "endDef1": {
@@ -486,6 +497,7 @@
     },
     {
       "name": "AtlasGlossarySynonym",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "Synonym is a relationship between glossary terms that have the same, or a very similar meaning in the same language. Notice that both ends of this relationship have the same name and refer to the same type; this results in one Synonym attribute being added to GlossaryTerm.",
       "endDef1": {
@@ -542,6 +554,7 @@
     },
     {
       "name": "AtlasGlossaryAntonym",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "Antonym is a relationship between glossary terms that have the opposite (or near opposite) meaning, in the same language. Notice that both ends of this relationship have the same name and refer to the same type; this results in one Antonym attribute being added to GlossaryTerm.",
       "endDef1": {
@@ -598,6 +611,7 @@
     },
     {
       "name": "AtlasGlossaryPreferredTerm",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "PreferredTerm is a relationship that indicates that the preferredTerm should be used in place of the preferredToTerm. This relationship can be used to encourage adoption of newer vocabularies. This is a weaker version of ReplacementTerm.",
       "endDef1": {
@@ -654,6 +668,7 @@
     },
     {
       "name": "AtlasGlossaryReplacementTerm",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "ReplacementTerm is a relationship that indicates that the replacementTerm must be used instead of the replacedByTerm. This is stronger version of the PreferredTerm.",
       "endDef1": {
@@ -710,6 +725,7 @@
     },
     {
       "name": "AtlasGlossaryTranslation",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "Translation is a relationship that defines that the related terms represent the same meaning, but each are written in a different language. Hence one is a translation of the other. The language of each term is defined in the Glossary object that anchors the term.",
       "endDef1": {
@@ -766,6 +782,7 @@
     },
     {
       "name": "AtlasGlossaryIsARelationship",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "IsA is a relationship that defines that the 'isA' term is a more generic term than the 'isOf' term. For example, this relationship would be use to say that 'Cat' ISA 'Animal'.",
       "endDef1": {
@@ -822,6 +839,7 @@
     },
     {
       "name": "AtlasGlossaryValidValue",
+      "serviceType": "atlas_core",
       "typeVersion": "1.0",
       "description": "ValidValue is a relationship that shows the validValue term represents one of the valid values that could be assigned to a data item that has the meaning described in the validValueFor term.",
       "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/0000-Area0/patches/002-base_model_add_service_type.json
----------------------------------------------------------------------
diff --git a/addons/models/0000-Area0/patches/002-base_model_add_service_type.json b/addons/models/0000-Area0/patches/002-base_model_add_service_type.json
new file mode 100644
index 0000000..6d4e80d
--- /dev/null
+++ b/addons/models/0000-Area0/patches/002-base_model_add_service_type.json
@@ -0,0 +1,221 @@
+{
+  "patches": [
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "Referenceable",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "__internal",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "Asset",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "DataSet",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "Infrastructure",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "Process",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasServer",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "__AtlasUserProfile",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "__AtlasUserSavedSearch",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "__ExportImportAuditEntry",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "dataset_process_inputs",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "process_dataset_outputs",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "__AtlasUserProfile_savedsearches",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+	  "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryTermRelationshipStatus",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryTermAssignmentStatus",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossary",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryTerm",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryCategory",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossarySemanticAssignment",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryTermAnchor",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryTermCategorization",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryCategoryAnchor",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryCategoryHierarchyLink",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryRelatedTerm",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossarySynonym",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryAntonym",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryPreferredTerm",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryReplacementTerm",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryTranslation",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryIsARelationship",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "AtlasGlossaryValidValue",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "atlas_core"
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1020-fs_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1020-fs_model.json b/addons/models/1000-Hadoop/1020-fs_model.json
index 21d261c..fc0e80d 100644
--- a/addons/models/1000-Hadoop/1020-fs_model.json
+++ b/addons/models/1000-Hadoop/1020-fs_model.json
@@ -3,6 +3,7 @@
         {
             "name": "file_action",
             "typeVersion": "1.0",
+            "serviceType": "file_system",
             "elementDefs": [
                 {
                     "ordinal": 0,
@@ -42,6 +43,7 @@
     "structDefs": [
         {
             "name": "fs_permissions",
+            "serviceType": "file_system",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -86,6 +88,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "file_system",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -160,6 +163,7 @@
             "superTypes": [
                 "fs_path"
             ],
+            "serviceType": "file_system",
             "typeVersion": "1.1",
             "attributeDefs": [
                 {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1030-hive_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1030-hive_model.json b/addons/models/1000-Hadoop/1030-hive_model.json
index 346009d..fe16821 100644
--- a/addons/models/1000-Hadoop/1030-hive_model.json
+++ b/addons/models/1000-Hadoop/1030-hive_model.json
@@ -2,6 +2,7 @@
     "enumDefs": [
         {
             "name": "hive_principal_type",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "elementDefs": [
                 {
@@ -22,6 +23,7 @@
     "structDefs": [
         {
             "name": "hive_order",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -44,6 +46,7 @@
         },
         {
             "name": "hive_serde",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -80,6 +83,7 @@
             "superTypes": [
                 "Process"
             ],
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -170,6 +174,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -306,6 +311,7 @@
             "superTypes": [
                 "Referenceable"
             ],
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -411,6 +417,7 @@
             "superTypes": [
                 "Asset"
             ],
+            "serviceType": "hive",
             "typeVersion": "1.1",
             "attributeDefs": [
                 {
@@ -453,6 +460,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -494,6 +502,7 @@
             "superTypes" : [
                 "Process"
             ],
+            "serviceType": "hive",
             "typeVersion" : "1.0",
             "attributeDefs" : [
                 {
@@ -526,6 +535,7 @@
     "relationshipDefs": [
         {
             "name": "hive_table_db",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -545,6 +555,7 @@
         },
         {
             "name": "hive_table_columns",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -565,6 +576,7 @@
         },
         {
             "name": "hive_table_partitionkeys",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -585,6 +597,7 @@
         },
         {
             "name": "hive_table_storagedesc",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -605,6 +618,7 @@
         },
         {
             "name": "hive_process_column_lineage",
+            "serviceType": "hive",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1040-sqoop_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1040-sqoop_model.json b/addons/models/1000-Hadoop/1040-sqoop_model.json
index f5c7fd9..928c6f1 100644
--- a/addons/models/1000-Hadoop/1040-sqoop_model.json
+++ b/addons/models/1000-Hadoop/1040-sqoop_model.json
@@ -8,6 +8,7 @@
             "superTypes": [
                 "Process"
             ],
+            "serviceType": "sqoop",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -57,6 +58,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "sqoop",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1050-falcon_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1050-falcon_model.json b/addons/models/1000-Hadoop/1050-falcon_model.json
index 4fa4604..8cadf4c 100644
--- a/addons/models/1000-Hadoop/1050-falcon_model.json
+++ b/addons/models/1000-Hadoop/1050-falcon_model.json
@@ -8,6 +8,7 @@
             "superTypes": [
                 "Process"
             ],
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "attributeDefs": []
         },
@@ -16,6 +17,7 @@
             "superTypes": [
                 "Infrastructure"
             ],
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -41,6 +43,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -82,6 +85,7 @@
             "superTypes": [
                 "Process"
             ],
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -131,6 +135,7 @@
             "superTypes": [
                 "Process"
             ],
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -147,6 +152,7 @@
     "relationshipDefs": [
         {
             "name": "falcon_feed_cluster",
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -166,6 +172,7 @@
         },
         {
             "name": "falcon_cluster_process",
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -185,6 +192,7 @@
         },
         {
             "name": "falcon_cluster_feed_creation",
+            "serviceType": "falcon",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -203,4 +211,4 @@
             "propagateTags": "NONE"
         }
     ]
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1060-hbase_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1060-hbase_model.json b/addons/models/1000-Hadoop/1060-hbase_model.json
index 0d56739..5f649cf 100644
--- a/addons/models/1000-Hadoop/1060-hbase_model.json
+++ b/addons/models/1000-Hadoop/1060-hbase_model.json
@@ -8,6 +8,7 @@
             "superTypes": [
                 "Asset"
             ],
+            "serviceType": "hbase",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -50,6 +51,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "hbase",
             "typeVersion": "1.1",
             "attributeDefs": [
                 {
@@ -119,6 +121,7 @@
                     "isUnique": false
                 }
             ],
+            "serviceType": "hbase",
             "typeVersion": "1.0"
         },
         {
@@ -144,12 +147,14 @@
                     ]
                 }
             ],
+            "serviceType": "hbase",
             "typeVersion": "1.0"
         }
     ],
     "relationshipDefs": [
         {
             "name": "hbase_table_namespace",
+            "serviceType": "hbase",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -169,6 +174,7 @@
         },
         {
             "name": "hbase_table_column_families",
+            "serviceType": "hbase",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -189,6 +195,7 @@
         },
         {
             "name": "hbase_column_family_columns",
+            "serviceType": "hbase",
             "typeVersion": "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1065-avro_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1065-avro_model.json b/addons/models/1000-Hadoop/1065-avro_model.json
index 17fba8b..4e42a54 100644
--- a/addons/models/1000-Hadoop/1065-avro_model.json
+++ b/addons/models/1000-Hadoop/1065-avro_model.json
@@ -9,6 +9,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
             ]
@@ -19,6 +20,7 @@
             "superTypes": [
                 "avro_type"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -53,6 +55,7 @@
             "superTypes": [
                 "avro_type"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -124,6 +127,7 @@
             "superTypes": [
                 "avro_record"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -150,6 +154,7 @@
             "superTypes": [
                 "avro_type"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
             ]
@@ -160,6 +165,7 @@
             "superTypes": [
                 "avro_type"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
             ]
@@ -170,6 +176,7 @@
             "superTypes": [
                 "avro_type"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -196,6 +203,7 @@
             "superTypes": [
                 "avro_type"
             ],
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -220,6 +228,7 @@
     "relationshipDefs": [
         {
             "name": "avro_schema_associatedEntities",
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {
@@ -239,6 +248,7 @@
         },
         {
             "name": "avro_record_fields",
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "relationshipCategory": "AGGREGATION",
             "endDef1": {
@@ -258,6 +268,7 @@
         },
         {
             "name": "avro_field_types",
+            "serviceType": "avro",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1070-kafka_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1070-kafka_model.json b/addons/models/1000-Hadoop/1070-kafka_model.json
index 2640028..a01e03e 100644
--- a/addons/models/1000-Hadoop/1070-kafka_model.json
+++ b/addons/models/1000-Hadoop/1070-kafka_model.json
@@ -8,6 +8,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "kafka",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -178,6 +179,7 @@
             "superTypes": [
                 "DataSet"
             ],
+            "serviceType": "kafka",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -202,6 +204,7 @@
     "relationshipDefs": [
         {
             "name": "kafka_topic_avroSchema",
+            "serviceType": "kafka",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/1080-storm_model.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/1080-storm_model.json b/addons/models/1000-Hadoop/1080-storm_model.json
index 7ca7a8f..0935176 100644
--- a/addons/models/1000-Hadoop/1080-storm_model.json
+++ b/addons/models/1000-Hadoop/1080-storm_model.json
@@ -8,6 +8,7 @@
             "superTypes": [
                 "Process"
             ],
+            "serviceType": "storm",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -65,6 +66,7 @@
         {
             "name": "storm_node",
             "superTypes": [],
+            "serviceType": "storm",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -106,6 +108,7 @@
             "superTypes": [
                 "storm_node"
             ],
+            "serviceType": "storm",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -123,6 +126,7 @@
             "superTypes": [
                 "storm_node"
             ],
+            "serviceType": "storm",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -147,6 +151,7 @@
     "relationshipDefs": [
         {
             "name": "storm_topology_nodes",
+            "serviceType": "storm",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/1000-Hadoop/patches/007-hadoop_model_add_service_type.json
----------------------------------------------------------------------
diff --git a/addons/models/1000-Hadoop/patches/007-hadoop_model_add_service_type.json b/addons/models/1000-Hadoop/patches/007-hadoop_model_add_service_type.json
new file mode 100644
index 0000000..627bbae
--- /dev/null
+++ b/addons/models/1000-Hadoop/patches/007-hadoop_model_add_service_type.json
@@ -0,0 +1,382 @@
+{
+  "patches": [
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "file_action",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "file_system"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "fs_permissions",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "file_system"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "fs_path",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "file_system"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hdfs_path",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+      "serviceType":     "file_system"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_principal_type",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_order",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_serde",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_process",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_table",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_storagedesc",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_db",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_column",
+      "applyToVersion":  "1.3",
+      "updateToVersion": "1.4",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_column_lineage",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_table_db",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_table_columns",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_table_partitionkeys",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_table_storagedesc",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hive_process_column_lineage",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hive"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "sqoop_process",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "sqoop"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "sqoop_dbdatastore",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "sqoop"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_feed_replication",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_cluster",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_feed",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_process",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_feed_creation",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_feed_cluster",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_cluster_process",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "falcon_cluster_feed_creation",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "falcon"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hbase_namespace",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hbase"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hbase_table",
+      "applyToVersion":  "1.3",
+      "updateToVersion": "1.4",
+      "serviceType":     "hbase"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hbase_column_family",
+      "applyToVersion":  "1.2",
+      "updateToVersion": "1.3",
+      "serviceType":     "hbase"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hbase_column",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hbase"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hbase_table_namespace",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hbase"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hbase_table_column_families",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hbase"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "hbase_column_family_columns",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "hbase"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_type",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_field",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_record",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_schema",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_primitive",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_fixed",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_enum",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_collection",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_schema_associatedEntities",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_record_fields",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "avro_field_types",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "avro"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "kafka_topic",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+      "serviceType":     "kafka"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "jms_topic",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "kafka"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "kafka_topic_avroSchema",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "kafka"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "storm_topology",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "storm"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "storm_node",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "storm"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "storm_spout",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "storm"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "storm_bolt",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "storm"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "storm_topology_nodes",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "storm"
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/2000-RDBMS/2010-rdbms_model.json
----------------------------------------------------------------------
diff --git a/addons/models/2000-RDBMS/2010-rdbms_model.json b/addons/models/2000-RDBMS/2010-rdbms_model.json
index 7d1747b..8fe185d 100644
--- a/addons/models/2000-RDBMS/2010-rdbms_model.json
+++ b/addons/models/2000-RDBMS/2010-rdbms_model.json
@@ -7,6 +7,7 @@
             "name": "rdbms_instance",
             "description": "Instance that the rdbms server is running on",
             "superTypes": ["DataSet", "Asset"],
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -92,6 +93,7 @@
             "name": "rdbms_db",
             "description": "a database (schema) in an rdbms",
             "superTypes": ["DataSet", "Asset"],
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -145,6 +147,7 @@
             "name": "rdbms_table",
             "description": "a table in an rdbms database (schema)",
             "superTypes": ["DataSet", "Asset"],
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -250,6 +253,7 @@
             "name": "rdbms_column",
             "description": "a column in an rdbms table",
             "superTypes": ["DataSet", "Asset"],
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -322,6 +326,7 @@
             "name": "rdbms_index",
             "description": "An index on an RDBMS table",
             "superTypes": ["DataSet", "Asset"],
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -378,6 +383,7 @@
             "name": "rdbms_foreign_key",
             "description": null,
             "superTypes": ["DataSet", "Asset"],
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -418,6 +424,7 @@
     "relationshipDefs": [
         {
             "name": "rdbms_instance_databases",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "AGGREGATION",
             "endDef1": {
@@ -438,6 +445,7 @@
         },
         {
             "name": "rdbms_db_tables",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "AGGREGATION",
             "endDef1": {
@@ -458,6 +466,7 @@
         },
         {
             "name": "rdbms_table_columns",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "AGGREGATION",
             "endDef1": {
@@ -478,6 +487,7 @@
         },
         {
             "name": "rdbms_table_indexes",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "AGGREGATION",
             "endDef1": {
@@ -498,6 +508,7 @@
         },
         {
             "name": "rdbms_index_columns",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {
@@ -518,6 +529,7 @@
         },
         {
             "name": "rdbms_table_foreign_key",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "AGGREGATION",
             "endDef1": {
@@ -538,6 +550,7 @@
         },
         {
             "name": "rdbms_foreign_key_key_columns",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {
@@ -557,6 +570,7 @@
         },
         {
             "name": "rdbms_foreign_key_table_references",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {
@@ -576,6 +590,7 @@
         },
         {
             "name": "rdbms_foreign_key_column_references",
+            "serviceType": "rdbms",
             "typeVersion": "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/2000-RDBMS/patches/002-rdbms_model_add_service_type.json
----------------------------------------------------------------------
diff --git a/addons/models/2000-RDBMS/patches/002-rdbms_model_add_service_type.json b/addons/models/2000-RDBMS/patches/002-rdbms_model_add_service_type.json
new file mode 100644
index 0000000..6a153e4
--- /dev/null
+++ b/addons/models/2000-RDBMS/patches/002-rdbms_model_add_service_type.json
@@ -0,0 +1,109 @@
+{
+  "patches": [
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_instance",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_db",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_table",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_column",
+      "applyToVersion":  "1.1",
+      "updateToVersion": "1.2",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_index",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_foreign_key",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_instance_databases",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_db_tables",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_table_columns",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_table_indexes",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_index_columns",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_table_foreign_key",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_foreign_key_key_columns",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_foreign_key_table_references",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "rdbms_foreign_key_column_references",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "rdbms"
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/3000-Cloud/3010-aws_common_typedefs.json
----------------------------------------------------------------------
diff --git a/addons/models/3000-Cloud/3010-aws_common_typedefs.json b/addons/models/3000-Cloud/3010-aws_common_typedefs.json
index fc5b48c..b7a92c3 100644
--- a/addons/models/3000-Cloud/3010-aws_common_typedefs.json
+++ b/addons/models/3000-Cloud/3010-aws_common_typedefs.json
@@ -4,6 +4,7 @@
         {
             "name":        "aws_tag",
             "description": "Atlas Type representing a tag/value pair associated with an AWS object, eg S3 bucket",
+            "serviceType": "aws",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -27,6 +28,7 @@
         {
             "name":        "aws_cloud_watch_metric",
             "description": "Atlas Type representing a metric provided by AWS Cloud Watch",
+            "serviceType": "aws",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/3000-Cloud/3020-aws_s3_typedefs.json
----------------------------------------------------------------------
diff --git a/addons/models/3000-Cloud/3020-aws_s3_typedefs.json b/addons/models/3000-Cloud/3020-aws_s3_typedefs.json
index 480fd1f..806e7f5 100644
--- a/addons/models/3000-Cloud/3020-aws_s3_typedefs.json
+++ b/addons/models/3000-Cloud/3020-aws_s3_typedefs.json
@@ -4,6 +4,7 @@
         {
             "name":        "aws_s3_bucket_lifeCycleRule",
             "description": "Atlas Type representing the life cycle rules for S3 object store bucket",
+            "serviceType": "aws",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -35,6 +36,7 @@
         {
             "name":        "aws_s3_access_policy",
             "description": "Atlas Type representing an access policy statement on an S3 bucket. Can later be fleshed out to represent the JSON structure of the statement.",
+            "serviceType": "aws",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -54,6 +56,7 @@
             "name":        "aws_s3_object",
             "description": "Atlas Type representing an Object (file) in an S3 Object Store Bucket",
             "superTypes":  [ "DataSet" ],
+            "serviceType": "aws",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -118,6 +121,7 @@
             "name":        "aws_s3_pseudo_dir",
             "description": "Atlas Type representing a Pseudo-Directory (prefix) in an S3 Object Store Bucket",
             "superTypes":  [ "DataSet" ],
+            "serviceType": "aws",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -219,6 +223,7 @@
             "name":        "aws_s3_bucket",
             "description": "Atlas Type representing a Bucket in an AWS S3 Object Store",
             "superTypes":  [ "DataSet" ],
+            "serviceType": "aws",
             "typeVersion": "1.0",
             "attributeDefs": [
                 {
@@ -320,6 +325,7 @@
     "relationshipDefs": [
         {
             "name":                 "aws_s3_bucket_aws_s3_pseudo_dirs",
+            "serviceType":          "aws",
             "typeVersion":          "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -340,6 +346,7 @@
         },
         {
             "name":                 "aws_s3_pseudo_dir_aws_objects",
+            "serviceType":          "aws",
             "typeVersion":          "1.0",
             "relationshipCategory": "COMPOSITION",
             "endDef1": {
@@ -360,6 +367,7 @@
         },
         {
             "name":                 "aws_s3_object_avro_schema",
+            "serviceType":          "aws",
             "typeVersion":          "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {
@@ -379,6 +387,7 @@
         },
         {
             "name":                 "aws_s3_pseudo_dir_avro_schema",
+            "serviceType":          "aws",
             "typeVersion":          "1.0",
             "relationshipCategory": "ASSOCIATION",
             "endDef1": {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/addons/models/3000-Cloud/patches/001-cloud_model_add_service_type.json
----------------------------------------------------------------------
diff --git a/addons/models/3000-Cloud/patches/001-cloud_model_add_service_type.json b/addons/models/3000-Cloud/patches/001-cloud_model_add_service_type.json
new file mode 100644
index 0000000..320ae63
--- /dev/null
+++ b/addons/models/3000-Cloud/patches/001-cloud_model_add_service_type.json
@@ -0,0 +1,81 @@
+{
+  "patches": [
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_tag",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_cloud_watch_metric",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_bucket_lifeCycleRule",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_access_policy",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_object",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_pseudo_dir",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_bucket",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_bucket_aws_s3_pseudo_dirs",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_pseudo_dir_aws_objects",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_object_avro_schema",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    },
+    {
+      "action":          "SET_SERVICE_TYPE",
+      "typeName":        "aws_s3_pseudo_dir_avro_schema",
+      "applyToVersion":  "1.0",
+      "updateToVersion": "1.1",
+      "serviceType":     "aws"
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/common/src/main/java/org/apache/atlas/repository/Constants.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/atlas/repository/Constants.java b/common/src/main/java/org/apache/atlas/repository/Constants.java
index 1cfe940..d677814 100644
--- a/common/src/main/java/org/apache/atlas/repository/Constants.java
+++ b/common/src/main/java/org/apache/atlas/repository/Constants.java
@@ -64,6 +64,7 @@ public final class Constants {
     public static final String TYPEDESCRIPTION_PROPERTY_KEY = getEncodedTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.description");
     public static final String TYPEVERSION_PROPERTY_KEY     = getEncodedTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.version");
     public static final String TYPEOPTIONS_PROPERTY_KEY     = getEncodedTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.options");
+    public static final String TYPESERVICETYPE_PROPERTY_KEY = getEncodedTypePropertyKey(INTERNAL_PROPERTY_KEY_PREFIX + "type.servicetype");
 
     // relationship def constants
     public static final String RELATIONSHIPTYPE_END1_KEY                               = "endDef1";

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
index d8e7184..5dfb304 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
@@ -123,7 +123,7 @@ public abstract class AtlasBaseTypeDef implements java.io.Serializable {
         ATLAS_TYPE_OBJECT_ID,
     };
 
-
+    public static final String     SERVICE_TYPE_ATLAS_CORE    = "atlas_core";
     public static final String     SERIALIZED_DATE_FORMAT_STR = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
 
     @Deprecated
@@ -158,10 +158,11 @@ public abstract class AtlasBaseTypeDef implements java.io.Serializable {
     private String  name;
     private String  description;
     private String  typeVersion;
+    private String  serviceType;
     private Map<String, String> options;
 
     protected AtlasBaseTypeDef(TypeCategory category, String name, String description, String typeVersion,
-                               Map<String, String> options) {
+                               String serviceType, Map<String, String> options) {
         super();
 
         this.category = category;
@@ -175,6 +176,7 @@ public abstract class AtlasBaseTypeDef implements java.io.Serializable {
         setName(name);
         setDescription(description);
         setTypeVersion(typeVersion);
+        setServiceType(serviceType);
         setOptions(options);
     }
 
@@ -283,6 +285,14 @@ public abstract class AtlasBaseTypeDef implements java.io.Serializable {
         this.typeVersion = typeVersion;
     }
 
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
     public Map<String, String> getOptions() {
         return options;
     }
@@ -311,6 +321,7 @@ public abstract class AtlasBaseTypeDef implements java.io.Serializable {
         sb.append(", name='").append(name).append('\'');
         sb.append(", description='").append(description).append('\'');
         sb.append(", typeVersion='").append(typeVersion).append('\'');
+        sb.append(", serviceType='").append(serviceType).append('\'');
         sb.append(", options='").append(options).append('\'');
         sb.append('}');
 
@@ -333,8 +344,9 @@ public abstract class AtlasBaseTypeDef implements java.io.Serializable {
                 Objects.equals(version, that.version) &&
                 Objects.equals(name, that.name) &&
                 Objects.equals(description, that.description) &&
-                Objects.equals(typeVersion, that.typeVersion);
-
+                Objects.equals(typeVersion, that.typeVersion) &&
+                Objects.equals(serviceType, that.serviceType) &&
+                Objects.equals(options, that.options);
     }
 
     @Override
@@ -349,6 +361,7 @@ public abstract class AtlasBaseTypeDef implements java.io.Serializable {
         result = 31 * result + (name != null ? name.hashCode() : 0);
         result = 31 * result + (description != null ? description.hashCode() : 0);
         result = 31 * result + (typeVersion != null ? typeVersion.hashCode() : 0);
+        result = 31 * result + (serviceType != null ? serviceType.hashCode() : 0);
         result = 31 * result + (options != null ? options.hashCode() : 0);
         return result;
     }

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
index a7e870c..55bcd26 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
@@ -84,7 +84,12 @@ public class AtlasEnumDef extends AtlasBaseTypeDef implements Serializable {
 
     public AtlasEnumDef(String name, String description, String typeVersion, List<AtlasEnumElementDef> elementDefs,
                         String defaultValue, Map<String, String> options) {
-        super(TypeCategory.ENUM, name, description, typeVersion, options);
+        this(name, description, typeVersion, elementDefs, defaultValue, null, options);
+    }
+
+    public AtlasEnumDef(String name, String description, String typeVersion, List<AtlasEnumElementDef> elementDefs,
+                        String defaultValue, String serviceType, Map<String, String> options) {
+        super(TypeCategory.ENUM, name, description, typeVersion, serviceType, options);
 
         setElementDefs(elementDefs);
         setDefaultValue(defaultValue);

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
index 921cf3f..a4d6bed 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
@@ -89,7 +89,11 @@ public class AtlasStructDef extends AtlasBaseTypeDef implements Serializable {
     }
 
     protected AtlasStructDef(TypeCategory category, String name, String description, String typeVersion, List<AtlasAttributeDef> attributeDefs, Map<String, String> options) {
-        super(category, name, description, typeVersion, options);
+        this(category, name, description, typeVersion, attributeDefs, null, options);
+    }
+
+    protected AtlasStructDef(TypeCategory category, String name, String description, String typeVersion, List<AtlasAttributeDef> attributeDefs, String serviceType, Map<String, String> options) {
+        super(category, name, description, typeVersion, serviceType, options);
 
         setAttributeDefs(attributeDefs);
     }

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/type/AtlasArrayType.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasArrayType.java b/intg/src/main/java/org/apache/atlas/type/AtlasArrayType.java
index 6f331ea..ee6eb8e 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasArrayType.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasArrayType.java
@@ -30,6 +30,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Set;
 
+import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.SERVICE_TYPE_ATLAS_CORE;
 import static org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.COUNT_NOT_SET;
 
 /**
@@ -49,7 +50,7 @@ public class AtlasArrayType extends AtlasType {
     }
 
     public AtlasArrayType(AtlasType elementType, int minCount, int maxCount) {
-        super(AtlasBaseTypeDef.getArrayTypeName(elementType.getTypeName()), TypeCategory.ARRAY);
+        super(AtlasBaseTypeDef.getArrayTypeName(elementType.getTypeName()), TypeCategory.ARRAY, SERVICE_TYPE_ATLAS_CORE);
 
         this.elementTypeName = elementType.getTypeName();
         this.minCount        = minCount;
@@ -57,26 +58,13 @@ public class AtlasArrayType extends AtlasType {
         this.elementType     = elementType;
     }
 
-    public AtlasArrayType(String elementTypeName) {
-        this(elementTypeName, COUNT_NOT_SET, COUNT_NOT_SET);
-    }
-
-    public AtlasArrayType(String elementTypeName, int minCount, int maxCount) {
-        super(AtlasBaseTypeDef.getArrayTypeName(elementTypeName), TypeCategory.ARRAY);
-
-        this.elementTypeName = elementTypeName;
-        this.minCount        = minCount;
-        this.maxCount        = maxCount;
-        this.elementType     = null;
-    }
-
     public AtlasArrayType(String elementTypeName, AtlasTypeRegistry typeRegistry) throws AtlasBaseException {
         this(elementTypeName, COUNT_NOT_SET, COUNT_NOT_SET, typeRegistry);
     }
 
     public AtlasArrayType(String elementTypeName, int minCount, int maxCount, AtlasTypeRegistry typeRegistry)
         throws  AtlasBaseException {
-        super(AtlasBaseTypeDef.getArrayTypeName(elementTypeName), TypeCategory.ARRAY);
+        super(AtlasBaseTypeDef.getArrayTypeName(elementTypeName), TypeCategory.ARRAY, SERVICE_TYPE_ATLAS_CORE);
 
         this.elementTypeName = elementTypeName;
         this.minCount        = minCount;

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java b/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
index 1e0c9e6..aa9f722 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasBuiltInTypes.java
@@ -30,6 +30,8 @@ import java.text.ParseException;
 import java.util.Date;
 import java.util.Map;
 
+import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.SERVICE_TYPE_ATLAS_CORE;
+
 
 /**
  * Built-in types in Atlas.
@@ -43,7 +45,7 @@ public class AtlasBuiltInTypes {
         private static final Boolean DEFAULT_VALUE = Boolean.FALSE;
 
         public AtlasBooleanType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_BOOLEAN, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_BOOLEAN, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -77,7 +79,7 @@ public class AtlasBuiltInTypes {
         private static final Byte DEFAULT_VALUE = (byte) 0;
 
         public AtlasByteType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_BYTE, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_BYTE, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -125,7 +127,7 @@ public class AtlasBuiltInTypes {
         private static final Short DEFAULT_VALUE = (short) 0;
 
         public AtlasShortType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_SHORT, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_SHORT, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -169,7 +171,7 @@ public class AtlasBuiltInTypes {
         private static final Integer DEFAULT_VALUE = 0;
 
         public AtlasIntType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_INT, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_INT, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -213,7 +215,7 @@ public class AtlasBuiltInTypes {
         private static final Long DEFAULT_VALUE = 0L;
 
         public AtlasLongType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_LONG, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_LONG, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -258,7 +260,7 @@ public class AtlasBuiltInTypes {
         private static final Float FLOAT_EPSILON = 0.00000001f;
 
         public AtlasFloatType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_FLOAT, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_FLOAT, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -334,7 +336,7 @@ public class AtlasBuiltInTypes {
         private static final Double DOUBLE_EPSILON = 0.00000001d;
 
         public AtlasDoubleType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_DOUBLE, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_DOUBLE, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -411,7 +413,7 @@ public class AtlasBuiltInTypes {
         private static final BigInteger DEFAULT_VALUE = BigInteger.ZERO;
 
         public AtlasBigIntegerType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_BIGINTEGER, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_BIGINTEGER, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -457,7 +459,7 @@ public class AtlasBuiltInTypes {
         private static final BigDecimal DEFAULT_VALUE = BigDecimal.ZERO;
 
         public AtlasBigDecimalType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_BIGDECIMAL, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_BIGDECIMAL, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -503,7 +505,7 @@ public class AtlasBuiltInTypes {
         private static final Date DEFAULT_VALUE = new Date(0);
 
         public AtlasDateType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_DATE, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_DATE, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -557,7 +559,7 @@ public class AtlasBuiltInTypes {
         private static final String OPTIONAL_DEFAULT_VALUE = null;
 
         public AtlasStringType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_STRING, TypeCategory.PRIMITIVE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_STRING, TypeCategory.PRIMITIVE, SERVICE_TYPE_ATLAS_CORE);
         }
 
         @Override
@@ -594,13 +596,13 @@ public class AtlasBuiltInTypes {
         private final String objectType;
 
         public AtlasObjectIdType() {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_OBJECT_ID, TypeCategory.OBJECT_ID_TYPE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_OBJECT_ID, TypeCategory.OBJECT_ID_TYPE, SERVICE_TYPE_ATLAS_CORE);
 
             objectType = AtlasBaseTypeDef.ATLAS_TYPE_ASSET;
         }
 
         public AtlasObjectIdType(String objectType) {
-            super(AtlasBaseTypeDef.ATLAS_TYPE_OBJECT_ID, TypeCategory.OBJECT_ID_TYPE);
+            super(AtlasBaseTypeDef.ATLAS_TYPE_OBJECT_ID, TypeCategory.OBJECT_ID_TYPE, SERVICE_TYPE_ATLAS_CORE);
 
             this.objectType = objectType;
         }

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/type/AtlasMapType.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasMapType.java b/intg/src/main/java/org/apache/atlas/type/AtlasMapType.java
index 2c5fa56..1ea921a 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasMapType.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasMapType.java
@@ -24,9 +24,10 @@ import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.lang.reflect.Array;
 import java.util.*;
 
+import static org.apache.atlas.model.typedef.AtlasBaseTypeDef.SERVICE_TYPE_ATLAS_CORE;
+
 
 /**
  * class that implements behaviour of a map-type.
@@ -40,15 +41,8 @@ public class AtlasMapType extends AtlasType {
     private AtlasType keyType;
     private AtlasType valueType;
 
-    public AtlasMapType(String keyTypeName, String valueTypeName) {
-        super(AtlasBaseTypeDef.getMapTypeName(keyTypeName, valueTypeName), TypeCategory.MAP);
-
-        this.keyTypeName   = keyTypeName;
-        this.valueTypeName = valueTypeName;
-    }
-
     public AtlasMapType(AtlasType keyType, AtlasType valueType) {
-        super(AtlasBaseTypeDef.getMapTypeName(keyType.getTypeName(), valueType.getTypeName()), TypeCategory.MAP);
+        super(AtlasBaseTypeDef.getMapTypeName(keyType.getTypeName(), valueType.getTypeName()), TypeCategory.MAP, SERVICE_TYPE_ATLAS_CORE);
 
         this.keyTypeName   = keyType.getTypeName();
         this.valueTypeName = valueType.getTypeName();
@@ -58,7 +52,7 @@ public class AtlasMapType extends AtlasType {
 
     public AtlasMapType(String keyTypeName, String valueTypeName, AtlasTypeRegistry typeRegistry)
         throws AtlasBaseException {
-        super(AtlasBaseTypeDef.getMapTypeName(keyTypeName, valueTypeName), TypeCategory.MAP);
+        super(AtlasBaseTypeDef.getMapTypeName(keyTypeName, valueTypeName), TypeCategory.MAP, SERVICE_TYPE_ATLAS_CORE);
 
         this.keyTypeName   = keyTypeName;
         this.valueTypeName = valueTypeName;

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/type/AtlasType.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasType.java b/intg/src/main/java/org/apache/atlas/type/AtlasType.java
index b775f7c..228198a 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasType.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasType.java
@@ -26,7 +26,6 @@ import org.apache.atlas.utils.AtlasJson;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
 import java.util.List;
 import java.util.Objects;
 
@@ -41,14 +40,16 @@ public abstract class AtlasType {
 
     private final String       typeName;
     private final TypeCategory typeCategory;
+    private final String       serviceType;
 
     protected AtlasType(AtlasBaseTypeDef typeDef) {
-        this(typeDef.getName(), typeDef.getCategory());
+        this(typeDef.getName(), typeDef.getCategory(), typeDef.getServiceType());
     }
 
-    protected AtlasType(String typeName, TypeCategory typeCategory) {
+    protected AtlasType(String typeName, TypeCategory typeCategory, String serviceType) {
         this.typeName     = typeName;
         this.typeCategory = typeCategory;
+        this.serviceType  = serviceType;
     }
 
     void resolveReferences(AtlasTypeRegistry typeRegistry) throws AtlasBaseException {
@@ -64,6 +65,8 @@ public abstract class AtlasType {
 
     public TypeCategory getTypeCategory() { return typeCategory; }
 
+    public String getServiceType() { return serviceType; }
+
     public abstract Object createDefaultValue();
 
     public Object createOptionalDefaultValue() {

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java b/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
index 5f55b43..21f9429 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasTypeRegistry.java
@@ -36,8 +36,10 @@ import javax.inject.Singleton;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
@@ -70,6 +72,8 @@ public class AtlasTypeRegistry {
 
     public Collection<AtlasType> getAllTypes() { return registryData.allTypes.getAllTypes(); }
 
+    public Set<String> getAllServiceTypes() { return registryData.allTypes.getAllServiceTypes(); }
+
     public boolean isRegisteredType(String typeName) {
         return registryData.allTypes.isKnownType(typeName);
     }
@@ -916,15 +920,18 @@ public class AtlasTypeRegistry {
 class TypeCache {
     private final Map<String, AtlasType> typeGuidMap;
     private final Map<String, AtlasType> typeNameMap;
+    private final Set<String>            serviceTypes;
 
     public TypeCache() {
-        typeGuidMap = new ConcurrentHashMap<>();
-        typeNameMap = new ConcurrentHashMap<>();
+        typeGuidMap  = new ConcurrentHashMap<>();
+        typeNameMap  = new ConcurrentHashMap<>();
+        serviceTypes = new HashSet<>();
     }
 
     public TypeCache(TypeCache other) {
-        typeGuidMap = new ConcurrentHashMap<>(other.typeGuidMap);
-        typeNameMap = new ConcurrentHashMap<>(other.typeNameMap);
+        typeGuidMap  = new ConcurrentHashMap<>(other.typeGuidMap);
+        typeNameMap  = new ConcurrentHashMap<>(other.typeNameMap);
+        serviceTypes = new HashSet<>(other.serviceTypes);
     }
 
     public void addType(AtlasType type) {
@@ -932,6 +939,10 @@ class TypeCache {
             if (StringUtils.isNotEmpty(type.getTypeName())) {
                 typeNameMap.put(type.getTypeName(), type);
             }
+
+            if (StringUtils.isNotEmpty(type.getServiceType())) {
+                serviceTypes.add(type.getServiceType());
+            }
         }
     }
 
@@ -944,6 +955,10 @@ class TypeCache {
             if (StringUtils.isNotEmpty(typeDef.getName())) {
                 typeNameMap.put(typeDef.getName(), type);
             }
+
+            if (StringUtils.isNotEmpty(type.getServiceType())) {
+                serviceTypes.add(type.getServiceType());
+            }
         }
     }
 
@@ -959,6 +974,10 @@ class TypeCache {
         return Collections.unmodifiableCollection(typeNameMap.values());
     }
 
+    public Set<String> getAllServiceTypes() {
+        return Collections.unmodifiableSet(serviceTypes);
+    }
+
     public AtlasType getTypeByGuid(String guid) {
 
         return guid != null ? typeGuidMap.get(guid) : null;

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java b/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
index ff0c1fc..23624eb 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
@@ -308,6 +308,24 @@ public class AtlasTypeUtil {
         return headerList;
     }
 
+    public static AtlasTypesDef getTypesDef(AtlasBaseTypeDef typeDef) {
+        AtlasTypesDef ret = new AtlasTypesDef();
+
+        if (typeDef != null) {
+            if (typeDef.getClass().equals(AtlasEntityDef.class)) {
+                ret.getEntityDefs().add((AtlasEntityDef) typeDef);
+            } else if (typeDef.getClass().equals(AtlasClassificationDef.class)) {
+                ret.getClassificationDefs().add((AtlasClassificationDef) typeDef);
+            } else if (typeDef.getClass().equals(AtlasStructDef.class)) {
+                ret.getStructDefs().add((AtlasStructDef) typeDef);
+            } else if (typeDef.getClass().equals(AtlasEnumDef.class)) {
+                ret.getEnumDefs().add((AtlasEnumDef) typeDef);
+            }
+        }
+
+        return ret;
+    }
+
     public static Collection<AtlasObjectId> toObjectIds(Collection<AtlasEntity> entities) {
         List<AtlasObjectId> ret = new ArrayList<>();
 

http://git-wip-us.apache.org/repos/asf/atlas/blob/36656ea7/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java b/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
index bae2c3f..74f73b4 100755
--- a/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
+++ b/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
@@ -272,6 +272,7 @@ public class GraphBackedSearchIndexer implements SearchIndexer, ActiveStateChang
             createVertexIndex(management, TRAIT_NAMES_PROPERTY_KEY, String.class, false, SET, true, true);
             createVertexIndex(management, PROPAGATED_TRAIT_NAMES_PROPERTY_KEY, String.class, false, LIST, true, true);
             createVertexIndex(management, TYPENAME_PROPERTY_KEY, String.class, true, SINGLE, true, false);
+            createVertexIndex(management, TYPESERVICETYPE_PROPERTY_KEY, String.class, false, SINGLE, true, false);
             createVertexIndex(management, VERTEX_TYPE_PROPERTY_KEY, String.class, false, SINGLE, true, true);
             createVertexIndex(management, CLASSIFICATION_ENTITY_GUID, String.class, false, SINGLE, true, false);
             createVertexIndex(management, VERTEX_ID_IN_IMPORT_KEY, Long.class, false, SINGLE, true, false);