You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Ashutosh Mestry <am...@hortonworks.com> on 2018/08/08 19:37:05 UTC

Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

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

Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.


Bugs: ATLAS-2814
    https://issues.apache.org/jira/browse/ATLAS-2814


Repository: atlas


Description
-------

**Approach**
- New model _ReplicationDetails_ store replication timestamp.
- _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.


Diffs
-----

  client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
  intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
  intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
  repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
  repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
  repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
  server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
  webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
  webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 


Diff: https://reviews.apache.org/r/68270/diff/1/


Testing
-------

**Unit tests**
New tests added.


Thanks,

Ashutosh Mestry


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.

> On Aug. 10, 2018, 10:45 p.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java
> > Line 107 (original), 97 (patched)
> > <https://reviews.apache.org/r/68270/diff/3/?file=2070837#file2070837line112>
> >
> >     AtlasCluster name and qualifiedName is same?

The intent is that qualifiedName is not changable, where as _displayName_ can be changed for better read.


- Ashutosh


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


On Aug. 9, 2018, 8:19 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 9, 2018, 8:19 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> 
> Diffs
> -----
> 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java f3803e5ae15a772eb4ff04192a83a5b412631791 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/3/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/#review207097
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java
Lines 38 (patched)
<https://reviews.apache.org/r/68270/#comment290328>

    consider making 'operation' an enum with values IMPORT/EXPORT



repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java
Line 107 (original), 97 (patched)
<https://reviews.apache.org/r/68270/#comment290327>

    AtlasCluster name and qualifiedName is same?


- Sarath Subramanian


On Aug. 9, 2018, 1:19 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 9, 2018, 1:19 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> 
> Diffs
> -----
> 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java f3803e5ae15a772eb4ff04192a83a5b412631791 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/3/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.

> On Aug. 14, 2018, 6:34 a.m., Madhan Neethiraj wrote:
> > intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java
> > Lines 85 (patched)
> > <https://reviews.apache.org/r/68270/diff/5/?file=2071985#file2071985line92>
> >
> >     Use of stringified-AtlasObjectId as key doesn't sound good - since AtlasObjectId has guid/type/state/uniqueAttributes. Why not simply use entiy guid as the key?

Since objectId is the top-level entity, GUID will not be set in most cases. Hence we cannot use GUID.


> On Aug. 14, 2018, 6:34 a.m., Madhan Neethiraj wrote:
> > intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java
> > Lines 37 (patched)
> > <https://reviews.apache.org/r/68270/diff/5/?file=2071988#file2071988line37>
> >
> >     Why is it necessary to store operation & lastUpdate values? Only lastModifiedTimestamp should be enough, right? I suggest to avoid ReplicationDetails class completely and instead have the caller:
> >     - retrieve AtlasCluster
> >     - read additionalInfo.get("REPL_STATUS").get(entityGuid) <== this should return the modifiedTime of the entity during previous repl-import
> >     
> >     In addition, remove AdminResource.getReplicationDetails() and AtlasBaseClient.getReplicationDetails()

Operation is necessary, we need to know the purpose of the cluster. Given 2 clusters, one is current cluster and one is data being exported to, there is nowhere we denote what is the operation being performed on that cluster.

In scenario, where multiple exports and imports are being performed, this will be even more important.


> On Aug. 14, 2018, 6:34 a.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java
> > Lines 83 (patched)
> > <https://reviews.apache.org/r/68270/diff/5/?file=2071991#file2071991line83>
> >
> >     "result.getEntities() == null" - perhaps you meant "result == null"?

Result is not null always. If there are no entities, then getEntities returns null.


- Ashutosh


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


On Aug. 14, 2018, 6 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 6 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> **REST Call**
> Endpoint: /admin/expimp/audit
> CURL:
> curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?cluster=cl2
> 
> 
> Diffs
> -----
> 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/6/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/#review207210
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java
Lines 80 (patched)
<https://reviews.apache.org/r/68270/#comment290504>

    line #80 is not necessary, as this will be handled in #89 below.



intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java
Lines 85 (patched)
<https://reviews.apache.org/r/68270/#comment290505>

    Use of stringified-AtlasObjectId as key doesn't sound good - since AtlasObjectId has guid/type/state/uniqueAttributes. Why not simply use entiy guid as the key?



intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java
Lines 37 (patched)
<https://reviews.apache.org/r/68270/#comment290506>

    Why is it necessary to store operation & lastUpdate values? Only lastModifiedTimestamp should be enough, right? I suggest to avoid ReplicationDetails class completely and instead have the caller:
    - retrieve AtlasCluster
    - read additionalInfo.get("REPL_STATUS").get(entityGuid) <== this should return the modifiedTime of the entity during previous repl-import
    
    In addition, remove AdminResource.getReplicationDetails() and AtlasBaseClient.getReplicationDetails()



repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java
Lines 83 (patched)
<https://reviews.apache.org/r/68270/#comment290502>

    "result.getEntities() == null" - perhaps you meant "result == null"?



repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java
Lines 88 (patched)
<https://reviews.apache.org/r/68270/#comment290503>

    Instead of this 'for' loop to retrieve each entity from db, it will be efficient to covert entityHeader (AtlasEntityHeader) into ExportImportAuditEntry object.
    
    Search API can return necessary attributes (to populate ExportImportAuditEntry); just update searchParameters in #77 to include list of attributes: searchParameters.setAttribute(attributeNames).



repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java
Lines 115 (patched)
<https://reviews.apache.org/r/68270/#comment290501>

    Why pay the cost of AtlasType.toJson() call, when debug is not enabled? Replace lines #115 - #121 with the following:
    
      if (LOG.isDebugEnabled()) {
        LOG.debug("   => transforms: {}", AtlasType.toJson(importTransform));
      }
    
    Same for such usage in ExportService.java as well.


- Madhan Neethiraj


On Aug. 13, 2018, 7:07 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2018, 7:07 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> **REST Call**
> Endpoint: /admin/expimp/audit
> CURL:
> curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?sourceClusterName=cl2
> 
> 
> Diffs
> -----
> 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java b7e943f14084882cd5a3ad22c21168ea098eefcb 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java f3803e5ae15a772eb4ff04192a83a5b412631791 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/5/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/
-----------------------------------------------------------

(Updated Aug. 17, 2018, 2:45 a.m.)


Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.


Changes
-------

Updates include:
- Addressed review comments.


Bugs: ATLAS-2814
    https://issues.apache.org/jira/browse/ATLAS-2814


Repository: atlas


Description
-------

**Approach**
- New model _ReplicationDetails_ store replication timestamp.
- _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.

**REST Call**
Endpoint: /admin/expimp/audit
CURL:
curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?cluster=cl2


Diffs (updated)
-----

  addons/models/patches/004-base_model_replication_attributes.json bee37180d6f7fa2f241a0b06685e5a48163ccaa6 
  client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
  intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java 55f70767c8076b8e058190dbf9582d4df047b00a 
  repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
  repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformer.java 348bcd2c737ed9a37918847744a98be55ea8238d 
  repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
  repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java b7e943f14084882cd5a3ad22c21168ea098eefcb 
  repository/src/main/java/org/apache/atlas/repository/ogm/ExportImportAuditEntryDTO.java 8d1aebf5c2ad3a030e4140e4d28abbc034ac5919 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java fcdd379480fa0ce990e0c21b96d7a0529488a1d5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java d0188dd93bd66654d3f7337033828701deb3afc9 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformsTest.java 9b389225a408ba2bd7b06261bcb0f8e447b60532 
  repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
  repository/src/test/resources/json/stocksDB-Entities/replicationAttrs.json 82826383c37fccd23db1ff56033134bd2bf71ec6 
  typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeDefinition.java 5561f0b21d98a444c772bcd818a928d16a761a69 
  typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeInfo.java c24a55f1811095d0ff4f3ea5761c8441f839c033 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
  webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
  webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 


Diff: https://reviews.apache.org/r/68270/diff/10/

Changes: https://reviews.apache.org/r/68270/diff/9-10/


Testing
-------

**Unit tests**
New tests added.
Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.

**Pre-commit**
https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/595/


Thanks,

Ashutosh Mestry


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Madhan Neethiraj <ma...@apache.org>.

> On Aug. 17, 2018, 2:35 a.m., Madhan Neethiraj wrote:
> > repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java
> > Line 108 (original), 119 (patched)
> > <https://reviews.apache.org/r/68270/diff/8-9/?file=2072611#file2072611line125>
> >
> >     if entity doesn't already have the attribute, shouldn't the attribute be added in the vertex?
> 
> Ashutosh Mestry wrote:
>     Wouldn't entity always have all the attributes?

