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




webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java
Lines 730 (patched)
<https://reviews.apache.org/r/69707/#comment297477>

    Consider the following signature for this method:
    
    @GET
    @Path("/bulk/headers")
    Map<String, AtlasEntityHeader> getEntities(@QueryParam("tagUpdateTime") 
String tagUpdateTime) {
      int    sepPos             = tagUpdateTime.indexOf(":");
      String tagUpdateStartTime = tagUpdateTime.substring(0, sepPos);
      String tagUpdateEndTime   = tagUpdateTime.substring(sepPos + 1);
    
      Map<String, AtlasEntityHeader> ret = new HashMap<>();
    
      // 1. scan audit table to retrieve guids of entities having 
classification changes in the given duration
      // 2. for each guid retrieve, populate 'ret' with current state of the 
entity - along with classification details
    
      return ret;
    }
                                               
    
    This method can further be enhanced to include more criterion - like 
'createTime', 'modifiedTime', 'entityType'


- Madhan Neethiraj


On Jan. 10, 2019, 11:52 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69707/
> -----------------------------------------------------------
> 
> (Updated Jan. 10, 2019, 11:52 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nikhil Bonte, Nixon Rodrigues, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3029
>     https://issues.apache.org/jira/browse/ATLAS-3029
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - Scan HBase 'ATLAS_ENTITY_AUDIT_EVENTS' table with approprite paramters.
> - Package the output into _AtlasEntityHeader_.
> - Provide _REST APIs_ to _EntityREST_.
> 
> **CURL**
> 
> _Fetch_
> curl -X GET  -u admin:passWord -H 'Content-Type: application/json'
>   
> 'http://localhost:21000/api/atlas/v2/entity/audit/classifications?fromTimestamp=1546992000000&toTimestamp=1547157600000'
>  \
> 
> _Udpate_
> curl -X POST  -u admin:passWord -H 'Content-Type: application/json'
>   
> 'http://localhost:21000/api/atlas/v2/entity/audit/classifications?fromTimestamp=1546992000000&toTimestamp=1547157600000'
>  
>   -d @fetched-classifications.json
> 
> 
> **Not supported**
> - Cassandra based Audits.
> - For testing: In-memory audits.
> 
> 
> Diffs
> -----
> 
>   client/client-v2/src/main/java/org/apache/atlas/AtlasClientV2.java 
> 7c8caee89 
>   
> intg/src/main/java/org/apache/atlas/model/audit/AuditActionEntityHeaderPair.java
>  PRE-CREATION 
>   
> intg/src/main/java/org/apache/atlas/model/audit/AuditActionScanResponse.java 
> PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/AuditRetrieveAndUpdate.java
>  PRE-CREATION 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/CassandraBasedAuditRepository.java
>  eb78f8f70 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditRepository.java
>  aab2d5b6c 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java
>  6f4415fa8 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/InMemoryEntityAuditRepository.java
>  dca3b853e 
>   
> repository/src/main/java/org/apache/atlas/repository/audit/NoopEntityAuditRepository.java
>  e3a607809 
>   
> repository/src/test/java/org/apache/atlas/repository/audit/AuditRetrieveAndUpdateTest.java
>  PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java 68c132c37 
>   webapp/src/test/resources/json/audit-classifications.json PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/69707/diff/1/
> 
> 
> Testing
> -------
> 
> **Functional tests**
> Via CURL calls.
> 
> **Volume tests**
> Loads of over 2000 entities.
> 
> 
> File Attachments
> ----------------
> 
> fetched-classifications.json
>   
> https://reviews.apache.org/media/uploaded/files/2019/01/10/21bdf538-e1b5-4f1c-9130-ef5d0ee9a304__fetched-classifications.json
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>

Reply via email to