----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66520/#review200936 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java Lines 619 (patched) <https://reviews.apache.org/r/66520/#comment281861> getBlockedPropagatedClassificationString() retrieves classification vertex from the given entityGuid and classificationName. Instead of this, consider retrieving List<AtlasVertex> from entityRetriever - for both propagated classifications and blocked classifications; and avoid subsequent queries to retrieve classification vertex. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java Lines 463 (patched) <https://reviews.apache.org/r/66520/#comment281860> getAllClassificationVertices() - this method returns only classification having propagationEnabled=true. If this is intentional, consider renaming this methid to getPropagationEnabledClassificationVertices() repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java Lines 466 (patched) <https://reviews.apache.org/r/66520/#comment281851> CLASSIFICATION_EDGE_STATE_PROPERTY_KEY condition is not needed. Please review and remove. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java Lines 500 (patched) <https://reviews.apache.org/r/66520/#comment281858> Why is this change to return only propagationEnabled classifications from getAllClassifications(entity) method? If this is intentional, consider renaming the method to getPropagationEnabledClssifications(). Also, much of this method body is duplicate of the previous method. Consider calling that method to get list of vertices; and have this method only perform vertex -> classification conversion. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java Lines 991 (patched) <https://reviews.apache.org/r/66520/#comment281857> when blockedClassificationIds is empty, there is no need to retireve classificationVertices in line #990 above. Please review. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java Lines 1024 (patched) <https://reviews.apache.org/r/66520/#comment281855> No need to initialize here, as it will be reassigned in line #1030. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java Lines 1042 (patched) <https://reviews.apache.org/r/66520/#comment281856> Replace #1042 - #1051 with the following call, to avoid code duplication: List<AtlasVertex> classificationVertices = getClassificationVertices(edge); - Madhan Neethiraj On April 11, 2018, 6:07 a.m., Sarath Subramanian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66520/ > ----------------------------------------------------------- > > (Updated April 11, 2018, 6:07 a.m.) > > > Review request for atlas, Apoorv Naik, Ashutosh Mestry, and Madhan Neethiraj. > > > Bugs: ATLAS-2552 > https://issues.apache.org/jira/browse/ATLAS-2552 > > > Repository: atlas > > > Description > ------- > > Surface currently propagated classifications and blocked propagated > classifications information in the relationship. > > > Diffs > ----- > > common/src/main/java/org/apache/atlas/repository/Constants.java 01e49157 > intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 3805c221 > intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationship.java > c133e394 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java > 28636d86 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java > 1d945f7f > > > Diff: https://reviews.apache.org/r/66520/diff/3/ > > > Testing > ------- > > Tested in REST client. GET relationship API yields currently propagated > classifications and blocked propagated classifications > > > Thanks, > > Sarath Subramanian > >
