----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52585/#review151774 -----------------------------------------------------------
Whats the difference between Def and Type. For example, AtlasClassificationType and AtlasClassificationDef? When is what used? We seem to be going back to the old class complexity of two classes for the same type - TraitType and HierarchicalTypeDefinition. Can we just have one class - just Def? repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java (line 578) <https://reviews.apache.org/r/52585/#comment220279> Move to AtlasType repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java (line 630) <https://reviews.apache.org/r/52585/#comment220280> rename to getEdgeLabelForTypeStore repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasStructDefMapperV1.java (line 115) <https://reviews.apache.org/r/52585/#comment220281> What about type version? Thats not maintaned anymore? repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasStructDefMapperV1.java (line 177) <https://reviews.apache.org/r/52585/#comment220282> attributeTypes is loaded from atlasTypeRegistry. So, how can they not be in allTypes? repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasStructDefMapperV1.java (line 236) <https://reviews.apache.org/r/52585/#comment220283> can't it use from atlasTypeRegistry.allTypes? repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasStructDefMapperV1.java (line 259) <https://reviews.apache.org/r/52585/#comment220284> Move to AtlasAttributeDef repository/src/main/java/org/apache/atlas/repository/store/AtlasStore.java (line 69) <https://reviews.apache.org/r/52585/#comment220285> Remove this interface. Can't load all entities/types repository/src/main/java/org/apache/atlas/repository/store/AtlasStore.java (line 123) <https://reviews.apache.org/r/52585/#comment220286> Add delete by list of names and list of guids repository/src/main/java/org/apache/atlas/repository/store/typedef/AbstractAtlasStore.java (lines 35 - 36) <https://reviews.apache.org/r/52585/#comment220287> These are already defined in Constants repository/src/main/java/org/apache/atlas/repository/store/typedef/StructDefStore.java (line 42) <https://reviews.apache.org/r/52585/#comment220288> All the type stores StructDefStore, EnumDefStore etc have the same logic - find from vertex and use the corresponding mapper. So, move the common code to base class webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java (line 193) <https://reviews.apache.org/r/52585/#comment220289> Returning all types can't be scaled. Lets not expose getAll APIs webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java (line 588) <https://reviews.apache.org/r/52585/#comment220290> Don't return all types webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java (line 643) <https://reviews.apache.org/r/52585/#comment220291> Use LinkedHashMap instead of creating bot map and list webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java (line 646) <https://reviews.apache.org/r/52585/#comment220292> same code repeats here and in the next function. All types have same base class. Extract them to functions which are re-used across types webapp/src/main/java/org/apache/atlas/web/util/TypeValidator.java (line 38) <https://reviews.apache.org/r/52585/#comment220293> There is a lot of validation done in TypeSystem. make sure all checks are covered How are type guid and name related? When is guid generated? AtlasTypeRegistry - the types are duplicated across allTypes and individual type cache. We should avoid this to consume memory - Shwetha GS On Oct. 7, 2016, 8:23 a.m., Apoorv Naik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52585/ > ----------------------------------------------------------- > > (Updated Oct. 7, 2016, 8:23 a.m.) > > > Review request for atlas, Madhan Neethiraj, Sarath Kumar Subramanian, Shwetha > GS, and Suma Shivaprasad. > > > Repository: atlas > > > Description > ------- > > TypesREST implementation > > TODO: Update and delete operations need to be refined > > > Diffs > ----- > > .gitignore e10adbc4457f6297600f0feb01eb54718b8ec406 > intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java > a3fdbcc025bf5f56e7770015d55616ec83d2be64 > intg/src/main/java/org/apache/atlas/model/typedef/AtlasTypesDef.java > PRE-CREATION > intg/src/main/java/org/apache/atlas/type/AtlasStructType.java > 096f061f16bba3ecb886d00ec66c98ad17c1e243 > repository/pom.xml 7a34331ce2876d9d9e916f96f1141d3efa91e959 > > repository/src/main/java/org/apache/atlas/repository/graph/FullTextMapper.java > b342e2700d454b0d6fba595b5cc01cd0e06bbdac > > repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedMetadataRepository.java > 263ea465fda0b445a952943def9a6f7c49834f25 > repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java > 1ce87c9d306faa43fb9d3fdc491c4bcbdd7b2bdb > > repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java > 5c7cb2e8fa32b540f80beed40fb4f25a89d39c56 > > repository/src/main/java/org/apache/atlas/repository/graph/TypedInstanceToGraphMapper.java > 2e0414e2cee7ca3d5958650ac6abc8a290473545 > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/AtlasClassificationDefMapper.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/AtlasEntityDefMapper.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/AtlasEnumDefMapper.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/AtlasStructDefMapper.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/BaseTypeDefMapper.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/factory/AtlasMapperFactory.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasClassificationDefMapperV1.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasEntityDefMapperV1.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasEnumDefMapperV1.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/graph/mapper/impl/AtlasStructDefMapperV1.java > PRE-CREATION > repository/src/main/java/org/apache/atlas/repository/store/AtlasStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/instance/AbstractInstanceStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/instance/AtlasInstanceStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/instance/ClassificationStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/instance/EntityStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/instance/StructStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/typedef/AbstractAtlasStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/typedef/AtlasTypeDefStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/typedef/ClassificationDefStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/typedef/EntityDefStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/typedef/EnumDefStore.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/typedef/StructDefStore.java > PRE-CREATION > webapp/pom.xml 8fe4b9bed7efefdcc623df2f8e9cfa6ef84d8514 > webapp/src/main/java/org/apache/atlas/web/listeners/GuiceServletConfig.java > a1d3187cea0422988500195191de37732c7df56f > webapp/src/main/java/org/apache/atlas/web/rest/InstancesREST.java > PRE-CREATION > webapp/src/main/java/org/apache/atlas/web/rest/RestModule.java PRE-CREATION > webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java > 429df65a86aba1f5a40875e1554d09ec238fb9d2 > webapp/src/main/java/org/apache/atlas/web/util/TypeValidator.java > PRE-CREATION > webapp/src/main/resources/errorMessages.properties PRE-CREATION > webapp/src/main/webapp/WEB-INF/web.xml > e2a85e9865e52cc86cf385eae1dd6f0e95687a8e > > Diff: https://reviews.apache.org/r/52585/diff/ > > > Testing > ------- > > Onlt via Curl and Postman. > > Unit/Integration tests are in progress. > > > Thanks, > > Apoorv Naik > >
