Re: Review Request 61088: [ATLAS-1988]: Implement REST API to search for related entities

2017-07-26 Thread Sarath Subramanian

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

(Updated July 26, 2017, 9:12 p.m.)


Review request for atlas, keval bhatt and Madhan Neethiraj.


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


Repository: atlas


Description
---

Add a new endpoint (v2/search/relationship) in DiscoveryREST to search for 
related entities.

Parameters:
[ guid, attributeName, sortBy, sortOrder limit, offset ]

Related entities search on hive_db:
http://localhost:21000/api/atlas/v2/search/relationship?guid==__hive_table.db=name=ASCENDING=25=0
http://localhost:21000/api/atlas/v2/search/relationship?guid==__hive_table.db=qualifiedName=ASCENDING=25=0

Related entities search on hive_table:
http://localhost:21000/api/atlas/v2/search/relationship?guid==columns=name=ASCENDING=25=0
http://localhost:21000/api/atlas/v2/search/relationship?guid==db=name=ASCENDING=25=0
http://localhost:21000/api/atlas/v2/search/relationship?guid==sd=qualifiedName=ASCENDING=25=0

Related entities search on hive_column:
http://localhost:21000/api/atlas/v2/search/relationship?guid==table=qualifiedName=ASCENDING=25=0


Diffs (updated)
-

  intg/src/main/java/org/apache/atlas/AtlasErrorCode.java d723b2a9 
  intg/src/main/java/org/apache/atlas/SortOrder.java PRE-CREATION 
  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java 
58274403 
  
repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 
764b548f 
  
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 
b183c72a 
  
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
 b8e0227c 
  
repository/src/main/java/org/apache/atlas/util/AtlasGremlin2QueryProvider.java 
1bf03464 
  repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java 
8481a4f6 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java efab72a3 
  
webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
 eb37fa82 


Diff: https://reviews.apache.org/r/61088/diff/6/

Changes: https://reviews.apache.org/r/61088/diff/5-6/


Testing
---

mvn clean package suceeded.


Thanks,

Sarath Subramanian



Re: Review Request 61088: [ATLAS-1988]: Implement REST API to search for related entities

2017-07-26 Thread Graham Wallis
http://atlas.apache.org/mail-lists.html


Best regards,
  Graham

Graham Wallis
IBM Analytics Emerging Technology Center
Internet: graham_wal...@uk.ibm.com 
IBM Laboratories, Hursley Park, Hursley, Hampshire SO21 2JN
Tel: +44-1962-815356Tie: 7-245356




From:   ​Muhammad Waris​ <muhammad.wa...@northbaysolutions.net>
To: dev@atlas.apache.org, Madhan Neethiraj <mad...@apache.org>
Cc: keval bhatt <kbh...@apache.org>, atlas 
<d...@atlas.incubator.apache.org>, Sarath Subramanian <sar...@apache.org>
Date:   26/07/2017 10:13
Subject:        Re: Review Request 61088: [ATLAS-1988]: Implement REST API 
to search for related entities



Hi,
any one knows how to unsubscribe from comm...@atlas.apache.org and dev@
atlas.apache.org mailing list?

Regards

On Wed, Jul 26, 2017 at 12:37 PM, Madhan Neethiraj <mad...@apache.org>
wrote:

