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 2017/02/09 21:28:38 UTC

Review Request 56518: Export REST API

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

Review request for atlas and Madhan Neethiraj.


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


Repository: atlas


Description
-------

Export to ZIP file given top-level entity.

Includes:
- Refactoring that addresses lastest review comments.
- Removed Import API and supporting classes.
- Includes new Gremlin query that fetches all the connected entities.
- Has logic to generate ZIP file stream.

CURL
```
curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ 
  "itemsToExport": [
      {
          "typeName": "DB",
          "uniqueAttributes": {
              "name": "Sales"
          }
      }
  ],
  "options": null
}'
"http://localhost:21000/admin/export" > ../docs/DB-Sales.zip
```

```
| => curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
  "itemsToExport": [
      {
          "typeName": "hive_db",
          "uniqueAttributes": {
              "qualifiedName": "stocks@cl1"
          }
      }
  ],
  "options": null
}
' "http://localhost:21000/api/atlas/admin/export" > ../docs/Stocks.zip
```


Diffs
-----

  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 7b11b70 
  intg/src/main/java/org/apache/atlas/model/ix/AtlasExportParams.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/ix/AtlasExportResult.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/typedef/AtlasTypesDef.java 899e53f 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 365f3cd 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bddac7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java e3c1f5c 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3bdcc87 
  webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/util/Servlets.java 52dd9b5 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportTest.java PRE-CREATION 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java d73190e 

Diff: https://reviews.apache.org/r/56518/diff/


Testing
-------

Verified export for:
- Entities, types and classifications created by Quickstart.
- hive_db and entities for hive with lineage informtion. (CSV file upload.)


Thanks,

Ashutosh Mestry


Re: Review Request 56518: Export REST API

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




intg/src/main/java/org/apache/atlas/model/ix/AtlasExportParams.java (line 18)
<https://reviews.apache.org/r/56518/#comment236837>

    "impexp" seems a better name, instead of "ix"



intg/src/main/java/org/apache/atlas/model/ix/AtlasExportParams.java (line 46)
<https://reviews.apache.org/r/56518/#comment236838>

    Consider renaming "AtlasExportParams" to "AtlasExportRequest"



webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java (line 195)
<https://reviews.apache.org/r/56518/#comment236878>

    Consider adding a progress log here - to help monitor the progress via log file.



webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java (line 78)
<https://reviews.apache.org/r/56518/#comment236877>

    Consider renaming dispose() with close() - as  byteArrayOutputStream is accessed after this call, to write the contents to the stream.


- Madhan Neethiraj


