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 2018/01/09 08:09:11 UTC
Review Request 65037: ATLAS-2347: fixed V1 REST API for search to
keep the response consistent with earlier version of Atlas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65037/
-----------------------------------------------------------
Review request for atlas.
Bugs: ATLAS-2347
https://issues.apache.org/jira/browse/ATLAS-2347
Repository: atlas
Description
-------
Updated serialization of V1 search API response to be consistent with earlier verion of Atlas
Diffs
-----
intg/src/main/java/org/apache/atlas/utils/AtlasJson.java a82b7ba9
intg/src/main/java/org/apache/atlas/v1/model/discovery/DSLSearchResult.java PRE-CREATION
intg/src/main/java/org/apache/atlas/v1/model/discovery/FullTextSearchResult.java PRE-CREATION
webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java 252cc0e7
Diff: https://reviews.apache.org/r/65037/diff/1/
Testing
-------
- verified that the response is consistent with Atlas from branch-0.8
Thanks,
Madhan Neethiraj
Re: Review Request 65037: ATLAS-2347: fixed V1 REST API for search to
keep the response consistent with earlier version of Atlas
Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65037/#review195073
-----------------------------------------------------------
Ship it!
Ship It!
- Sarath Subramanian
On Jan. 9, 2018, 12:50 p.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65037/
> -----------------------------------------------------------
>
> (Updated Jan. 9, 2018, 12:50 p.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-2347
> https://issues.apache.org/jira/browse/ATLAS-2347
>
>
> Repository: atlas
>
>
> Description
> -------
>
> Updated serialization of V1 search API response to be consistent with earlier verion of Atlas
>
>
> Diffs
> -----
>
> intg/src/main/java/org/apache/atlas/utils/AtlasJson.java a82b7ba9
> intg/src/main/java/org/apache/atlas/v1/model/discovery/DSLSearchResult.java PRE-CREATION
> intg/src/main/java/org/apache/atlas/v1/model/discovery/FullTextSearchResult.java PRE-CREATION
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 29b2abea
> webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java 252cc0e7
>
>
> Diff: https://reviews.apache.org/r/65037/diff/2/
>
>
> Testing
> -------
>
> - verified that the response is consistent with Atlas from branch-0.8
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 65037: ATLAS-2347: fixed V1 REST API for search to
keep the response consistent with earlier version of Atlas
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65037/
-----------------------------------------------------------
(Updated Jan. 9, 2018, 8:50 p.m.)
Review request for atlas.
Changes
-------
updated to handle queries that include select/aggregate clauses, which only return attributes and not entities
Bugs: ATLAS-2347
https://issues.apache.org/jira/browse/ATLAS-2347
Repository: atlas
Description
-------
Updated serialization of V1 search API response to be consistent with earlier verion of Atlas
Diffs (updated)
-----
intg/src/main/java/org/apache/atlas/utils/AtlasJson.java a82b7ba9
intg/src/main/java/org/apache/atlas/v1/model/discovery/DSLSearchResult.java PRE-CREATION
intg/src/main/java/org/apache/atlas/v1/model/discovery/FullTextSearchResult.java PRE-CREATION
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 29b2abea
webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java 252cc0e7
Diff: https://reviews.apache.org/r/65037/diff/2/
Changes: https://reviews.apache.org/r/65037/diff/1-2/
Testing
-------
- verified that the response is consistent with Atlas from branch-0.8
Thanks,
Madhan Neethiraj
Re: Review Request 65037: ATLAS-2347: fixed V1 REST API for search to
keep the response consistent with earlier version of Atlas
Posted by Madhan Neethiraj <ma...@apache.org>.
> On Jan. 9, 2018, 2:43 p.m., Sarath Subramanian wrote:
> > intg/src/main/java/org/apache/atlas/v1/model/discovery/DSLSearchResult.java
> > Lines 48 (patched)
> > <https://reviews.apache.org/r/65037/diff/1/?file=1936312#file1936312line48>
> >
> > 'results' format for tag search on v1 dsl is different (includes 'instanceInfo' and 'traitDetails') and not always list of Referenceables. Please review.
> >
> > e.g:
> > http://localhost:21000/api/atlas/discovery/search/dsl?query=`PII`
> >
> > {
> > "requestId": "pool-2-thread-9 - a6448c2d-1b08-423c-bffc-e2584edf7f74",
> > "query": "`PII`",
> > "queryType": "dsl",
> > "count": 2,
> > "results": [
> > {
> > "$typeName$": "__tempQueryResultStruct1",
> > "instanceInfo": {
> > "$typeName$": "__IdType",
> > "guid": "9b29d7ef-ac2a-487f-aa2b-b47056e62731",
> > "state": "ACTIVE",
> > "typeName": "hive_column",
> > "version": 0
> > },
> > "traitDetails": null
> > },
> > {
> > "$typeName$": "__tempQueryResultStruct1",
> > "instanceInfo": {
> > "$typeName$": "__IdType",
> > "guid": "08180454-4938-45e8-a202-d52111500d65",
> > "state": "ACTIVE",
> > "typeName": "hive_column",
> > "version": 0
> > },
> > "traitDetails": null
> > }
> > ],
> > "dataType": {
> > "typeName": "__tempQueryResultStruct1",
> > "typeDescription": null,
> > "typeVersion": "1.0",
> > "attributeDefinitions": [
> > {
> > "name": "traitDetails",
> > "dataTypeName": "PII",
> > "multiplicity": {
> > "lower": 0,
> > "upper": 1,
> > "isUnique": false
> > },
> > "isComposite": false,
> > "isUnique": false,
> > "isIndexable": false,
> > "reverseAttributeName": null
> > },
> > {
> > "name": "instanceInfo",
> > "dataTypeName": "__IdType",
> > "multiplicity": {
> > "lower": 0,
> > "upper": 1,
> > "isUnique": false
> > },
> > "isComposite": false,
> > "isUnique": false,
> > "isIndexable": false,
> > "reverseAttributeName": null
> > }
> > ]
> > }
> > }
Good catch Sarath! Earlier DSL used a 'temporary struct' to serialize results for the following cases:
- the query is for a classification
- the query has a select clause
In such cases, the reponse includes the type-defintion of the 'temporary struct' as well. I think this adds unnecessary complications in parsing of the response. Having a single response format for all variations will make it easier to parse the response. I would suggest to go with a single response format, as done in this patch.
- Madhan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65037/#review195035
-----------------------------------------------------------
On Jan. 9, 2018, 8:09 a.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65037/
> -----------------------------------------------------------
>
> (Updated Jan. 9, 2018, 8:09 a.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-2347
> https://issues.apache.org/jira/browse/ATLAS-2347
>
>
> Repository: atlas
>
>
> Description
> -------
>
> Updated serialization of V1 search API response to be consistent with earlier verion of Atlas
>
>
> Diffs
> -----
>
> intg/src/main/java/org/apache/atlas/utils/AtlasJson.java a82b7ba9
> intg/src/main/java/org/apache/atlas/v1/model/discovery/DSLSearchResult.java PRE-CREATION
> intg/src/main/java/org/apache/atlas/v1/model/discovery/FullTextSearchResult.java PRE-CREATION
> webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java 252cc0e7
>
>
> Diff: https://reviews.apache.org/r/65037/diff/1/
>
>
> Testing
> -------
>
> - verified that the response is consistent with Atlas from branch-0.8
>
>
> Thanks,
>
> Madhan Neethiraj
>
>
Re: Review Request 65037: ATLAS-2347: fixed V1 REST API for search to
keep the response consistent with earlier version of Atlas
Posted by Sarath Subramanian <sa...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/65037/#review195035
-----------------------------------------------------------
intg/src/main/java/org/apache/atlas/v1/model/discovery/DSLSearchResult.java
Lines 48 (patched)
<https://reviews.apache.org/r/65037/#comment274153>
'results' format for tag search on v1 dsl is different (includes 'instanceInfo' and 'traitDetails') and not always list of Referenceables. Please review.
e.g:
http://localhost:21000/api/atlas/discovery/search/dsl?query=`PII`
{
"requestId": "pool-2-thread-9 - a6448c2d-1b08-423c-bffc-e2584edf7f74",
"query": "`PII`",
"queryType": "dsl",
"count": 2,
"results": [
{
"$typeName$": "__tempQueryResultStruct1",
"instanceInfo": {
"$typeName$": "__IdType",
"guid": "9b29d7ef-ac2a-487f-aa2b-b47056e62731",
"state": "ACTIVE",
"typeName": "hive_column",
"version": 0
},
"traitDetails": null
},
{
"$typeName$": "__tempQueryResultStruct1",
"instanceInfo": {
"$typeName$": "__IdType",
"guid": "08180454-4938-45e8-a202-d52111500d65",
"state": "ACTIVE",
"typeName": "hive_column",
"version": 0
},
"traitDetails": null
}
],
"dataType": {
"typeName": "__tempQueryResultStruct1",
"typeDescription": null,
"typeVersion": "1.0",
"attributeDefinitions": [
{
"name": "traitDetails",
"dataTypeName": "PII",
"multiplicity": {
"lower": 0,
"upper": 1,
"isUnique": false
},
"isComposite": false,
"isUnique": false,
"isIndexable": false,
"reverseAttributeName": null
},
{
"name": "instanceInfo",
"dataTypeName": "__IdType",
"multiplicity": {
"lower": 0,
"upper": 1,
"isUnique": false
},
"isComposite": false,
"isUnique": false,
"isIndexable": false,
"reverseAttributeName": null
}
]
}
}
- Sarath Subramanian
On Jan. 9, 2018, 12:09 a.m., Madhan Neethiraj wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65037/
> -----------------------------------------------------------
>
> (Updated Jan. 9, 2018, 12:09 a.m.)
>
>
> Review request for atlas.
>
>
> Bugs: ATLAS-2347
> https://issues.apache.org/jira/browse/ATLAS-2347
>
>
> Repository: atlas
>
>
> Description
> -------
>
> Updated serialization of V1 search API response to be consistent with earlier verion of Atlas
>
>
> Diffs
> -----
>
> intg/src/main/java/org/apache/atlas/utils/AtlasJson.java a82b7ba9
> intg/src/main/java/org/apache/atlas/v1/model/discovery/DSLSearchResult.java PRE-CREATION
> intg/src/main/java/org/apache/atlas/v1/model/discovery/FullTextSearchResult.java PRE-CREATION
> webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java 252cc0e7
>
>
> Diff: https://reviews.apache.org/r/65037/diff/1/
>
>
> Testing
> -------
>
> - verified that the response is consistent with Atlas from branch-0.8
>
>
> Thanks,
>
> Madhan Neethiraj
>
>