-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68815/
-----------------------------------------------------------
(Updated Sept. 23, 2018, 6:04 a.m.)
Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath
Subramanian.
Changes
-------
Updates include: Addressed review comments.
Bugs: ATLAS-2886
https://issues.apache.org/jira/browse/ATLAS-2886
Repository: atlas
Description
-------
**Approach**
- Continue using existing options from _AtlasExportRequest_ and
_AtlasImportRequest_.
- Pass fully qualified cluster name in the format (data center name)$(cluster
name)
- Support existing format of just cluster name.
- Modify _AuditsWriter_ to parse the new format.
- Use existing _AtlasServer_ to populate _AtlasServer.qualifiedName_ property.
**CURL**
__export-options.json__
```
{
"itemsToExport": [
{ "typeName": "hdfs_path", "uniqueAttributes": { "path":
"hdfs://localhost:8080/warehouse/hr/fulltime" }}
],
"options": {
"fetchType": "incremental",
"skipLineage": "true",
"replicatedTo": "Urugway$clx",
"changeMarker": 0
}
}
```
```
curl -X POST -u admin:admin -H "Content-Type: application/json" -H
"Cache-Control: no-cache" -d @../docs/export-options.json
http://localhost:21000/api/atlas/admin/export > ../docs/hr-fulltime.zip
```
_import-options.json_
```
{
"options": {
"transformers": "[{\"conditions\":null,
\"action\":{\"replicatedTo\":\"CLEAR:\",\"replicatedFrom\":\"CLEAR:\"}},
{\"conditions\":{\"__entity\":\"topLevel: \"},
\"action\":{\"__entity\":\"addClassification: replicated\"}},
{\"conditions\":{\"hive_db.name\":\"EQUALS:
stocks_dw\"},\"action\":{\"hive_db.name\":\"SET: stocks\"}}]",
"replicatedFrom": "Spain$DWX"
}
}
```
```
curl -g -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H
"Cache-Control: no-cache" -F request=@../docs/import-options.json -F
data=@../docs/largedb/stocks-2.zip
"http://localhost:21000/api/atlas/admin/import"
```
Diffs (updated)
-----
addons/models/0010-base_model.json dc9e9d641
dashboardv2/public/js/utils/UrlLinks.js dd1537b35
dashboardv2/public/js/views/audit/ReplicationAuditTableLayoutView.js
9f4259b37
intg/src/main/java/org/apache/atlas/model/impexp/AtlasServer.java 67d011022
repository/src/main/java/org/apache/atlas/repository/impexp/AuditsWriter.java
08576fe7d
repository/src/main/java/org/apache/atlas/repository/ogm/AtlasServerDTO.java
6343a5d90
repository/src/test/java/org/apache/atlas/repository/impexp/AtlasServerServiceTest.java
243c64f20
repository/src/test/java/org/apache/atlas/repository/impexp/ExportImportAuditServiceTest.java
16fd39dd0
repository/src/test/java/org/apache/atlas/repository/impexp/IncrementalExportEntityProviderTest.java
22ad66fc0
repository/src/test/java/org/apache/atlas/repository/impexp/ReplicationEntityAttributeTest.java
8de736829
repository/src/test/resources/json/stocksDB-Entities/export-replicatedTo.json
a69fe9e48
repository/src/test/resources/json/stocksDB-Entities/import-replicatedFrom.json
1ce00ad7e
Diff: https://reviews.apache.org/r/68815/diff/2/
Changes: https://reviews.apache.org/r/68815/diff/1-2/
Testing
-------
**Unit tests**
Updated existing.
**Functional tests**
Observe the _AtlasServer_ properties page.
**Pre-commit Build**
https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/682/
File Attachments
----------------
stocks-2.zip
https://reviews.apache.org/media/uploaded/files/2018/09/23/3cafa962-ce16-4e67-b560-ef401560b1cd__stocks-2.zip
Thanks,
Ashutosh Mestry