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

Review request for atlas.


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


Repository: atlas


Description
-------

**Background**
Existing implementation of _ExportService_, uses the starting entity that is 
fetched using a gremlin query. This implementation expands on that.

**Approach**
- Additional query (switch-case) added to _AtlasGremlinQueryProvider_.
- Modify _ExportService_ to process additional flavor of starting entity by 
looking at the new option specified in _AtlasExportRequest_.

**Usage**
Note the _typeName_ and _options_ parameters.

Contents of _exportRequest.json_:
```
{"itemsToExport": [ { "typeName": "hive_db,hdfs_path" } ], "options": {  
"fetchType": "FULL", "matchType": "forType"}}

```
CURL:
```
curl -X POST -u admin:admin -H "Content-Type: application/json" -H 
"Cache-Control: no-cache" -d @../docs/exportRequest.json 
http://localhost:21000/api/atlas/admin/export > ../docs/full-export.zip
```

Import is not impacted. 
```
curl -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H 
"Cache-Control: no-cache" -F data=@../docs/full-export.zip 
http://localhost:21000/api/atlas/admin/import
```


Diffs
-----

  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java 
a015e9b 
  
repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java 
a88c09e 
  
repository/src/main/java/org/apache/atlas/util/AtlasGremlin2QueryProvider.java 
9cffdb9 
  repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java 
e4898bd 
  
repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
 7901ef6 
  
repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceReportingTest.java
 0aaaa70 
  
repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTestUtils.java
 7289512 
  
repository/src/test/java/org/apache/atlas/repository/impexp/ImportTransformerJSONTest.java
 7044e71 


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


Testing
-------

**Unit test**
- Added new test to verify the behavior.


**Functional test**
- Via CURL calls.

**Accuracy testing**
- Using Export-import-export compare.


Thanks,

Ashutosh Mestry

Reply via email to