----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65220/ -----------------------------------------------------------
Review request for atlas, Madhan Neethiraj and Sarath Subramanian. Bugs: ATLAS-2372 https://issues.apache.org/jira/browse/ATLAS-2372 Repository: atlas Description ------- **Background** After introduction of _relationshipAttributes_ the import of types with relationship attributes started failing. **Analysis** Root cause: The _AtlasEntityGraphDiscoveryV1_ started using _relationshipAttribute_ to discover entities. This caused more entities to be discovered than what was happening before. This caused the single stream entity not to lookup entities correctly. Failures started occuring when these additional entities started getting connected by edges. Example: _hive_db_ has relationship attribute that now has relationship pointing to _hive_table_. This caused many more entities to be discovered. This also has a side effect of bringing-in way more entities than needed. With relationshipAttributes, edges started receiving GUIDs. Import process did not handle creating of edges with incoming guids. **Approach** - The new _AtlasEntityGraphDiscoveryV1_ entitiy discovery approach using relationships is not being used during import. Additional discussion are needed to guage validity of this approach. - _EntityMutationContext_ now has additional getter to know of import is in progress. - Edge creation (new method _AtlasRelationshipStoreV1.createEdgeWithGuid_) has been modified to support edge creation using specific guid. Diffs ----- repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java c5e6534c repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java 450fa875 repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java 9301cfaa repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 7474a8a4 repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityMutationContext.java 8a6a0e3f repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java ab25faaa repository/src/test/resources/stocks-rel-2.zip PRE-CREATION Diff: https://reviews.apache.org/r/65220/diff/1/ Testing ------- **Unit tests** - Additional tests for testing entities with relationships. **Functional tests** - Suite of tests that verify export-import-export and diff comparision for accuracy testing. Thanks, Ashutosh Mestry