Not necessarily. However, in that case, why even have this 'if'?


- Madhan


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


On Aug. 17, 2018, 2:45 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 17, 2018, 2:45 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> **REST Call**
> Endpoint: /admin/expimp/audit
> CURL:
> curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?cluster=cl2
> 
> 
> Diffs
> -----
> 
>   addons/models/patches/004-base_model_replication_attributes.json bee37180d6f7fa2f241a0b06685e5a48163ccaa6 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java 55f70767c8076b8e058190dbf9582d4df047b00a 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformer.java 348bcd2c737ed9a37918847744a98be55ea8238d 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java b7e943f14084882cd5a3ad22c21168ea098eefcb 
>   repository/src/main/java/org/apache/atlas/repository/ogm/ExportImportAuditEntryDTO.java 8d1aebf5c2ad3a030e4140e4d28abbc034ac5919 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java fcdd379480fa0ce990e0c21b96d7a0529488a1d5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java d0188dd93bd66654d3f7337033828701deb3afc9 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformsTest.java 9b389225a408ba2bd7b06261bcb0f8e447b60532 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   repository/src/test/resources/json/stocksDB-Entities/replicationAttrs.json 82826383c37fccd23db1ff56033134bd2bf71ec6 
>   typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeDefinition.java 5561f0b21d98a444c772bcd818a928d16a761a69 
>   typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeInfo.java c24a55f1811095d0ff4f3ea5761c8441f839c033 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/10/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.
> 
> **Pre-commit**
> https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/595/
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/#review207467
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java
Lines 59 (patched)
<https://reviews.apache.org/r/68270/#comment290865>

    Consider marking typeRegistry and entityGraphRetriever as 'final'.



repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java
Line 108 (original), 119 (patched)
<https://reviews.apache.org/r/68270/#comment290866>

    if entity doesn't already have the attribute, shouldn't the attribute be added in the vertex?



repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java
Line 125 (original), 137 (patched)
<https://reviews.apache.org/r/68270/#comment290867>

    Consider moving #137 inside 'if' block at line #133.



repository/src/main/java/org/apache/atlas/repository/ogm/ExportImportAuditEntryDTO.java
Line 41 (original), 43 (patched)
<https://reviews.apache.org/r/68270/#comment290868>

    Consider marking this static as 'final'


- Madhan Neethiraj


On Aug. 17, 2018, 2:19 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 17, 2018, 2:19 a.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> **REST Call**
> Endpoint: /admin/expimp/audit
> CURL:
> curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?cluster=cl2
> 
> 
> Diffs
> -----
> 
>   addons/models/patches/004-base_model_replication_attributes.json bee37180d6f7fa2f241a0b06685e5a48163ccaa6 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java 55f70767c8076b8e058190dbf9582d4df047b00a 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformer.java 348bcd2c737ed9a37918847744a98be55ea8238d 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java b7e943f14084882cd5a3ad22c21168ea098eefcb 
>   repository/src/main/java/org/apache/atlas/repository/ogm/ExportImportAuditEntryDTO.java 8d1aebf5c2ad3a030e4140e4d28abbc034ac5919 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java fcdd379480fa0ce990e0c21b96d7a0529488a1d5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java d0188dd93bd66654d3f7337033828701deb3afc9 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformsTest.java 9b389225a408ba2bd7b06261bcb0f8e447b60532 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   repository/src/test/resources/json/stocksDB-Entities/replicationAttrs.json 82826383c37fccd23db1ff56033134bd2bf71ec6 
>   typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeDefinition.java 5561f0b21d98a444c772bcd818a928d16a761a69 
>   typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeInfo.java c24a55f1811095d0ff4f3ea5761c8441f839c033 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/9/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.
> 
> **Pre-commit**
> https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/595/
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/
-----------------------------------------------------------

(Updated Aug. 17, 2018, 2:19 a.m.)


Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.


Changes
-------

Updates include:
- Updated _AdminExportImportTestIT_ with teardown and additional asserts.
- Implemented _SetDelete_ in _ImportTransformer_. This is used in teardown for ITs using _Import_ for startup.
- Updated v1 APIs to include _softRef_ support.


Bugs: ATLAS-2814
    https://issues.apache.org/jira/browse/ATLAS-2814


Repository: atlas


