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




repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityChangeNotifier.java
Lines 413 (patched)
<https://reviews.apache.org/r/72477/#comment310654>

    Given this method returns true only when all entries are of type 
ENTITY_TYPE_AUDIT_ENTRY, it will be efficient traverse the list only until 
another type is found. Consider the following:
      private static final Predicate<AtlasEntityHeader> 
PRED_IS_NOT_TYPE_AUDIT_ENTITY = obj -> 
!obj.getTypeName().equals(AtlasAuditService.ENTITY_TYPE_AUDIT_ENTRY);
    
      private boolean skipAuditEntries(List<AtlasEntityHeader> entityHeaders) {
        return CollectionUtils.isEmpty(entityHeaders) || 
!entityHeaders.stream().anyMatch(PRED_IS_NOT_TYPE_AUDIT_ENTITY);
      }


- Madhan Neethiraj


On Aug. 14, 2020, 2:06 p.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72477/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2020, 2:06 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, 
> Sarath Subramanian, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-3583
>     https://issues.apache.org/jira/browse/ATLAS-3583
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> ATLAS-3583 Use Audit framework to generate audit entries for TypeDefs CREATE, 
> UPDATE and DELETE
> 
> 
> Diffs
> -----
> 
>   addons/models/0000-Area0/0010-base_model.json 9777b7a 
>   
> addons/models/0000-Area0/patches/006-base_model_add_atlas_operation_attributes.json
>  PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/audit/AtlasAuditEntry.java 
> a95cf4e 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/AtlasAuditService.java
>  a0dc816 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/TypeDefAuditListener.java
>  PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java
>  8e7c1b3 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityChangeNotifier.java
>  0dc3193 
>   test-tools/src/main/resources/solr/core-template/solrconfig.xml 8ebbeff 
> 
> 
> Diff: https://reviews.apache.org/r/72477/diff/8/
> 
> 
> Testing
> -------
> 
> Basic testing is done.
> 
> Pre-commit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/1871/console
> 
> Pre-commit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/1885/console
> 
> Pre-commit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/1888/console
> 
> Pre-commit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/2071/console
> 
> Pre-commit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/2082/console
> 
> Pre-commit: 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/2100/console
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>

Reply via email to