You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Mandar Ambawane <ma...@freestoneinfotech.com> on 2022/09/06 05:36:50 UTC

Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

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

(Updated Sept. 6, 2022, 5:36 a.m.)


Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.


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


Repository: atlas


Description
-------

When an entity type is created with multiple super types having same attribute name, Atlas throws exception.

Ex:

if there are 2 types:

type1 - attr1, attr2

type2- attr1, attr2

Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1

This patch will check for the exact scenario in case of Classification Typedef as well.


Diffs
-----

  intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 


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


Testing
-------


Thanks,

Mandar Ambawane


Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

Posted by Nikhil Bonte <bo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74101/#review224645
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 564 (patched)
<https://reviews.apache.org/r/74101/#comment313448>

    attributeToClassificationNameMap.containsKey(attributeName)
    
    I think having only this check is enough to identify duplicate attribute name from different parent defs
    
    Also, if above statement is true, map allAttributes can be used instead defining another map called attributeToClassificationNameMap


- Nikhil Bonte


On Sept. 6, 2022, 11:06 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74101/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2022, 11:06 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-4668
>     https://issues.apache.org/jira/browse/ATLAS-4668
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When an entity type is created with multiple super types having same attribute name, Atlas throws exception.
> 
> Ex:
> 
> if there are 2 types:
> 
> type1 - attr1, attr2
> 
> type2- attr1, attr2
> 
> Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1
> 
> This patch will check for the exact scenario in case of Classification Typedef as well.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 
> 
> 
> Diff: https://reviews.apache.org/r/74101/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

Posted by Pinal Shah <pi...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74101/#review224729
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Line 559 (original), 561 (patched)
<https://reviews.apache.org/r/74101/#comment313515>

    Can you format this to align below line
    
    AtlasType type       = typeRegistry.getType(attributeDef.getTypeName());
            String attributeName = attributeDef.getName();



intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Line 560 (original), 568 (patched)
<https://reviews.apache.org/r/74101/#comment313514>

    Can you modify ?
    attributeDef.getName() -> attributeName


- Pinal Shah


On Sept. 20, 2022, 10:12 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74101/
> -----------------------------------------------------------
> 
> (Updated Sept. 20, 2022, 10:12 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-4668
>     https://issues.apache.org/jira/browse/ATLAS-4668
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When an entity type is created with multiple super types having same attribute name, Atlas throws exception.
> 
> Ex:
> 
> if there are 2 types:
> 
> type1 - attr1, attr2
> 
> type2- attr1, attr2
> 
> Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1
> 
> This patch will check for the exact scenario in case of Classification Typedef as well.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 
>   intg/src/test/java/org/apache/atlas/type/TestAtlasTypeRegistry.java 85d041bdb 
> 
> 
> Diff: https://reviews.apache.org/r/74101/diff/3/
> 
> 
> Testing
> -------
> 
> PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1220/console
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74101/#review224686
-----------------------------------------------------------




intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java
Lines 564 (patched)
<https://reviews.apache.org/r/74101/#comment313482>

    We need this check in Diamond Inheritance.


- Mandar Ambawane


On Sept. 20, 2022, 10:12 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74101/
> -----------------------------------------------------------
> 
> (Updated Sept. 20, 2022, 10:12 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-4668
>     https://issues.apache.org/jira/browse/ATLAS-4668
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When an entity type is created with multiple super types having same attribute name, Atlas throws exception.
> 
> Ex:
> 
> if there are 2 types:
> 
> type1 - attr1, attr2
> 
> type2- attr1, attr2
> 
> Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1
> 
> This patch will check for the exact scenario in case of Classification Typedef as well.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 
>   intg/src/test/java/org/apache/atlas/type/TestAtlasTypeRegistry.java 85d041bdb 
> 
> 
> Diff: https://reviews.apache.org/r/74101/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

Posted by Pinal Shah <pi...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74101/#review224763
-----------------------------------------------------------


Ship it!




Ship It!

- Pinal Shah


On Oct. 6, 2022, 6:19 a.m., Mandar Ambawane wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74101/
> -----------------------------------------------------------
> 
> (Updated Oct. 6, 2022, 6:19 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-4668
>     https://issues.apache.org/jira/browse/ATLAS-4668
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> When an entity type is created with multiple super types having same attribute name, Atlas throws exception.
> 
> Ex:
> 
> if there are 2 types:
> 
> type1 - attr1, attr2
> 
> type2- attr1, attr2
> 
> Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1
> 
> This patch will check for the exact scenario in case of Classification Typedef as well.
> 
> 
> Diffs
> -----
> 
>   intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 
>   intg/src/test/java/org/apache/atlas/type/TestAtlasTypeRegistry.java 85d041bdb 
> 
> 
> Diff: https://reviews.apache.org/r/74101/diff/4/
> 
> 
> Testing
> -------
> 
> PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1220/console
> 
> 
> Thanks,
> 
> Mandar Ambawane
> 
>


Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74101/
-----------------------------------------------------------

(Updated Oct. 6, 2022, 6:19 a.m.)


Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.


Changes
-------

Addressed review comments


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


Repository: atlas


Description
-------

When an entity type is created with multiple super types having same attribute name, Atlas throws exception.

Ex:

if there are 2 types:

type1 - attr1, attr2

type2- attr1, attr2

Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1

This patch will check for the exact scenario in case of Classification Typedef as well.


Diffs (updated)
-----

  intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 
  intg/src/test/java/org/apache/atlas/type/TestAtlasTypeRegistry.java 85d041bdb 


Diff: https://reviews.apache.org/r/74101/diff/4/

Changes: https://reviews.apache.org/r/74101/diff/3-4/


Testing
-------

PreCommit: https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/1220/console


Thanks,

Mandar Ambawane


Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74101/
-----------------------------------------------------------

(Updated Sept. 20, 2022, 10:12 a.m.)


Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.


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


Repository: atlas


Description
-------

When an entity type is created with multiple super types having same attribute name, Atlas throws exception.

Ex:

if there are 2 types:

type1 - attr1, attr2

type2- attr1, attr2

Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1

This patch will check for the exact scenario in case of Classification Typedef as well.


Diffs (updated)
-----

  intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 
  intg/src/test/java/org/apache/atlas/type/TestAtlasTypeRegistry.java 85d041bdb 


Diff: https://reviews.apache.org/r/74101/diff/3/

Changes: https://reviews.apache.org/r/74101/diff/2-3/


Testing
-------


Thanks,

Mandar Ambawane


Re: Review Request 74101: ATLAS-4668 : When classification is created with multiple super types having same attributes , Atlas doesn't throw an exception

Posted by Mandar Ambawane <ma...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74101/
-----------------------------------------------------------

(Updated Sept. 20, 2022, 9:24 a.m.)


Review request for atlas, Jayendra Parab, madhan, Pinal Shah, Radhika Kundam, Sheetal Shah, and Sidharth Mishra.


Changes
-------

Addressed review comments.
Added test cases.


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


Repository: atlas


Description
-------

When an entity type is created with multiple super types having same attribute name, Atlas throws exception.

Ex:

if there are 2 types:

type1 - attr1, attr2

type2- attr1, attr2

Both types cant be added to super type to type3 since both type1 and type2 have same attribute - attr1

This patch will check for the exact scenario in case of Classification Typedef as well.


Diffs (updated)
-----

  intg/src/main/java/org/apache/atlas/type/AtlasClassificationType.java 5b86b808b 
  intg/src/test/java/org/apache/atlas/type/TestAtlasTypeRegistry.java 85d041bdb 


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

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


Testing
-------


Thanks,

Mandar Ambawane