You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Sarath Subramanian <sa...@apache.org> on 2019/08/13 06:05:05 UTC

Review Request 71276: ATLAS-3369: Renaming an hive_table creates a new table and updates the existing table

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

Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.


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


Repository: atlas


Description
-------

create table table1(id int); #creates table1 entity (with guid = abc)

alter table table1 rename to table2;

 

table1 with guid "abc" is updated to table2

new table1 with guid "xyz" is created newly.


Diffs
-----

  addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java c59ff7fde 


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


Testing
-------

Manually tested with:
1. Both hooks enabled - HMS and HS2.
2. Only HMS hook enabled.
3. Only HS2 hook enabled.

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1345/console


Thanks,

Sarath Subramanian


Re: Review Request 71276: ATLAS-3369: Renaming an hive_table creates a new table and updates the existing table

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


Fix it, then Ship it!





addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java
Lines 134 (patched)
<https://reviews.apache.org/r/71276/#comment304444>

    Since no relationship attributes are to be included in this partial update, consider following - to avoid sending entityExtInfo in the notification:
    
     AtlasEntity renamedTableEntityForPartialUpdate = new AtlasEntity(renamedTableEntity.getEntity());
     
     renamedTableEntityForPartialUpdate.setRelationshipAttributes(null);
     
     ...
     
     ret.add(new EntityPartialUpdateRequestV2(getUserName(), oldTableId, new AtlasEntityWithExtInfo(renamedTableEntityForPartialUpdate)));


- Madhan Neethiraj


On Aug. 13, 2019, 6:05 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71276/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2019, 6:05 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-3369
>     https://issues.apache.org/jira/browse/ATLAS-3369
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> create table table1(id int); #creates table1 entity (with guid = abc)
> 
> alter table table1 rename to table2;
> 
>  
> 
> table1 with guid "abc" is updated to table2
> 
> new table1 with guid "xyz" is created newly.
> 
> 
> Diffs
> -----
> 
>   addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java c59ff7fde 
> 
> 
> Diff: https://reviews.apache.org/r/71276/diff/1/
> 
> 
> Testing
> -------
> 
> Manually tested with:
> 1. Both hooks enabled - HMS and HS2.
> 2. Only HMS hook enabled.
> 3. Only HS2 hook enabled.
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1345/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71276: ATLAS-3369: Renaming an hive_table creates a new table and updates the existing table

Posted by Nixon Rodrigues <ni...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71276/#review217171
-----------------------------------------------------------




addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java
Line 39 (original), 39 (patched)
<https://reviews.apache.org/r/71276/#comment304445>

    Can you fix this auto-import (*).


- Nixon Rodrigues


On Aug. 13, 2019, 6:21 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71276/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2019, 6:21 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-3369
>     https://issues.apache.org/jira/browse/ATLAS-3369
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> create table table1(id int); #creates table1 entity (with guid = abc)
> 
> alter table table1 rename to table2;
> 
>  
> 
> table1 with guid "abc" is updated to table2
> 
> new table1 with guid "xyz" is created newly.
> 
> 
> Diffs
> -----
> 
>   addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java c59ff7fde 
> 
> 
> Diff: https://reviews.apache.org/r/71276/diff/2/
> 
> 
> Testing
> -------
> 
> Manually tested with:
> 1. Both hooks enabled - HMS and HS2.
> 2. Only HMS hook enabled.
> 3. Only HS2 hook enabled.
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1345/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71276: ATLAS-3369: Renaming an hive_table creates a new table and updates the existing table

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


Ship it!




Ship It!

- Madhan Neethiraj


On Aug. 13, 2019, 6:21 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71276/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2019, 6:21 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.
> 
> 
> Bugs: ATLAS-3369
>     https://issues.apache.org/jira/browse/ATLAS-3369
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> create table table1(id int); #creates table1 entity (with guid = abc)
> 
> alter table table1 rename to table2;
> 
>  
> 
> table1 with guid "abc" is updated to table2
> 
> new table1 with guid "xyz" is created newly.
> 
> 
> Diffs
> -----
> 
>   addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java c59ff7fde 
> 
> 
> Diff: https://reviews.apache.org/r/71276/diff/2/
> 
> 
> Testing
> -------
> 
> Manually tested with:
> 1. Both hooks enabled - HMS and HS2.
> 2. Only HMS hook enabled.
> 3. Only HS2 hook enabled.
> 
> Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1345/console
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>


Re: Review Request 71276: ATLAS-3369: Renaming an hive_table creates a new table and updates the existing table

Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71276/
-----------------------------------------------------------

(Updated Aug. 12, 2019, 11:21 p.m.)


Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Nixon Rodrigues.


Changes
-------

addressed review comments.


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


Repository: atlas


Description
-------

create table table1(id int); #creates table1 entity (with guid = abc)

alter table table1 rename to table2;

 

table1 with guid "abc" is updated to table2

new table1 with guid "xyz" is created newly.


Diffs (updated)
-----

  addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRename.java c59ff7fde 


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

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


Testing
-------

Manually tested with:
1. Both hooks enabled - HMS and HS2.
2. Only HMS hook enabled.
3. Only HS2 hook enabled.

Precommit: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1345/console


Thanks,

Sarath Subramanian