Description
-------

**Approach**
- New model _ReplicationDetails_ store replication timestamp.
- _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.

**REST Call**
Endpoint: /admin/expimp/audit
CURL:
curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?cluster=cl2


Diffs (updated)
-----

  addons/models/patches/004-base_model_replication_attributes.json bee37180d6f7fa2f241a0b06685e5a48163ccaa6 
  client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
  intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphToTypedInstanceMapper.java 55f70767c8076b8e058190dbf9582d4df047b00a 
  repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
  repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportTransformer.java 348bcd2c737ed9a37918847744a98be55ea8238d 
  repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
  repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java b7e943f14084882cd5a3ad22c21168ea098eefcb 
  repository/src/main/java/org/apache/atlas/repository/ogm/ExportImportAuditEntryDTO.java 8d1aebf5c2ad3a030e4140e4d28abbc034ac5919 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java fcdd379480fa0ce990e0c21b96d7a0529488a1d5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java d0188dd93bd66654d3f7337033828701deb3afc9 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformsTest.java 9b389225a408ba2bd7b06261bcb0f8e447b60532 
  repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
  repository/src/test/resources/json/stocksDB-Entities/replicationAttrs.json 82826383c37fccd23db1ff56033134bd2bf71ec6 
  typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeDefinition.java 5561f0b21d98a444c772bcd818a928d16a761a69 
  typesystem/src/main/java/org/apache/atlas/typesystem/types/AttributeInfo.java c24a55f1811095d0ff4f3ea5761c8441f839c033 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
  webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
  webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 


Diff: https://reviews.apache.org/r/68270/diff/9/

Changes: https://reviews.apache.org/r/68270/diff/8-9/


Testing
-------

**Unit tests**
New tests added.
Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.


Thanks,

Ashutosh Mestry


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/#review207373
-----------------------------------------------------------


Fix it, then Ship it!





intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java
Line 75 (original), 73 (patched)
<https://reviews.apache.org/r/68270/#comment290749>

    Why remove the null handling from here?



intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java
Lines 82 (patched)
<https://reviews.apache.org/r/68270/#comment290747>

    Consider the following alter body for setAdditionalInfoRepl() and getAdditionalInfoRepl():
    
    public void setAdditionalInfoRepl(String guid, long modifiedTimestamp) {
      Map<String, Object> replicationDetailsMap;
    
      if (additionalInfo != null && additionalInfo.containsKey(KEY_REPLICATION_DETAILS)) {
        replicationDetailsMap = AtlasType.fromJson(additionalInfo.get(KEY_REPLICATION_DETAILS), Map.class);
      }
    
      if (replicationDetailsMap == null) {
        replicationDetailsMap = new HashMap<>();
      }
    
      if (modifiedTimestamp == 0) { // reset the repl status
        replicationDetailsMap.remove(guid);
      } else {
        replicationDetailsMap.put(guid, modifiedTimestamp);
      }
    
      additionalInfo.put(KEY_REPLICATION_DETAILS, AtlasType.toJson(replicationDetailsMap));
    }
    
    public Object getAdditionalInfoRepl(String guid) {
      Object ret = null;
    
      if (additionalInfo != null && additionalInfo.containsKey(KEY_REPLICATION_DETAILS)) {
        Map<String, Object> replicationDetailsMap = AtlasType.fromJson(additionalInfo.get(KEY_REPLICATION_DETAILS), Map.class);
        
        ret = replicationDetailsMap != null ? replicationDetailsMap.get(guid) : null;
      }
    
      return ret;
    }



repository/src/main/java/org/apache/atlas/repository/ogm/ExportImportAuditEntryDTO.java
Lines 41 (patched)
<https://reviews.apache.org/r/68270/#comment290772>

    Consider the following alternate initialization:
    
      private static final Set<String> ATTRIBUTE_NAMES = new HashSet<>(Arrays.asList(PROPERTY_USER_NAME, PROPERTY_OPERATION, PROPERTY_OPERATION_PARAMS, PROPERTY_START_TIME, PROPERTY_END_TIME, PROPERTY_RESULT_SUMMARY, PROPERTY_SOURCE_CLUSTER_NAME, PROPERTY_TARGET_CLUSTER_NAME));



repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
Line 952 (original), 955 (patched)
<https://reviews.apache.org/r/68270/#comment290771>

    line #955 can be outside this 'for' loop; will help avoid multiple updates to the same vertex, when dealing with more than one classication here.


