You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Madhan Neethiraj <ma...@apache.org> on 2017/12/08 07:13:14 UTC

Review Request 64442: ATLAS-2304: fix Relationship search API to work TinkerPop3

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

Review request for atlas.


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


Repository: atlas


Description
-------

Updated AtlasGremlin3QueryProvider to provide TinkerPop3 specific expressions used in relationship queries


Diffs
-----

  repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 85b16b44 
  repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java a55f2611 


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


Testing
-------

Verified that relationship API works correctly, by viewing table list in hive_db entity details page


Thanks,

Madhan Neethiraj


Re: Review Request 64442: ATLAS-2304: fix Relationship search API to work TinkerPop3

Posted by Graham Wallis <gr...@uk.ibm.com>.

> On Dec. 8, 2017, 9:39 a.m., Graham Wallis wrote:
> > Just something to check... in TP3 the range() step is non-inclusive at the lower bound, i.e.
> > 
> > gremlin> g.V().range(0,3)
> > ==>v[1]
> > ==>v[2]
> > ==>v[3]
> > gremlin> g.V().range(1,3)
> > ==>v[2]
> > ==>v[3]
> > 
> > In the TP2 query, it looked like we were wanting to include the lower bound (startIdx) and exclude the upper (endIdx).
> > Are we sure we're getting the same set of vertices in both cases?
> 
> Madhan Neethiraj wrote:
>     Graham - TinkerPop3 documentation says the lower-bound is inclusive while the upper bound is exclusive; this is consistent with our usage. http://tinkerpop.apache.org/docs/3.3.0/reference/#range-step
>     
>     The number seen in "v[1]" is the vertex ID; and not the array index.

You are correct. Thanks for checking - I think the tinkerpop documentation is self-contradictory on this point (where it says "When within the low (inclusive) and high (exclusive) range, traversers are emitted. Finally, when above the high range, the traversal breaks out of iteration"). Hence I struggle to remember which way round it is. I made the same mistake on ATLAS-2242 but it didn't affect the result.


- Graham


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


On Dec. 8, 2017, 7:13 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64442/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2017, 7:13 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-2304
>     https://issues.apache.org/jira/browse/ATLAS-2304
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Updated AtlasGremlin3QueryProvider to provide TinkerPop3 specific expressions used in relationship queries
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 85b16b44 
>   repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java a55f2611 
> 
> 
> Diff: https://reviews.apache.org/r/64442/diff/1/
> 
> 
> Testing
> -------
> 
> Verified that relationship API works correctly, by viewing table list in hive_db entity details page
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 64442: ATLAS-2304: fix Relationship search API to work TinkerPop3

Posted by Madhan Neethiraj <ma...@apache.org>.

> On Dec. 8, 2017, 9:39 a.m., Graham Wallis wrote:
> > Just something to check... in TP3 the range() step is non-inclusive at the lower bound, i.e.
> > 
> > gremlin> g.V().range(0,3)
> > ==>v[1]
> > ==>v[2]
> > ==>v[3]
> > gremlin> g.V().range(1,3)
> > ==>v[2]
> > ==>v[3]
> > 
> > In the TP2 query, it looked like we were wanting to include the lower bound (startIdx) and exclude the upper (endIdx).
> > Are we sure we're getting the same set of vertices in both cases?

Graham - TinkerPop3 documentation says the lower-bound is inclusive while the upper bound is exclusive; this is consistent with our usage. http://tinkerpop.apache.org/docs/3.3.0/reference/#range-step

The number seen in "v[1]" is the vertex ID; and not the array index.


- Madhan


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


On Dec. 8, 2017, 7:13 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64442/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2017, 7:13 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-2304
>     https://issues.apache.org/jira/browse/ATLAS-2304
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Updated AtlasGremlin3QueryProvider to provide TinkerPop3 specific expressions used in relationship queries
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 85b16b44 
>   repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java a55f2611 
> 
> 
> Diff: https://reviews.apache.org/r/64442/diff/1/
> 
> 
> Testing
> -------
> 
> Verified that relationship API works correctly, by viewing table list in hive_db entity details page
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 64442: ATLAS-2304: fix Relationship search API to work TinkerPop3

Posted by Graham Wallis <gr...@uk.ibm.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/64442/#review193232
-----------------------------------------------------------



Just something to check... in TP3 the range() step is non-inclusive at the lower bound, i.e.

gremlin> g.V().range(0,3)
==>v[1]
==>v[2]
==>v[3]
gremlin> g.V().range(1,3)
==>v[2]
==>v[3]

In the TP2 query, it looked like we were wanting to include the lower bound (startIdx) and exclude the upper (endIdx).
Are we sure we're getting the same set of vertices in both cases?

- Graham Wallis


On Dec. 8, 2017, 7:13 a.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64442/
> -----------------------------------------------------------
> 
> (Updated Dec. 8, 2017, 7:13 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-2304
>     https://issues.apache.org/jira/browse/ATLAS-2304
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Updated AtlasGremlin3QueryProvider to provide TinkerPop3 specific expressions used in relationship queries
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 85b16b44 
>   repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java a55f2611 
> 
> 
> Diff: https://reviews.apache.org/r/64442/diff/1/
> 
> 
> Testing
> -------
> 
> Verified that relationship API works correctly, by viewing table list in hive_db entity details page
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>


Re: Review Request 64442: ATLAS-2304: fix Relationship search API to work TinkerPop3

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


Ship it!




Ship It!

- Sarath Subramanian


On Dec. 7, 2017, 11:13 p.m., Madhan Neethiraj wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64442/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2017, 11:13 p.m.)
> 
> 
> Review request for atlas.
> 
> 
> Bugs: ATLAS-2304
>     https://issues.apache.org/jira/browse/ATLAS-2304
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Updated AtlasGremlin3QueryProvider to provide TinkerPop3 specific expressions used in relationship queries
> 
> 
> Diffs
> -----
> 
>   repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 85b16b44 
>   repository/src/main/java/org/apache/atlas/util/AtlasGremlin3QueryProvider.java a55f2611 
> 
> 
> Diff: https://reviews.apache.org/r/64442/diff/1/
> 
> 
> Testing
> -------
> 
> Verified that relationship API works correctly, by viewing table list in hive_db entity details page
> 
> 
> Thanks,
> 
> Madhan Neethiraj
> 
>