On Feb. 9, 2017, 9:28 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56518/
> -----------------------------------------------------------
> 
> (Updated Feb. 9, 2017, 9:28 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1503
>     https://issues.apache.org/jira/browse/ATLAS-1503
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Export to ZIP file given top-level entity.
> 
> Includes:
> - Refactoring that addresses lastest review comments.
> - Removed Import API and supporting classes.
> - Includes new Gremlin query that fetches all the connected entities.
> - Has logic to generate ZIP file stream.
> 
> CURL
> ```
> curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ 
>   "itemsToExport": [
>       {
>           "typeName": "DB",
>           "uniqueAttributes": {
>               "name": "Sales"
>           }
>       }
>   ],
>   "options": null
> }'
> "http://localhost:21000/admin/export" > ../docs/DB-Sales.zip
> ```
> 
> ```
> | => curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
>   "itemsToExport": [
>       {
>           "typeName": "hive_db",
>           "uniqueAttributes": {
>               "qualifiedName": "stocks@cl1"
>           }
>       }
>   ],
>   "options": null
> }
> ' "http://localhost:21000/api/atlas/admin/export" > ../docs/Stocks.zip
> ```
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 7b11b70 
>   intg/src/main/java/org/apache/atlas/model/ix/AtlasExportParams.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/ix/AtlasExportResult.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasTypesDef.java 899e53f 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 365f3cd 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bddac7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java e3c1f5c 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3bdcc87 
>   webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/util/Servlets.java 52dd9b5 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportTest.java PRE-CREATION 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java d73190e 
> 
> Diff: https://reviews.apache.org/r/56518/diff/
> 
> 
> Testing
> -------
> 
> Verified export for:
> - Entities, types and classifications created by Quickstart.
> - hive_db and entities for hive with lineage informtion. (CSV file upload.)
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 56518: Export REST API

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


Ship it!




Ship It!

- Madhan Neethiraj


On Feb. 10, 2017, 2:19 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56518/
> -----------------------------------------------------------
> 
> (Updated Feb. 10, 2017, 2:19 a.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1503
>     https://issues.apache.org/jira/browse/ATLAS-1503
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Export to ZIP file given top-level entity.
> 
> Includes:
> - Refactoring that addresses lastest review comments.
> - Removed Import API and supporting classes.
> - Includes new Gremlin query that fetches all the connected entities.
> - Has logic to generate ZIP file stream.
> 
> CURL
> ```
> curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ 
>   "itemsToExport": [
>       {
>           "typeName": "DB",
>           "uniqueAttributes": {
>               "name": "Sales"
>           }
>       }
>   ],
>   "options": null
> }'
> "http://localhost:21000/admin/export" > ../docs/DB-Sales.zip
> ```
> 
> ```
> | => curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
>   "itemsToExport": [
>       {
>           "typeName": "hive_db",
>           "uniqueAttributes": {
>               "qualifiedName": "stocks@cl1"
>           }
>       }
>   ],
>   "options": null
> }
> ' "http://localhost:21000/api/atlas/admin/export" > ../docs/Stocks.zip
> ```
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 7b11b70 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java PRE-CREATION 
>   intg/src/main/java/org/apache/atlas/model/typedef/AtlasTypesDef.java 899e53f 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 365f3cd 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bddac7a 
>   repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java e3c1f5c 
>   webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3bdcc87 
>   webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java PRE-CREATION 
>   webapp/src/main/java/org/apache/atlas/web/util/Servlets.java 52dd9b5 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminExportTest.java PRE-CREATION 
>   webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java d73190e 
> 
> Diff: https://reviews.apache.org/r/56518/diff/
> 
> 
> Testing
> -------
> 
> Verified export for:
> - Entities, types and classifications created by Quickstart.
> - hive_db and entities for hive with lineage informtion. (CSV file upload.)
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 56518: Export REST API

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

(Updated Feb. 10, 2017, 2:19 a.m.)


Review request for atlas and Madhan Neethiraj.


Changes
-------

Addressed review comments.


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


Repository: atlas


Description
-------

Export to ZIP file given top-level entity.

Includes:
- Refactoring that addresses lastest review comments.
- Removed Import API and supporting classes.
- Includes new Gremlin query that fetches all the connected entities.
- Has logic to generate ZIP file stream.

CURL
```
curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ 
  "itemsToExport": [
      {
          "typeName": "DB",
          "uniqueAttributes": {
              "name": "Sales"
          }
      }
  ],
  "options": null
}'
"http://localhost:21000/admin/export" > ../docs/DB-Sales.zip
```

```
| => curl -X POST -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
  "itemsToExport": [
      {
          "typeName": "hive_db",
          "uniqueAttributes": {
              "qualifiedName": "stocks@cl1"
          }
      }
  ],
  "options": null
}
' "http://localhost:21000/api/atlas/admin/export" > ../docs/Stocks.zip
```


Diffs (updated)
-----

  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 7b11b70 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportRequest.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/impexp/AtlasExportResult.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/typedef/AtlasTypesDef.java 899e53f 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityStoreV1.java 365f3cd 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java bddac7a 
  repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java e3c1f5c 
  webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java 3bdcc87 
  webapp/src/main/java/org/apache/atlas/web/resources/ExportService.java PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/resources/ZipSink.java PRE-CREATION 
  webapp/src/main/java/org/apache/atlas/web/util/Servlets.java 52dd9b5 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminExportTest.java PRE-CREATION 
  webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java d73190e 

Diff: https://reviews.apache.org/r/56518/diff/


Testing
-------

Verified export for:
- Entities, types and classifications created by Quickstart.
- hive_db and entities for hive with lineage informtion. (CSV file upload.)


Thanks,

Ashutosh Mestry