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/07/08 00:12:31 UTC

Review Request 60722: Fix for: Export of hive_table with fetchType "connected" fails

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

Review request for atlas and Madhan Neethiraj.


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


Repository: atlas


Description
-------

**Analysis**
The connected _fetchType_ in Export API had a potential for attempting to save same entity twice.

**Fix**
The entities saved to the _ZipSink_ are now maintained in a separate set. Before attempting to save to _ZipSink_ existence check is performed. If passed, save is prevented, else entity is saved to _ZipSink_.


Diffs
-----

  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java 3538cfd7 


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


Testing
-------

**Unit tests**
- Executed existing unit tests.

**Functional tests**
- Executed standard set of tests.


Thanks,

Ashutosh Mestry


Re: Review Request 60722: Fix for: Export of hive_table with fetchType "connected" fails

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


Ship it!




Ship It!

- Madhan Neethiraj


On July 10, 2017, 3:59 p.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60722/
> -----------------------------------------------------------
> 
> (Updated July 10, 2017, 3:59 p.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1919
>     https://issues.apache.org/jira/browse/ATLAS-1919
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Analysis**
> The connected _fetchType_ in Export API had a potential for attempting to save same entity twice.
> 
> **Fix**
> The entities saved to the _ZipSink_ are now maintained in a separate set. Before attempting to save to _ZipSink_ existence check is performed. If passed, save is prevented, else entity is saved to _ZipSink_.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java 3538cfd7 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 4bb04da9 
>   repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java 635caf7f 
> 
> 
> Diff: https://reviews.apache.org/r/60722/diff/2/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> - Executed existing unit tests.
> 
> **Functional tests**
> - Executed standard set of tests.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>


Re: Review Request 60722: Fix for: Export of hive_table with fetchType "connected" fails

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

(Updated July 10, 2017, 3:59 p.m.)


Review request for atlas and Madhan Neethiraj.


Changes
-------

Updates include:
- Refactoring based on review comments.
- Updated Unit tests.


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


Repository: atlas


Description
-------

**Analysis**
The connected _fetchType_ in Export API had a potential for attempting to save same entity twice.

**Fix**
The entities saved to the _ZipSink_ are now maintained in a separate set. Before attempting to save to _ZipSink_ existence check is performed. If passed, save is prevented, else entity is saved to _ZipSink_.


Diffs (updated)
-----

  repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java 3538cfd7 
  repository/src/main/java/org/apache/atlas/repository/impexp/ZipSink.java 4bb04da9 
  repository/src/test/java/org/apache/atlas/repository/impexp/ZipSinkTest.java 635caf7f 


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

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


Testing
-------

**Unit tests**
- Executed existing unit tests.

**Functional tests**
- Executed standard set of tests.


Thanks,

Ashutosh Mestry


Re: Review Request 60722: Fix for: Export of hive_table with fetchType "connected" fails

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




repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java
Lines 663 (patched)
<https://reviews.apache.org/r/60722/#comment254982>

    Consider the following updates:
    - move guidsInSink to ZipSink.guids
    - update ZipSink.add() methods to populate ZipSink.guids
    - add method ZipSink.hasEntity(String guid)
    - replace context.guidsInSink.contains(guid) with context.sink.hasEntity(guid)


- Madhan Neethiraj


On July 8, 2017, 12:12 a.m., Ashutosh Mestry wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60722/
> -----------------------------------------------------------
> 
> (Updated July 8, 2017, 12:12 a.m.)
> 
> 
> Review request for atlas and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1919
>     https://issues.apache.org/jira/browse/ATLAS-1919
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> **Analysis**
> The connected _fetchType_ in Export API had a potential for attempting to save same entity twice.
> 
> **Fix**
> The entities saved to the _ZipSink_ are now maintained in a separate set. Before attempting to save to _ZipSink_ existence check is performed. If passed, save is prevented, else entity is saved to _ZipSink_.
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/repository/impexp/ExportService.java 3538cfd7 
> 
> 
> Diff: https://reviews.apache.org/r/60722/diff/1/
> 
> 
> Testing
> -------
> 
> **Unit tests**
> - Executed existing unit tests.
> 
> **Functional tests**
> - Executed standard set of tests.
> 
> 
> Thanks,
> 
> Ashutosh Mestry
> 
>