----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60285/#review178633 -----------------------------------------------------------
intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java Line 97 (original), 98 (patched) <https://reviews.apache.org/r/60285/#comment252758> initialize relationshipAttributes to an empty map here. This will be populated during resolveReferencesPhase2(), from AtlasRelationshipType.resolveReferencesPhase2() intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java Lines 144 (patched) <https://reviews.apache.org/r/60285/#comment252759> return relationshipAttributes ==> return Collections.unmodifiableMap(relationshipAttributes) intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java Lines 147 (patched) <https://reviews.apache.org/r/60285/#comment252760> Given relationshipAttributes will be a modifiable map when addRelationshipAttribute() is called (from AtlasRelationshipType.resolveReferences2()) - this method body can be replaced with: relationshipAttributes.put(attributeName, attribute) intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java Lines 66 (patched) <https://reviews.apache.org/r/60285/#comment252757> Resolving referenced entity-types should be moved to resolveReferences2() - as the entity-type may not be complete by now i.e. in resolveReferences() - like resolving of all attributes, superTypes, etc intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java Lines 75 (patched) <https://reviews.apache.org/r/60285/#comment252761> Consider moving lines #75 and #84 to line #89 i.e. only after validating the types specified at both ends are entities. intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java Lines 197 (patched) <https://reviews.apache.org/r/60285/#comment252763> end1Type ==> entityType intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java Lines 198 (patched) <https://reviews.apache.org/r/60285/#comment252762> "end2TypeName" ==> "attributeTypeName" intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java Lines 208 (patched) <https://reviews.apache.org/r/60285/#comment252764> relationshipAttrDef may not be necessary. Consider the following: AtlasAttribute relationshipAttr = end1Type.getAttribute(attrName); - Madhan Neethiraj On June 21, 2017, 7:14 p.m., Sarath Subramanian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60285/ > ----------------------------------------------------------- > > (Updated June 21, 2017, 7:14 p.m.) > > > Review request for atlas, Apoorv Naik, Ashutosh Mestry, Madhan Neethiraj, > Nixon Rodrigues, and Suma Shivaprasad. > > > Bugs: ATLAS-1892 > https://issues.apache.org/jira/browse/ATLAS-1892 > > > Repository: atlas > > > Description > ------- > > When a new relationshipDef is created, relation attributes needs to be > populated in AtlasEntityType during resolveReference stage. > This JIRA also adds UT, IT and addresses review comments in > https://reviews.apache.org/r/59769/ > > > Diffs > ----- > > > authorization/src/main/java/org/apache/atlas/authorize/AtlasResourceTypes.java > 925b6b13 > > authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasAuthorizationUtils.java > bb3157a3 > > authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyParser.java > acf73882 > distro/src/conf/policy-store.txt 47583c1e > intg/src/main/java/org/apache/atlas/AtlasErrorCode.java e8971a80 > > intg/src/main/java/org/apache/atlas/model/typedef/AtlasRelationshipEndDef.java > 34e932ed > intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java a29f7fb6 > intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java > 38b68bbd > intg/src/test/java/org/apache/atlas/type/TestAtlasRelationshipType.java > 7a4e9fd5 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java > 8fe48885 > webapp/src/main/java/org/apache/atlas/web/rest/RelationshipREST.java > 144080ad > > > Diff: https://reviews.apache.org/r/60285/diff/2/ > > > Testing > ------- > > UT added and tested. > IT in progress. > > > Thanks, > > Sarath Subramanian > >
