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


Ship it!




Ship It!

- Madhan Neethiraj


On Feb. 2, 2018, 1:17 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65412/
> -----------------------------------------------------------
> 
> (Updated Feb. 2, 2018, 1:17 a.m.)
> 
> 
> 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 
> a015e9bf0 
>   
> repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
>  a88c09e84 
>   
> repository/src/main/java/org/apache/atlas/util/AtlasGremlin2QueryProvider.java
>  9cffdb9dc 
>   
> repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java 
> e4898bde1 
>   
> repository/src/test/java/org/apache/atlas/repository/impexp/ExportServiceTest.java
>  7901ef687 
>   
> repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceReportingTest.java
>  0aaaa7048 
>   
> repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTestUtils.java
>  72895125c 
> 
> 
> Diff: https://reviews.apache.org/r/65412/diff/3/
> 
> 
> Testing
> -------
> 
> **Unit test**
> - Added new test to verify the behavior.
> 
> 
> **Functional test**
> - Via CURL calls.
> 
> **Accuracy testing**
> - Using Export-import-export compare.
> 
> 
> File Attachments
> ----------------
> 
> Export 1
>   
> https://reviews.apache.org/media/uploaded/files/2018/01/30/813f8af8-8b38-4896-8f6b-dc72c3652d3e__full-export-pre.zip
> Export After Import
>   
> https://reviews.apache.org/media/uploaded/files/2018/01/30/967aff68-2320-4f85-b10e-9500060ae118__full-export-post.zip
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>

Reply via email to