Re: Review Request 72625: ATLAS-3866 : Relationship search API for hive storage desc throws error code 500

2020-06-30 Thread Sarath Subramanian

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


Ship it!




Ship It!

- Sarath Subramanian


On June 29, 2020, 3:49 a.m., Pinal Shah wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72625/
> ---
> 
> (Updated June 29, 2020, 3:49 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3866
> https://issues.apache.org/jira/browse/ATLAS-3866
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> **Issue:** In relationship api v2/relationship, for hive_storagedesc it 
> throws exception
> 
> **Reason:** it is because, sort attribute is assigned 'name' as default, and 
> 'name' attribute is not in the defination of hive_storagedesc.
> 
> **Workaround:** Validate if attribute is present in relationship end def, if 
> not ignore sorting
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  dd4d1b441 
> 
> 
> Diff: https://reviews.apache.org/r/72625/diff/2/
> 
> 
> Testing
> ---
> 
> Manually tested
> Precommit : 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/1992/console
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>



Re: Review Request 72625: ATLAS-3866 : Relationship search API for hive storage desc throws error code 500

2020-06-29 Thread Pinal Shah


> On June 29, 2020, 6:29 a.m., Sarath Subramanian wrote:
> > repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
> > Lines 607 (patched)
> > 
> >
> > Do we really need to compare edge end points?
> > 
> > can we do:
> > 
> > once you get relationshipEdge, you can get the typeName of the other 
> > vertex (not entityVertex - comparing vertexId). 
> > 
> > From this typeName - for e.g. 'hive_storagedesc' you can get entityType
> > 
> > relationshipEndEntityType = 
> > typeRegistry.getEntityTypeByName(otherEntityTypeName);

Thanks Sarath,
Yes we can do the way you suggested


- Pinal


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


On June 29, 2020, 10:49 a.m., Pinal Shah wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72625/
> ---
> 
> (Updated June 29, 2020, 10:49 a.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3866
> https://issues.apache.org/jira/browse/ATLAS-3866
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> **Issue:** In relationship api v2/relationship, for hive_storagedesc it 
> throws exception
> 
> **Reason:** it is because, sort attribute is assigned 'name' as default, and 
> 'name' attribute is not in the defination of hive_storagedesc.
> 
> **Workaround:** Validate if attribute is present in relationship end def, if 
> not ignore sorting
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  dd4d1b441 
> 
> 
> Diff: https://reviews.apache.org/r/72625/diff/2/
> 
> 
> Testing
> ---
> 
> Manually tested
> Precommit : 
> https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/1992/console
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>



Re: Review Request 72625: ATLAS-3866 : Relationship search API for hive storage desc throws error code 500

2020-06-29 Thread Pinal Shah

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

(Updated June 29, 2020, 10:49 a.m.)


Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, 
and Sarath Subramanian.


Changes
---

addressed comment


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


Repository: atlas


Description
---

**Issue:** In relationship api v2/relationship, for hive_storagedesc it throws 
exception

**Reason:** it is because, sort attribute is assigned 'name' as default, and 
'name' attribute is not in the defination of hive_storagedesc.

**Workaround:** Validate if attribute is present in relationship end def, if 
not ignore sorting


Diffs (updated)
-

  
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 
dd4d1b441 


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

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


Testing (updated)
---

Manually tested
Precommit : 
https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/1992/console


Thanks,

Pinal Shah



Re: Review Request 72625: ATLAS-3866 : Relationship search API for hive storage desc throws error code 500

2020-06-29 Thread Sarath Subramanian

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




repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
Lines 607 (patched)


Do we really need to compare edge end points?

can we do:

once you get relationshipEdge, you can get the typeName of the other vertex 
(not entityVertex - comparing vertexId). 

From this typeName - for e.g. 'hive_storagedesc' you can get entityType

relationshipEndEntityType = 
typeRegistry.getEntityTypeByName(otherEntityTypeName);


- Sarath Subramanian


On June 28, 2020, 10:06 p.m., Pinal Shah wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72625/
> ---
> 
> (Updated June 28, 2020, 10:06 p.m.)
> 
> 
> Review request for atlas, Jayendra Parab, Madhan Neethiraj, Nixon Rodrigues, 
> and Sarath Subramanian.
> 
> 
> Bugs: ATLAS-3866
> https://issues.apache.org/jira/browse/ATLAS-3866
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> **Issue:** In relationship api v2/relationship, for hive_storagedesc it 
> throws exception
> 
> **Reason:** it is because, sort attribute is assigned 'name' as default, and 
> 'name' attribute is not in the defination of hive_storagedesc.
> 
> **Workaround:** Validate if attribute is present in relationship end def, if 
> not ignore sorting
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  dd4d1b441 
> 
> 
> Diff: https://reviews.apache.org/r/72625/diff/1/
> 
> 
> Testing
> ---
> 
> Manually tested
> Precommit :
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>