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




intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityWithAssociations.java
 (line 73)
<https://reviews.apache.org/r/53156/#comment224054>

    if () is not needed, as "other != null" is handled in line #74.



intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 
(line 61)
<https://reviews.apache.org/r/53156/#comment224041>

    Consider adding a null check before referencing entitiesMutated. When 
entitiesMutated is null, return null.



intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 
(line 65)
<https://reviews.apache.org/r/53156/#comment224043>

    Consider adding a null check before referencing entitiesMutated.
    
    If entitiesMutated is null, initialize with a new map.



intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java 
(line 76)
<https://reviews.apache.org/r/53156/#comment224055>

    Consider replacing with:
    
    if (MapUtils.isNotEmpty(entitiesMutated)) {
      int i = 0;
      for (Map.Entry<EntityOperation, AtlasEntityHeader> e : 
entitiesMutated.entrySet()) {
        if (i > 0) {
          sb.append(",");
        }
        
        sb.append(e.getKey()).append(":");
        e.getValue().toString(sb);
    
        i++;
      }
    }



intg/src/main/java/org/apache/atlas/model/instance/EntityMutations.java (line 
62)
<https://reviews.apache.org/r/53156/#comment224045>

    Consider replacing #61 and #62 with:
    
    sb.append("EntityMutation{");
    sb.append("op=").append(op);
    if (entity != null) {
      sb.append(", entity=");
      entity.toString(sb);
    }
    sb.append("}");



intg/src/main/java/org/apache/atlas/model/instance/EntityMutations.java (line 
99)
<https://reviews.apache.org/r/53156/#comment224046>

    Consider replacing with:
    
    sb.append("EntityMutations{");
    if (CollectionUtils.isNotEmpty(entityMutations)) {
      for (int i = 0; i < entityMutations.size(); i++) {
        if (i > 0) {
          sb.append(",");
        }
        entityMutations.get(i).toString(sb);
      }
    }
    sb.append("}");



repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasEntityStore.java
 (line 45)
<https://reviews.apache.org/r/53156/#comment224049>

    Please update the comment for the return type. Please review other methods 
as well.



repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasEntityStore.java
 (line 49)
<https://reviews.apache.org/r/53156/#comment224048>

    Will the return list have as many entries as the parameter 'entities'?
    
    If not, can the return type by simply EntityMutationResponse - since it can 
capture details of multiple updates/creates/deletes.
    
    Please review other APIs as well.



repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasEntityStore.java
 (line 90)
<https://reviews.apache.org/r/53156/#comment224051>

    Consider adding methods that deal with a single entity, given its 
guid/uniqueAttr:
    
    AtlasEntity            getById(String guid);
    AtlasEntity            getByUniqueAttribute(String typeName, String 
attrName, String attrValue);
    EntityMutationResponse createOrUpdate(AtlasEntity entity);
    EntityMutationResponse updateById(String guid, AtlasEntity entity);
    EntityMutationResponse updateByUniqueAttribute(String typeName, String 
attrName, String attrValue, AtlasEntity entity);
    EntityMutationResponse deleteById(String guid);
    EntityMutationResponse deleteByUniqueAttribute(String typeName, String 
attrName, String attrValue);
    
    Consider using plural names for methods that take multiple entities as 
input.


- Madhan Neethiraj


On Nov. 1, 2016, 10:17 p.m., Suma Shivaprasad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53156/
> -----------------------------------------------------------
> 
> (Updated Nov. 1, 2016, 10:17 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-1241
>     https://issues.apache.org/jira/browse/ATLAS-1241
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> AtlasEntityHeader - for concise entity representation
> AtlasEntityWithAssociations - for entity represenation with wither associated 
> classifications, terms etc
> EntityRest - for single entity operations
> EntitiesRest - for multiple entity operations
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityHeader.java 
> PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/instance/AtlasEntityWithAssociations.java
>  PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/instance/EntityMutationResponse.java
>  PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/instance/EntityMutations.java 
> PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 8bd472a 
>   intg/src/test/java/org/apache/atlas/TestUtilsV2.java dcccc38 
>   pom.xml 62fc136 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasEntityStore.java
>  PRE-CREATION 
>   webapp/pom.xml 82f307c 
>   webapp/src/main/java/org/apache/atlas/web/rest/EntitiesREST.java 
> PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/rest/EntityRest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53156/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Suma Shivaprasad
> 
>

Reply via email to