----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68427/#review207942 -----------------------------------------------------------
Fix it, then Ship it! repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformer.java Lines 168 (patched) <https://reviews.apache.org/r/68427/#comment291604> Consider replacing #168 - #180 with the following, to avoid constructing AtlasClassification where possible: if (entity.getClassifications() != null) { entity.setClassifications(new ArrayList<AtlasClassification>()); } for (AtlasClassification c : entity.getClassifications()) { if (c.getTypeName().equals(classificationName)) { // entity already has this classification; nothing to add return entity; } } entity.getClassifications().add(new AtlasClassification(classificationName)); repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformsShaper.java Lines 59 (patched) <https://reviews.apache.org/r/68427/#comment291605> For better readability, consider replacing lines #59 - #64 with: if(importTransformer instanceof AddClassification) { AddClassification addClassification = (AddClassification) importTransformer; getCreateTag(addClassification.getClassificationName()); } - Madhan Neethiraj On Aug. 27, 2018, 12:26 a.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68427/ > ----------------------------------------------------------- > > (Updated Aug. 27, 2018, 12:26 a.m.) > > > Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath > Subramanian. > > > Bugs: ATLAS-2818 > https://issues.apache.org/jira/browse/ATLAS-2818 > > > Repository: atlas > > > Description > ------- > > **Approach** > - New method added to _AtlasEntityStore_ to add classifications without > updating entity metadata. > - New class _EntityTagger_ added. > - Modified _AudisWriter.ImportAudit_ to include call to _EntityTagger_. > > > Diffs > ----- > > > repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java > 467d3839a4aff71b7f3d1e03ccd0a828d2ce8c76 > > repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java > 950850e92640fd427d68b8ab1bee5a8f810119cd > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java > 8a184fad519c34033cab6f086e669d97b8784c9a > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformer.java > dc71c2af4778c2c768ed824132e13e08a272c16f > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformsShaper.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/BulkImporterImpl.java > 467ced7748e934b4829ee6f7bbafac39020529ac > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java > 08bbcd2fb9b7648535741f3f54f71eae38767a7e > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformsShaperTest.java > PRE-CREATION > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformsTest.java > b241dda6bff42ea65a6ea6f4dd26536d27a62a71 > > repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1BulkImportPercentTest.java > 73dfe37c786336ec267247a716a27f53e0d74993 > > > Diff: https://reviews.apache.org/r/68427/diff/7/ > > > Testing > ------- > > **Unit tests** > New tests added. > > **Pre-commit** > https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/610/ > > > Thanks, > > Ashutosh Mestry > >