>
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61088/#review181438
> ---
>
>
> Ship it!
>
>
>
>
> Ship It!
>
> - Madhan Neethiraj
>
>
> On July 25, 2017, 7:51 p.m., Sarath Subramanian wrote:
> >
> > ---
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviews.apache.org/r/61088/
> > ---
> >
> > (Updated July 25, 2017, 7:51 p.m.)
> >
> >
> > Review request for atlas, keval bhatt and Madhan Neethiraj.
> >
> >
> > Bugs: ATLAS-1988
> > https://issues.apache.org/jira/browse/ATLAS-1988
> >
> >
> > Repository: atlas
> >
> >
> > Description
> > ---
> >
> > Add a new endpoint (v2/search/relationship) in DiscoveryREST to search
> for related entities.
> >
> > Parameters:
> > [ guid, attributeName, sortBy, sortOrder limit, offset ]
> >
> > Related entities search on hive_db:
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =__hive_table.db=name&
> sortOrder=ASCENDING=25=0
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =__hive_table.db=qualifiedName=
> ASCENDING=25=0
> >
> > Related entities search on hive_table:
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =columns=name=ASCENDING&
> limit=25=0
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =db=name=ASCENDING=25&
> offset=0
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =sd=qualifiedName=
> ASCENDING=25=0
> >
> > Related entities search on hive_column:
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =table=qualifiedName=
> ASCENDING=25=0
> >
> >
> > Diffs
> > -
> >
> >   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java d723b2a9
> >   intg/src/main/java/org/apache/atlas/SortOrder.java PRE-CREATION
> > 
intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java
> 58274403
> > 
repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java
> 764b548f
> > 
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
> b183c72a
> >   repository/src/main/java/org/apache/atlas/repository/store/
> graph/v1/EntityGraphRetriever.java b8e0227c
> >   repository/src/main/java/org/apache/atlas/util/
> AtlasGremlin2QueryProvider.java 1bf03464
> > 
repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java
> 8481a4f6
> >   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
> efab72a3
> >   webapp/src/test/java/org/apache/atlas/notification/
> NotificationHookConsumerKafkaTest.java eb37fa82
> >
> >
> > Diff: https://reviews.apache.org/r/61088/diff/5/
> >
> >
> > Testing
> > ---
> >
> > mvn clean package suceeded.
> >
> >
> > Thanks,
> >
> > Sarath Subramanian
> >
> >
>
>


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



Re: Review Request 61088: [ATLAS-1988]: Implement REST API to search for related entities

2017-07-26 Thread ​Muhammad Waris​
Hi,
any one knows how to unsubscribe from comm...@atlas.apache.org and dev@
atlas.apache.org mailing list?

Regards

On Wed, Jul 26, 2017 at 12:37 PM, Madhan Neethiraj 
wrote:

>
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61088/#review181438
> ---
>
>
> Ship it!
>
>
>
>
> Ship It!
>
> - Madhan Neethiraj
>
>
> On July 25, 2017, 7:51 p.m., Sarath Subramanian wrote:
> >
> > ---
> > This is an automatically generated e-mail. To reply, visit:
> > https://reviews.apache.org/r/61088/
> > ---
> >
> > (Updated July 25, 2017, 7:51 p.m.)
> >
> >
> > Review request for atlas, keval bhatt and Madhan Neethiraj.
> >
> >
> > Bugs: ATLAS-1988
> > https://issues.apache.org/jira/browse/ATLAS-1988
> >
> >
> > Repository: atlas
> >
> >
> > Description
> > ---
> >
> > Add a new endpoint (v2/search/relationship) in DiscoveryREST to search
> for related entities.
> >
> > Parameters:
> > [ guid, attributeName, sortBy, sortOrder limit, offset ]
> >
> > Related entities search on hive_db:
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =__hive_table.db=name&
> sortOrder=ASCENDING=25=0
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =__hive_table.db=qualifiedName=
> ASCENDING=25=0
> >
> > Related entities search on hive_table:
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =columns=name=ASCENDING&
> limit=25=0
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =db=name=ASCENDING=25&
> offset=0
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =sd=qualifiedName=
> ASCENDING=25=0
> >
> > Related entities search on hive_column:
> > http://localhost:21000/api/atlas/v2/search/relationship?guid=
> =table=qualifiedName=
> ASCENDING=25=0
> >
> >
> > Diffs
> > -
> >
> >   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java d723b2a9
> >   intg/src/main/java/org/apache/atlas/SortOrder.java PRE-CREATION
> >   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java
> 58274403
> >   
> > repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java
> 764b548f
> >   
> > repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
> b183c72a
> >   repository/src/main/java/org/apache/atlas/repository/store/
> graph/v1/EntityGraphRetriever.java b8e0227c
> >   repository/src/main/java/org/apache/atlas/util/
> AtlasGremlin2QueryProvider.java 1bf03464
> >   
> > repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java
> 8481a4f6
> >   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
> efab72a3
> >   webapp/src/test/java/org/apache/atlas/notification/
> NotificationHookConsumerKafkaTest.java eb37fa82
> >
> >
> > Diff: https://reviews.apache.org/r/61088/diff/5/
> >
> >
> > Testing
> > ---
> >
> > mvn clean package suceeded.
> >
> >
> > Thanks,
> >
> > Sarath Subramanian
> >
> >
>
>