- Madhan Neethiraj


On Aug. 14, 2018, 6 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 14, 2018, 6 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> **REST Call**
> Endpoint: /admin/expimp/audit
> CURL:
> curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?cluster=cl2
> 
> 
> Diffs
> -----
> 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java b7e943f14084882cd5a3ad22c21168ea098eefcb 
>   repository/src/main/java/org/apache/atlas/repository/ogm/ExportImportAuditEntryDTO.java 8d1aebf5c2ad3a030e4140e4d28abbc034ac5919 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 381191986df81d691e2598d4760d7999344dc630 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java f3803e5ae15a772eb4ff04192a83a5b412631791 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/8/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/
-----------------------------------------------------------

(Updated Aug. 14, 2018, 6 p.m.)


Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.


Changes
-------

Updates include:
- Changes to expimp Audit REST end point. It now accepts only 1 cluster parameter.
- Modified logic for fetching ExportImportAuditEntry search results.
- Addressed review comments.


Bugs: ATLAS-2814
    https://issues.apache.org/jira/browse/ATLAS-2814


Repository: atlas


Description (updated)
-------

**Approach**
- New model _ReplicationDetails_ store replication timestamp.
- _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.

**REST Call**
Endpoint: /admin/expimp/audit
CURL:
curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?cluster=cl2


Diffs (updated)
-----

  webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 


Diff: https://reviews.apache.org/r/68270/diff/6/

Changes: https://reviews.apache.org/r/68270/diff/5-6/


Testing
-------

**Unit tests**
New tests added.
Unit tests related to audits now pause for 5 secs before performing asserts. This should give time for indexes to be created.


Thanks,

Ashutosh Mestry


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/
-----------------------------------------------------------

(Updated Aug. 13, 2018, 7:07 p.m.)


Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.


Changes
-------

Updates include: 
- Addressed review comments.
- Modified _getExportImportAudit_ to return list of _ExportImportAuditEntry_.


Bugs: ATLAS-2814
    https://issues.apache.org/jira/browse/ATLAS-2814


Repository: atlas


Description (updated)
-------

**Approach**
- New model _ReplicationDetails_ store replication timestamp.
- _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.

**REST Call**
Endpoint: /admin/expimp/audit
CURL:
curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/expimp/audit?sourceClusterName=cl2


Diffs (updated)
-----

  client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
  intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
  intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
  repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
  repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
  repository/src/main/java/org/apache/atlas/repository/ogm/DataAccess.java b7e943f14084882cd5a3ad22c21168ea098eefcb 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
  repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java f3803e5ae15a772eb4ff04192a83a5b412631791 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
  server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
  webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
  webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 


Diff: https://reviews.apache.org/r/68270/diff/4/

Changes: https://reviews.apache.org/r/68270/diff/3-4/


Testing
-------

**Unit tests**
New tests added.


Thanks,

Ashutosh Mestry


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/
-----------------------------------------------------------

(Updated Aug. 9, 2018, 8:19 p.m.)


Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.


Changes
-------

Updates include:
- Fixed the case where _lastModifiedTimestamp_ was not getting updated correctly.


Bugs: ATLAS-2814
    https://issues.apache.org/jira/browse/ATLAS-2814


Repository: atlas


Description
-------

**Approach**
- New model _ReplicationDetails_ store replication timestamp.
- _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.


Diffs (updated)
-----

  client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
  intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
  intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
  repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
  repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
  repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java f3803e5ae15a772eb4ff04192a83a5b412631791 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
  server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
  webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
  webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 


Diff: https://reviews.apache.org/r/68270/diff/3/

Changes: https://reviews.apache.org/r/68270/diff/2-3/


Testing
-------

**Unit tests**
New tests added.


Thanks,

Ashutosh Mestry


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Ashutosh Mestry <am...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/
-----------------------------------------------------------

(Updated Aug. 8, 2018, 8:52 p.m.)


Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.


Changes
-------

Updates include:
- Addressed review comments.
- Fixed/updated fialing unit tests.


Bugs: ATLAS-2814
    https://issues.apache.org/jira/browse/ATLAS-2814


Repository: atlas


Description
-------

**Approach**
- New model _ReplicationDetails_ store replication timestamp.
- _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.


