----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58434/#review176458 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 53 (patched) <https://reviews.apache.org/r/58434/#comment249812> getAttributesAbsentInExisting() ==> getElementsAbsentInExisting() repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 64 (patched) <https://reviews.apache.org/r/58434/#comment249813> update() ==> addAttributes() repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 72 (patched) <https://reviews.apache.org/r/58434/#comment249814> update() ==> addElements() repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 89 (patched) <https://reviews.apache.org/r/58434/#comment249811> For easier reading, consider having all public methods before protected/private methods. repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java Lines 100 (patched) <https://reviews.apache.org/r/58434/#comment249815> update() call seems to update the first parameter 'existing'. But the second parameter 'def', is used in the following call to updateStructDefByName(). Please review - this and other update*Def() methods. - Madhan Neethiraj On April 13, 2017, 10:18 p.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58434/ > ----------------------------------------------------------- > > (Updated April 13, 2017, 10:18 p.m.) > > > Review request for atlas and Madhan Neethiraj. > > > Bugs: ATLAS-1734 > https://issues.apache.org/jira/browse/ATLAS-1734 > > > Repository: atlas > > > Description > ------- > > **Background** > Existing version of Import API allows for importing types that are not > already present in the system being imported in. This causes import to fail > in the cases where the data being imported happens to have the additional > attribute. > > **Approach** > New class _TypeAttributeDifference_ does a attribute diff betweeing 2 types. > _ImportService.processTypeDefs_ method now includes additional step for > attribute updation. > Metrics have been updated to reflect the updates. > > **Impact to API Consumer** > None. > > > Diffs > ----- > > repository/pom.xml f1c38b45 > > repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java > 73c3140d > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java > 9ec15e00 > > repository/src/main/java/org/apache/atlas/repository/impexp/TypeAttributeDifference.java > PRE-CREATION > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceReportingTest.java > 411299e3 > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java > 131a6e1e > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTestUtils.java > PRE-CREATION > > repository/src/test/java/org/apache/atlas/repository/impexp/TypeAttributeDifferenceTest.java > PRE-CREATION > > repository/src/test/java/org/apache/atlas/repository/impexp/UniqueListTest.java > PRE-CREATION > > repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java > 612c445f > repository/src/test/resources/salesNewTypeAttrs-next.zip PRE-CREATION > repository/src/test/resources/salesNewTypeAttrs.zip PRE-CREATION > > > Diff: https://reviews.apache.org/r/58434/diff/1/ > > > Testing > ------- > > **Unit tests** > - _ImportServiceTest_ Updated to handle the new case. New light-weight _zip_ > files added test resources to verify the functionality. > - _TypeAttributeDifferenceTest_ Unit test for _TypeAttributeDifference_ class. > - Additional unit tests: _UniqueList_. > - Import-Export APIs verified with test file set. > > > Thanks, > > Ashutosh Mestry > >