----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61247/#review183805 -----------------------------------------------------------
Fix it, then Ship it! Sarath - few minor improvements. Rest of the changes look good. Thanks! repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java Lines 307 (patched) <https://reviews.apache.org/r/61247/#comment259855> It looks like lines between #307 and #329 can be replaced with the following. This would be easier to read and perhaps a little more efficient. Please review. for (AtlasAttribute attribute : entityType.getAllAttributes().values()) { AtlasType attrType = attribute.getAttributeType(); String attrName = attribute.getName(); if (entity.hasRelationshipAttribute(attrName)) { visitAttribute(attrType, entity.getRelationshipAttribute(attrName)); } else if (entity.hasAttribute(attrName)) { visitAttribute(attrType, entity.getAttribute(attrName)); } } repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java Lines 964 (patched) <https://reviews.apache.org/r/61247/#comment259864> 'val != null' is not necessary, as the following 'val instanceof' would handle this. repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java Lines 982 (patched) <https://reviews.apache.org/r/61247/#comment259865> 'val != null' is not necessary, as the following 'val instanceof' would handle this. - Madhan Neethiraj On Aug. 23, 2017, 5:27 p.m., Sarath Subramanian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61247/ > ----------------------------------------------------------- > > (Updated Aug. 23, 2017, 5:27 p.m.) > > > Review request for atlas, David Radley and Madhan Neethiraj. > > > Bugs: ATLAS-1984 > https://issues.apache.org/jira/browse/ATLAS-1984 > > > Repository: atlas > > > Description > ------- > > AtlasObjectId is used to refer to entity attributes referring to another > entity. > hive_table.columns => List<AtlasObjectId> > hive_table.db => AtlasObjectId > Change this to use AtlasRelatedObjectId with the following structure: > class AtlasRelatedObjectId > { String relationshipGuid; String displayText; AtlasStruct > relationshipAttributes; } > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationship.java > 41883713 > intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java > 80f3a664 > intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 4304e745 > intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 427439ca > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java > 0210a118 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java > b8fd70e5 > > > Diff: https://reviews.apache.org/r/61247/diff/4/ > > > Testing > ------- > > Tested using POSTMAN REST client > > mvn clean package - In Progress > > > Thanks, > > Sarath Subramanian > >