Diffs (updated)
-----

  client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
  intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
  intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
  repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
  repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
  repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
  repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
  repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java f3803e5ae15a772eb4ff04192a83a5b412631791 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
  repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
  repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
  repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
  server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
  webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
  webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 


Diff: https://reviews.apache.org/r/68270/diff/2/

Changes: https://reviews.apache.org/r/68270/diff/1-2/


Testing
-------

**Unit tests**
New tests added.


Thanks,

Ashutosh Mestry


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/#review206995
-----------------------------------------------------------




repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
Lines 940 (patched)
<https://reviews.apache.org/r/68270/#comment290156>

    Simplify double-negation to CollectionUtils.isEmpty



server-api/src/main/java/org/apache/atlas/RequestContextV1.java
Lines 138 (patched)
<https://reviews.apache.org/r/68270/#comment290158>

    "this." is unnecessary here.



server-api/src/main/java/org/apache/atlas/RequestContextV1.java
Lines 141 (patched)
<https://reviews.apache.org/r/68270/#comment290159>

    better variable name for "b"


- Apoorv Naik


On Aug. 8, 2018, 7:37 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 8, 2018, 7:37 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> 
> Diffs
> -----
> 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/1/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 68270: Cluster Entity Updated after Successful Import if Replication Options are Available in Import Request

Posted by Apoorv Naik <na...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68270/#review206993
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java
Lines 21 (patched)
<https://reviews.apache.org/r/68270/#comment290155>

    Wrong annotation. Use the non-shaded one


- Apoorv Naik


On Aug. 8, 2018, 7:37 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68270/
> -----------------------------------------------------------
> 
> (Updated Aug. 8, 2018, 7:37 p.m.)
> 
> 
> Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-2814
>     https://issues.apache.org/jira/browse/ATLAS-2814
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Approach**
> - New model _ReplicationDetails_ store replication timestamp.
> - _AuditWriter_ updates appropriate _AtlasCluster_ entity with _ReplicationDetails_.
> 
> 
> Diffs
> -----
> 
>   client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java f73ba2c6e6c9d05e86eb6c17f923a6dda1df5dd9 
>   intg/src/main/java/org/apache/atlas/model/clusterinfo/AtlasCluster.java 3ce50e38b3af45521c2c83d0e6c05398747bcf86 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java 85a606c7d3b2158238b2a6defbb9185883434d78 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasImportResult.java bfb7637711e08e17fd5f5b16bf121ac541b631a4 
>   intg/src/main/java/org/apache/atlas/model/impexp/ReplicationDetails.java PRE-CREATION 
>   repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java 6a3fbecda84dc48e0df1359c1b5a248958db0a4c 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ClusterService.java fd8e2bfe6bbdb7ae5e66ab67ecdf94e9527d9b09 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportImportAuditService.java e90b6b942d359f78ccf59ee955c4667f2033e6c4 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java b15f828e470eaee972a4ee3f8447f404f813c699 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java 98ef389bd1bf8f87d23a06dc231d4d93f06b2231 
>   repository/src/main/java/org/apache/atlas/repository/ogm/AtlasClusterDTO.java 424fb88a5ad2d84ac2245848d061892d40a3f50c 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 9e7a119a3abfb50401f9747dad1ffa55facc51ed 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ClusterServiceTest.java cfd272fb00a970ab0ba28f96b237de6bd5c694e1 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportTestBase.java fcf90d364950d3afa2c18689d8e22616cfcd3c19 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ExportIncrementalTest.java 86ab22294918701270db3ba849f5b0532c1a21a4 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java dc25e92d7115db31cbd7f99bd1a2cb5f75e766a5 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java 881368ce2c6803c8cf887a1fc91737c045c5e663 
>   server-api/src/main/java/org/apache/atlas/RequestContextV1.java 8506d186978f579c6b18c4347fc7cb2636848f16 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d4e72620b15f69d258e5a2a96521c65a7ef71114 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportImportTestIT.java fc804d2e5a1debd7e728dca1773f91402d41fc26 
>   webapp/src/test/resources/json/export-incremental.json 97108411f9e0c177ac13eb0a8ec3bd4475499f89 
>   webapp/src/test/resources/stocks-base.zip 40c7f37eefb46a944921f6a74a916191704cb9a3 
> 
> 
> Diff: https://reviews.apache.org/r/68270/diff/1/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> New tests added.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>