----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72991/#review222137 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Line 56 (original), 58 (patched) <https://reviews.apache.org/r/72991/#comment311197> Shouldn't there be a call to update businessMetadataDefs(), from here - to handle changes to business-metadata defs? repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 71 (patched) <https://reviews.apache.org/r/72991/#comment311195> When an entity-type has updates to attributes and business-metadata, typeDefStore will be updated twice for this type - #66 and #71. Consider the following: boolean entityDefUpdated = false; if (existing != null) { entityDefUpdated = addAttributes(existing, def); entityDefUpdated = addBusinessMetadata(existing, def) || entityDefUpdated; } if (entityDefUpdated) { typeDefStore.updateEntityDefByName(existing.getName(), existing); result.incrementMeticsCounter("typedef:entitydef:update"); } repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 72 (patched) <https://reviews.apache.org/r/72991/#comment311196> "typedef:businessmetadata:update": update is on entity-def and not the business-metadata-def, right? repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 139 (patched) <https://reviews.apache.org/r/72991/#comment311200> AtlasEntityDef.businessAttributeDefs is a read-only attribute i.e. it is derived from details in business-metadata-def. Hence there it is not necessary to look for differenence in this field. Instead, process delta in business-metadata-defs. - Madhan Neethiraj On Oct. 27, 2020, 8:21 p.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72991/ > ----------------------------------------------------------- > > (Updated Oct. 27, 2020, 8:21 p.m.) > > > Review request for atlas, Nikhil Bonte and Sarath Subramanian. > > > Bugs: ATLAS-4006 and ATLAS-4007 > https://issues.apache.org/jira/browse/ATLAS-4006 > https://issues.apache.org/jira/browse/ATLAS-4007 > > > Repository: atlas > > > Description > ------- > > **Background** > Existing implementation does not support export and import of _Business > Metadata_ (BM) attributes. > > **Implementation** > - Export: Updated existing flow to include detecting BM attributes and adding > the types to the exported payload. > - Import: Updated _TypeAttributeDifference_ to include BM attribute detection > and update. > > > Diffs > ----- > > > repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java > 0491a853a > > repository/src/main/java/org/apache/atlas/repository/impexp/ExportTypeProcessor.java > 664af9166 > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportTypeDefProcessor.java > b65807742 > > repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java > 0d78dbe57 > > repository/src/test/java/org/apache/atlas/repository/impexp/TypeAttributeDifferenceTest.java > f9b7cd11f > > > Diff: https://reviews.apache.org/r/72991/diff/1/ > > > Testing > ------- > > **Unit tests** > New tests added. > > **Functional testing** > End-to-end tests. (Export-import-export). > > **Pre-commit Build** > https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/154/ > > > Thanks, > > Ashutosh Mestry > >