Re: Review Request 61088: [ATLAS-1988]: Implement REST API to search for related entities

2017-07-25 Thread David Radley

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




intg/src/main/java/org/apache/atlas/AtlasErrorCode.java
Lines 74 (patched)


as per recent dev list discussions we should use relationships not 
relationship attributes here in the Text and in the constant name

I do not think the inserts and the text make sense. From the code one is an 
entity type and one is an attribtue name.



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


Can we include more context to this error message. for example the search 
that was passed and which part was incorrect.



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


Are we checking that the relationship we find is valid for the entity ?



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


As above - it would be great to have more context in the error message



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


I would think in this case we would not sort at all.

If we are coding a default - we should include the default annotation for 
the Swagger.



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


Can we include the Excpetion message in what does back to the user? should 
we log here?



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


How does this work for maps?



webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
Lines 264 (patched)


As this will end up in the Swagger - please add more description including 
any defaults and errors that the user needs to be aware of.



webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java
Lines 273 (patched)


I suggest a sort direction would be useful here, maybe defined as an enum 
that include Ascending, descending and no sort.


- David Radley


On July 25, 2017, 7:38 a.m., Sarath Subramanian wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61088/
> ---
> 
> (Updated July 25, 2017, 7:38 a.m.)
> 
> 
> Review request for atlas, keval bhatt and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1988
> https://issues.apache.org/jira/browse/ATLAS-1988
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Add a new endpoint (v2/search/relationship) in DiscoveryREST to search for 
> related entities.
> 
> Parameters:
> [ guid, attributeName, sortBy, limit, offset ]
> 
> Related entities search on hive_db:
> http://localhost:21000/api/atlas/v2/search/relationship?guid==__hive_table.db=name=25=0
> http://localhost:21000/api/atlas/v2/search/relationship?guid==__hive_table.db=qualifiedName=25=0
> 
> Related entities search on hive_table:
> http://localhost:21000/api/atlas/v2/search/relationship?guid==columns=name=25=0
> http://localhost:21000/api/atlas/v2/search/relationship?guid==db=name=25=0
> http://localhost:21000/api/atlas/v2/search/relationship?guid==sd=qualifiedName=25=0
> 
> Related entities search on hive_column:
> http://localhost:21000/api/atlas/v2/search/relationship?guid==table=qualifiedName=25=0
> 
> 
> Diffs
> -
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java d723b2a9 
>   intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java 
> 58274403 
>   
> repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java
>  764b548f 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  b183c72a 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
>  b8e0227c 
>   
> repository/src/main/java/org/apache/atlas/util/AtlasGremlin2QueryProvider.java
>  1bf03464 
>   
> repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java 
> 8481a4f6 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java efab72a3 
> 
> 
> Diff: https://reviews.apache.org/r/61088/diff/2/
> 
> 
> Testing
> ---
> 
> mvn clean package suceeded.
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>



Review Request 61088: [ATLAS-1988]: Implement REST API to search for related entities

2017-07-24 Thread Sarath Subramanian

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

Review request for atlas, keval bhatt and Madhan Neethiraj.


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


Repository: atlas


Description
---

Add a new endpoint (v2/search/relationship) in DiscoveryREST to search for 
related entities.
Parameters:
guid
attributeLabel
sortBy
'limit
offset


Diffs
-

  intg/src/main/java/org/apache/atlas/model/discovery/AtlasSearchResult.java 
58274403 
  
repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java 
764b548f 
  
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 
b183c72a 
  
repository/src/main/java/org/apache/atlas/util/AtlasGremlin2QueryProvider.java 
1bf03464 
  repository/src/main/java/org/apache/atlas/util/AtlasGremlinQueryProvider.java 
8481a4f6 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java efab72a3 


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


Testing
---


Thanks,

Sarath Subramanian