> On Jan. 14, 2019, 6:17 a.m., Madhan Neethiraj wrote: > > intg/src/main/java/org/apache/atlas/model/instance/BulkHeadersResponse.java > > Lines 40 (patched) > > <https://reviews.apache.org/r/69707/diff/2/?file=2119437#file2119437line40> > > > > Please review if BulkHeadersResponse class is necessary; perhaps the > > return value can simply be Map<String, AtlasEntityHeader>? > > > > The interpretation of 'fromTimestamp' and 'toTimestamp' attributes here > > is not clear; also, more criterion can be added in the REST API, and we can > > avoid having to update BulkHeadersResponse to be in sync.
The Map<String, AtlasEntityHeader> ends with the serialization problem. We will have to use _TypeRefernce_ within _AtlasClient_ methods. Hence I choose this. > On Jan. 14, 2019, 6:17 a.m., Madhan Neethiraj wrote: > > repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditRepository.java > > Lines 87 (patched) > > <https://reviews.apache.org/r/69707/diff/2/?file=2119440#file2119440line87> > > > > Instead of returning List<EntityAuditEventV2>, returning Set<String> > > i.e. guids might be more efficient; contents of EntityAuditEventV2 is not > > useful for the current use of this method. Please reveiew. This is the change in approach I mentioned earlier. Just returnining guids will not make us get the state during that time range. We will end up with the latest state. Hence the events are returned. - Ashutosh ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69707/#review211944 ----------------------------------------------------------- On Jan. 14, 2019, 5:23 a.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69707/ > ----------------------------------------------------------- > > (Updated Jan. 14, 2019, 5:23 a.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?timeRange=1546992000000:1547157600000' > \ > > _Udpate_ > curl -X POST -u admin:passWord -H 'Content-Type: application/json' > 'http://localhost:21000/api/atlas/v2/entity/audit/classifications' > -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/instance/BulkHeadersResponse.java > PRE-CREATION > > repository/src/main/java/org/apache/atlas/repository/audit/BulkEntityRetrieveAndUpdate.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/BulkEntityRetrieveAndUpdateTest.java > PRE-CREATION > repository/src/test/resources/json/audit-event-1.json PRE-CREATION > repository/src/test/resources/json/audit-event-2.json PRE-CREATION > repository/src/test/resources/json/entity-headers.json PRE-CREATION > webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java 68c132c37 > > > Diff: https://reviews.apache.org/r/69707/diff/2/ > > > Testing > ------- > > **Unit tests** > New tests added. > > **Functional tests** > Via CURL calls. > > **Volume tests** > Loads of over 2000 entities. > > > File Attachments > ---------------- > > entity-headers.json > > https://reviews.apache.org/media/uploaded/files/2019/01/14/a23bead7-6990-4d5b-b3b8-f46f990f5d99__entity-headers.json > > > Thanks, > > Ashutosh Mestry > >