-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60272/#review178857
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java
Lines 53 (patched)
<https://reviews.apache.org/r/60272/#comment253131>

    ".relationshipType" ==> PROPERTY_PREFIX + ".relationshipType"



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java
Lines 86 (patched)
<https://reviews.apache.org/r/60272/#comment253130>

    for relationship having both ends as same type, there will only be single 
edge. That should be fine; please review that there is no assumption of 2 edges.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java
Lines 88 (patched)
<https://reviews.apache.org/r/60272/#comment253132>

    "LOG.isInfoEnabled()": perhaps you meant this to be debug level log?



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java
Line 265 (original), 286 (patched)
<https://reviews.apache.org/r/60272/#comment253136>

    Relationship instances would be edges, hence this should look for edges for 
the given type. Please review.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java
Line 269 (original)
<https://reviews.apache.org/r/60272/#comment253133>

    When would the edges between relationship vertex and endType vertices be 
deleted? If not deleted, wouldn't it cause delete of the end-type to fail - 
while attempting to delete end-type?



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java
Lines 396 (patched)
<https://reviews.apache.org/r/60272/#comment253134>

    'vertex' has been updated in line #392 above, so existingRelationshipDef 
will have updated relationshipDef.



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java
Lines 429 (patched)
<https://reviews.apache.org/r/60272/#comment253135>

    Instead of compating json-ified endDefs, consider the following:
     if 
(!newRelationshipDef.getEnd1().equals(existingRelationshipDef.getEnd2()) {
     }


- Madhan Neethiraj


On June 25, 2017, 1:22 p.m., David Radley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60272/
> -----------------------------------------------------------
> 
> (Updated June 25, 2017, 1:22 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Sarath Subramanian.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> ATLAS-1891
> Additional validation checks for relationshipDefs and add edges between 
> entityDefs and relationshipDef vertices 
> 
> - for create check reserved words are not used on the endpoints and type name 
> and relationship attribute names
> - for update do not allow updates to endpoints or the name or deletion of 
> attributes or relationship category
> - for not allow deletion of an entityDef that has a relatiionshipDef
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 
> 70480df113db36cb938a8817239fbeae441acdc0 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 
> 31256683f4c1e3217ef4b2dba83f34c32e025435 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java
>  aefd1684fe4a71cd0b45c4600cc5eca872ab0892 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityDefStoreV1.java
>  8046234f17885cb6009edbcf3f9b80333932c358 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java
>  00fe94b69d69d261e37766434b0cfd1e56117c52 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipDefStoreV1.java
>  6992e221884db5382b89a29ea8a7efaad2cadcbc 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasTypeDefGraphStoreV1.java
>  2ba41443d7d5c51ec83848c5f9ca89720f74b63a 
>   repository/src/test/java/org/apache/atlas/TestModules.java 
> d28956deb349c65d11031dbfb3866b91d5fd37e4 
>   
> repository/src/test/java/org/apache/atlas/repository/store/graph/AtlasRelationshipDefStoreV1Test.java
>  PRE-CREATION 
>   
> webapp/src/main/java/org/apache/atlas/examples/CreateTypesFromJsonFileUtil.java
>  82d6f2e3ee3f6376b7830e11900fda4e7275375b 
>   
> webapp/src/main/java/org/apache/atlas/examples/UpdateTypesFromJsonFileUtil.java
>  3b6770658298849cb70e69c373f97fb4d13d1148 
> 
> 
> Diff: https://reviews.apache.org/r/60272/diff/1/
> 
> 
> Testing
> -------
> 
> run junits
> create reltionshipDef
> get relationshipDef
> get relationshipDef/headers
> delete relationshipDef
> update relationshipDef
> create a relationshipDef and then update it such that an attribute will be 
> deleted. This should fail.
> Set the config option and try to create a reltionshipDef with a reserversed 
> word as an attribute name - this fails
> Delete an entityDef that has a relationshipdef - this fails
> Create a relationship with an endpoint name as a reserved word - this fails
> 
> 
> Thanks,
> 
> David Radley
> 
>

Reply via email to