Review Request 61518: ATLAS-2033: Changed Pretty JSON Generation to Ugly for v1 Entity Serializers

2017-08-08 Thread Ashutosh Mestry

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

Review request for atlas and Nixon Rodrigues.


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


Repository: atlas


Description
---

**Implementation**

Changed _writePretty_ to _write_ for GSON serializer for v1 entities.


Diffs
-

  
typesystem/src/main/scala/org/apache/atlas/typesystem/json/InstanceSerialization.scala
 3354d7c 


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


Testing
---

**Unit tests**
Existing suite.


Thanks,

Ashutosh Mestry



[jira] [Created] (ATLAS-2034) hard delete metadata fails

2017-08-08 Thread Petrina Zheng (JIRA)
Petrina Zheng created ATLAS-2034:


 Summary: hard delete metadata fails
 Key: ATLAS-2034
 URL: https://issues.apache.org/jira/browse/ATLAS-2034
 Project: Atlas
  Issue Type: Bug
  Components:  atlas-core
Affects Versions: 0.8-incubating
 Environment: windows 7
Reporter: Petrina Zheng
Priority: Critical
 Attachments: error.log

hard delete metadata fails because current logic is like this:

1. hard delete entity vertices;

2. notify listeners in which trying to find ITypeReferenceable by entity id 
while the entity is hard deleted already.

3. notify fails and throws Exception.

To enable hard delete, I config the "atlas.DeleteHandlerV1.impl 
=org.apache.atlas.repository.store.graph.v1.HardDeleteHandlerV1"

The api I used is "DELETE v2/entity/guid/{guid}"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Review Request 61037: ATLAS-1980: Add more relationship instance validation

2017-08-08 Thread Kevin Wright
Unsubscribe

— 
 

Kevin Wright
Consultant

 

Fortune 100 Best Companies to Work For 2016
Glassdoor Best Places to Work 2016
Consulting Magazine Best Firms to Work For 2015
Human Rights Campaign Best Places to Work (100% Corporate Equality Index) 
2015-2016

3630 Peachtree Road NE, Suite 500 | Atlanta, GA 30326 | USA
mobile 404-849-2410

@kevinawright 
kevin.wri...@slalom.com

slalom.com  | thinking  
| join 

  
 

On 8/8/17, 18:58, "Sarath Subramanian"  wrote:


---
This is an automatically generated e-mail. To reply, visit:

https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.apache.org_r_61037_-23review182444=DwICaQ=fa_WZs7nNMvOIDyLmzi2sMVHyyC4hN9WQl29lWJQ5Y4=lTJnj8-KWTxaydoIAt4O_EnU4-aymDbcwnXP1Dx6PcY=J7R1bj15eBdqQyR1j7Ob37iADBqKQjfruIVL-onyDh4=TiIU3_qLHdKfCzw1fF77OVK_0K_e8WNl8tSTnPSXuoA=
 
---


Ship it!




Ship It!

- Sarath Subramanian


On July 22, 2017, 1:55 p.m., David Radley wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> 
https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.apache.org_r_61037_=DwICaQ=fa_WZs7nNMvOIDyLmzi2sMVHyyC4hN9WQl29lWJQ5Y4=lTJnj8-KWTxaydoIAt4O_EnU4-aymDbcwnXP1Dx6PcY=J7R1bj15eBdqQyR1j7Ob37iADBqKQjfruIVL-onyDh4=do8-YnmHh72Z4UU4LxuITr7W8SCfwQ2rPLvIwgH_8WY=
 
> ---
> 
> (Updated July 22, 2017, 1:55 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Sarath Subramanian.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> ATLAS-1980: Add relationship instance validation to check end point type
> 
> 
> Diffs
> -
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 
b24f99f6f9337aa10f40e9f10024fe5a345c3540 
>   
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
 49e08a070a803a36253b502666947ab92ffe39d3 
> 
> 
> Diff: 
https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.apache.org_r_61037_diff_1_=DwICaQ=fa_WZs7nNMvOIDyLmzi2sMVHyyC4hN9WQl29lWJQ5Y4=lTJnj8-KWTxaydoIAt4O_EnU4-aymDbcwnXP1Dx6PcY=J7R1bj15eBdqQyR1j7Ob37iADBqKQjfruIVL-onyDh4=a8BgDqsPYRTSNfRgr-GuFlNfRzKkKJffL8L_IebuoZM=
 
> 
> 
> Testing
> ---
> 
> ran junits.
> checked that I could still create a relationship
> checked that the error message came out as expected when a existant guid 
associated with the wrong type of entity was supplied.
> 
> 
> Thanks,
> 
> David Radley
> 
>





[jira] [Commented] (ATLAS-1980) Add relationship instance validation to check end point type

2017-08-08 Thread Sarath Subramanian (JIRA)

[ 
https://issues.apache.org/jira/browse/ATLAS-1980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16119173#comment-16119173
 ] 

Sarath Subramanian commented on ATLAS-1980:
---

Committed to master: 
http://git-wip-us.apache.org/repos/asf/atlas/commit/3f2d1915

> Add relationship instance validation to check end point type
> 
>
> Key: ATLAS-1980
> URL: https://issues.apache.org/jira/browse/ATLAS-1980
> Project: Atlas
>  Issue Type: Bug
>Reporter: David Radley
>Assignee: David Radley
> Attachments: ATLAS-1980.patch
>
>
> Using a model RelationshipDef that is defines
>  {
>  "name": "CategoryAnchor",
>  "typeVersion": "1.0",
>  "endDef1": {
>"name": "categories",
>"type": "Glossary",
>"cardinality":"SET",
> "isContainer":true
>  },
>  "endDef2": {
>"name": "anchor",
>"type": "GlossaryCategory",
>"cardinality":"SINGLE"
>  },
>  "relationshipCategory":"COMPOSITION",
>  "propagateTags":"NONE"
>  },
> - it does not check that the guid of the relationship is actually of the 
> right type. If I create an instance of the above relationships passing 2 
> GlossaryCategory  guids ; it works. This should be rejected.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Review Request 61037: ATLAS-1980: Add more relationship instance validation

2017-08-08 Thread Sarath Subramanian

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


Ship it!




Ship It!

- Sarath Subramanian


On July 22, 2017, 1:55 p.m., David Radley wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61037/
> ---
> 
> (Updated July 22, 2017, 1:55 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Sarath Subramanian.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> ATLAS-1980: Add relationship instance validation to check end point type
> 
> 
> Diffs
> -
> 
>   intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 
> b24f99f6f9337aa10f40e9f10024fe5a345c3540 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
>  49e08a070a803a36253b502666947ab92ffe39d3 
> 
> 
> Diff: https://reviews.apache.org/r/61037/diff/1/
> 
> 
> Testing
> ---
> 
> ran junits.
> checked that I could still create a relationship
> checked that the error message came out as expected when a existant guid 
> associated with the wrong type of entity was supplied.
> 
> 
> Thanks,
> 
> David Radley
> 
>



[jira] [Commented] (ATLAS-1983) Relationship instance creation does not police cardinality

2017-08-08 Thread Sarath Subramanian (JIRA)

[ 
https://issues.apache.org/jira/browse/ATLAS-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16119071#comment-16119071
 ] 

Sarath Subramanian commented on ATLAS-1983:
---

added link to review board.

> Relationship instance creation does not police cardinality
> --
>
> Key: ATLAS-1983
> URL: https://issues.apache.org/jira/browse/ATLAS-1983
> Project: Atlas
>  Issue Type: Bug
>Reporter: David Radley
>Assignee: David Radley
>
> Using a model RelationshipDef that is defines
>  {
>  "name": "CategoryAnchor",
>  "typeVersion": "1.0",
>  "endDef1": {
>"name": "categories",
>"type": "Glossary",
>"cardinality":"SET",
> "isContainer":true
>  },
>  "endDef2": {
>"name": "anchor",
>"type": "GlossaryCategory",
>"cardinality":"SINGLE"
>  },
>  "relationshipCategory":"COMPOSITION",
>  "propagateTags":"NONE"
>  },
> - I can create a relationship then add the same GlossayCategory to another 
> glossary. Both edges then exist. There should be only one allowed due to the 
> RelationshipDef cardinality. This should be rejected.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Review Request 61247: [ATLAS-1984]: Use AtlasRelatedObjectId to refer to relationship attributes during entity create/update

2017-08-08 Thread Sarath Subramanian


> On Aug. 7, 2017, 8:10 a.m., David Radley wrote:
> > intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
> > Lines 334 (patched)
> > 
> >
> > Call null be a valid value for a required attribute.
> > 
> > I think there is a differene between not specifying an attribute (i.e.e 
> > the key is not there ) and specifying it with null as a value.

Currently null is not accepted as a valid value for required attribute. If we 
allow null as valid required attribute values, for e.g. hive_table.db is 
assigned null, will result in dangling table entity without db reference 
resulting in inconsistencies in search, ui rendering. This is open to 
discussion and can be scoped out of this JIRA.


> On Aug. 7, 2017, 8:10 a.m., David Radley wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
> > Line 380 (original), 395 (patched)
> > 
> >
> > I am not sure what this is doing - it looks like you are adding 
> > relationship attribute for legacy relationships and duplicating them in the 
> > inverse edge. Do we need to support relaitonship attributes for legacy 
> > relationships? It would be  good incentive fror peopel to move to the non 
> > legacy relationships.

this section adds relationshipattributes to legacy relationships 
(hive_table.columns) and its inverse edge (hive_column.table). If we restrict 
adding relationshipAttributes to legacy edges, how do we support systems with 
legacy models to use some of the relationship features like tag propagation? we 
might add propagate direction as relationship attributes and we may need this 
property to decide on tag propagation direction (even for inverse edge).


> On Aug. 7, 2017, 8:10 a.m., David Radley wrote:
> > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
> > Lines 1437 (patched)
> > 
> >
> > I suggest this be static and junitted.
> > 
> > This method seems to be removing entity attributes when there was a 
> > relationship attributes. This appears to be part of the legacy support; if 
> > so shouldn't we be only doing this checking for legacy cases abnd issuing 
> > errors otherwise.

1. Legacy Case : relationship attribute values are specified in 'attributes'
2. New case: relationship attribute values are specified in 
'relationshipAttributes'

compactAttributes() removes duplicate attribute from 'attributes' if same 
attribute is mentioned in both - e.g. 'columns' is mentioned in both attributes 
and relationshipAttributes - the one in relationshipAttributes takes 
precedence. I think this method would apply to both legacy and newer cases.


- Sarath


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


On July 30, 2017, 8:36 p.m., Sarath Subramanian wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61247/
> ---
> 
> (Updated July 30, 2017, 8:36 p.m.)
> 
> 
> Review request for atlas, David Radley and Madhan Neethiraj.
> 
> 
> Bugs: ATLAS-1984
> https://issues.apache.org/jira/browse/ATLAS-1984
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> AtlasObjectId is used to refer to entity attributes referring to another 
> entity.
> hive_table.columns => List
> hive_table.db => AtlasObjectId
> Change this to use AtlasRelatedObjectId with the following structure:
> class AtlasRelatedObjectId
> { String relationshipGuid; String displayText; AtlasStruct 
> relationshipAttributes; }
> 
> 
> Diffs
> -
> 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationship.java 
> 41883713 
>   intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java 
> 80f3a664 
>   intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 277d0fa2 
>   intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 3f395419 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java
>  0210a118 
>   
> repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java
>  b8fd70e5 
> 
> 
> Diff: https://reviews.apache.org/r/61247/diff/2/
> 
> 
> Testing
> ---
> 
> Tested using POSTMAN REST client
> 
> mvn clean package - In Progress
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>



Re: Review Request 61502: ATLAS-2025: Validation on type name and classification

2017-08-08 Thread Sarath Subramanian

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


Ship it!




Ship It!

- Sarath Subramanian


On Aug. 8, 2017, 10:16 a.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61502/
> ---
> 
> (Updated Aug. 8, 2017, 10:16 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-2025
> https://issues.apache.org/jira/browse/ATLAS-2025
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Right now there's no such validation and as a (unwanted) side-effect the 
> following happens
> 
> 1. Internal error when type name is invalid (NPE)
> 2. Type is valid but classification is invalid - the result contains entities 
> which don't have the tag (exactly opposite behavior)
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  66dd7484 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 929f8d00 
> 
> 
> Diff: https://reviews.apache.org/r/61502/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the correctness of results using curl/postman calls, any invalid 
> type name / classification throws 400 now.
> 
> mvn clean package -Pdist,berkeley-elasticsearch executes successfully
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 61502: ATLAS-2025: Validation on type name and classification

2017-08-08 Thread Apoorv Naik

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




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


Not needed, only added as an extra guard, in case anything slips through.



repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
Lines 61 (patched)


The entityType can be null under two cases 

1. TypeName is present in request but it's invalid
2. TypeName is missing in request

We need to identity case 1 and throw 400 for that, case 2 doesn't equate to 
400 bad request.

Same for the other check


- Apoorv Naik


On Aug. 8, 2017, 5:16 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61502/
> ---
> 
> (Updated Aug. 8, 2017, 5:16 p.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-2025
> https://issues.apache.org/jira/browse/ATLAS-2025
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Right now there's no such validation and as a (unwanted) side-effect the 
> following happens
> 
> 1. Internal error when type name is invalid (NPE)
> 2. Type is valid but classification is invalid - the result contains entities 
> which don't have the tag (exactly opposite behavior)
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  66dd7484 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 929f8d00 
> 
> 
> Diff: https://reviews.apache.org/r/61502/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the correctness of results using curl/postman calls, any invalid 
> type name / classification throws 400 now.
> 
> mvn clean package -Pdist,berkeley-elasticsearch executes successfully
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



[jira] [Commented] (ATLAS-1999) Use AtlasRelatedObjectId to display relationshipAttribute values during entity retrieval

2017-08-08 Thread Sarath Subramanian (JIRA)

[ 
https://issues.apache.org/jira/browse/ATLAS-1999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118869#comment-16118869
 ] 

Sarath Subramanian commented on ATLAS-1999:
---

Committed to master: 
http://git-wip-us.apache.org/repos/asf/atlas/commit/87a421ac

> Use AtlasRelatedObjectId to display relationshipAttribute values during 
> entity retrieval
> 
>
> Key: ATLAS-1999
> URL: https://issues.apache.org/jira/browse/ATLAS-1999
> Project: Atlas
>  Issue Type: Sub-task
>  Components:  atlas-core
>Affects Versions: trunk
>Reporter: Sarath Subramanian
>Assignee: Sarath Subramanian
> Fix For: trunk
>
> Attachments: ATLAS-1999.1.patch
>
>
> * Currently relationship attribute values during entity retrieval is using 
> AtlasObjectId format. Change this to use AtlasRelatedObjectId to contain 
> additional information for use during search and UI
> * validate and normalize relationship attribute values during entity creation



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2033) AbstractNotification Message Serializer Uses Pretty JSON

2017-08-08 Thread Ashutosh Mestry (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashutosh Mestry updated ATLAS-2033:
---
Attachment: ATLAS-2033.patch

> AbstractNotification Message Serializer Uses Pretty JSON
> 
>
> Key: ATLAS-2033
> URL: https://issues.apache.org/jira/browse/ATLAS-2033
> Project: Atlas
>  Issue Type: Improvement
>  Components:  atlas-core
>Affects Versions: trunk, 0.8-incubating
>Reporter: Ashutosh Mestry
>Assignee: Ashutosh Mestry
>Priority: Minor
> Fix For: trunk
>
> Attachments: ATLAS-2033.patch
>
>
> _InstanceSerialization.scala_ uses _writePretty_ instead of _write_. This 
> causes prettified JSON to be generated.
> Pretty JSON is about 30% larger than ugly JSON.
> This change will help in dealing Kafa's message threshold of 1MB.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2033) AbstractNotification Message Serializer Uses Pretty JSON

2017-08-08 Thread Ashutosh Mestry (JIRA)
Ashutosh Mestry created ATLAS-2033:
--

 Summary: AbstractNotification Message Serializer Uses Pretty JSON
 Key: ATLAS-2033
 URL: https://issues.apache.org/jira/browse/ATLAS-2033
 Project: Atlas
  Issue Type: Improvement
  Components:  atlas-core
Affects Versions: 0.8-incubating, trunk
Reporter: Ashutosh Mestry
Assignee: Ashutosh Mestry
Priority: Minor
 Fix For: trunk


_InstanceSerialization.scala_ uses _writePretty_ instead of _write_. This 
causes prettified JSON to be generated.

Pretty JSON is about 30% larger than ugly JSON.

This change will help in dealing Kafa's message threshold of 1MB.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Review Request 61502: ATLAS-2025: Validation on type name and classification

2017-08-08 Thread Sarath Subramanian

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




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


do you need null check here? entityType validation is already done as part 
of constructor in line 410.



repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
Lines 61 (patched)


if (entityType == null) check is enough, since null and empty typeName, 
return null entityType. Same for line 66


- Sarath Subramanian


On Aug. 8, 2017, 10:16 a.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61502/
> ---
> 
> (Updated Aug. 8, 2017, 10:16 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-2025
> https://issues.apache.org/jira/browse/ATLAS-2025
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Right now there's no such validation and as a (unwanted) side-effect the 
> following happens
> 
> 1. Internal error when type name is invalid (NPE)
> 2. Type is valid but classification is invalid - the result contains entities 
> which don't have the tag (exactly opposite behavior)
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  66dd7484 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 929f8d00 
> 
> 
> Diff: https://reviews.apache.org/r/61502/diff/1/
> 
> 
> Testing
> ---
> 
> Validated the correctness of results using curl/postman calls, any invalid 
> type name / classification throws 400 now.
> 
> mvn clean package -Pdist,berkeley-elasticsearch executes successfully
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Review Request 61502: ATLAS-2025: Validation on type name and classification

2017-08-08 Thread Apoorv Naik

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

Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath 
Subramanian.


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


Repository: atlas


Description
---

Right now there's no such validation and as a (unwanted) side-effect the 
following happens

1. Internal error when type name is invalid (NPE)
2. Type is valid but classification is invalid - the result contains entities 
which don't have the tag (exactly opposite behavior)


Diffs
-

  
repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java 
66dd7484 
  repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
929f8d00 


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


Testing
---

Validated the correctness of results using curl/postman calls, any invalid type 
name / classification throws 400 now.

mvn clean package -Pdist,berkeley-elasticsearch executes successfully


Thanks,

Apoorv Naik



[jira] [Commented] (ATLAS-2026) Basic/DSL Query with invalid typeName/classification name throws 500 Internal server error

2017-08-08 Thread Apoorv Naik (JIRA)

[ 
https://issues.apache.org/jira/browse/ATLAS-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118585#comment-16118585
 ] 

Apoorv Naik commented on ATLAS-2026:


I think it's better to do the validation in the search context itself, I've 
added a patch under ATLAS-2025

> Basic/DSL Query with invalid typeName/classification name throws 500 Internal 
> server error
> --
>
> Key: ATLAS-2026
> URL: https://issues.apache.org/jira/browse/ATLAS-2026
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Affects Versions: 0.9-incubating
>Reporter: Sharmadha Sainath
> Attachments: ATLAS-2026.2.patch, ATLAS-2026.patch
>
>
> Following DSL/Basic queries with invalid classification name and type name 
> throw 500 Internal server error
> {code}
> http://localhost:21000/api/atlas/v2/search/basic?typeName=unknown_type=unknown_tag
> http://localhost:21000/api/atlas/v2/search/dsl?typeName=unknown_type=unknown_tag
> {code}
> It would be appropriate to throw 40X Error code instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2025) Basic query with entity and tag filters : Providing invalid tag name for classification returns all entities matching typename/query

2017-08-08 Thread Apoorv Naik (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apoorv Naik updated ATLAS-2025:
---
Attachment: 0002-ATLAS-2025-Validation-of-classification-type-in-basi.patch

> Basic query with entity and tag filters : Providing invalid tag name for 
> classification returns all entities matching typename/query
> 
>
> Key: ATLAS-2025
> URL: https://issues.apache.org/jira/browse/ATLAS-2025
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Affects Versions: 0.9-incubating, 0.8.1-incubating
>Reporter: Sharmadha Sainath
>Priority: Critical
> Attachments: 
> 0002-ATLAS-2025-Validation-of-classification-type-in-basi.patch
>
>
> Fired a basic query with following POST request body with Non Existing tag 
> using curl (because UI only lets user select from existing tags):
> {code}
> {
> "entityFilters":null,
> "tagFilters":null,
> "attributes":null,
> "query":null,
> "excludeDeletedEntities":true,
> "limit":25,
> "typeName":"kafka_topic",
> "classification":"non_existing_tag"
> }
> {code}
> GET Basic search request with classification parameter also lists all the 
> kakfa_topic entities:
> {code}
> http://localhost:21000/api/atlas/v2/search/basic?typeName=kafka_topic=non_existing_tag=50
> {code}
> Expected 40X Response code saying that tag doesn't exist. But the response 
> listed all the kafka_topic entities. This gives an delusion that all returned 
> kafka_topic entities are tagged with 'non_existing_tag'



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (ATLAS-2025) Basic query with entity and tag filters : Providing invalid tag name for classification returns all entities matching typename/query

2017-08-08 Thread Apoorv Naik (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Apoorv Naik reassigned ATLAS-2025:
--

Assignee: Apoorv Naik

> Basic query with entity and tag filters : Providing invalid tag name for 
> classification returns all entities matching typename/query
> 
>
> Key: ATLAS-2025
> URL: https://issues.apache.org/jira/browse/ATLAS-2025
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Affects Versions: 0.9-incubating, 0.8.1-incubating
>Reporter: Sharmadha Sainath
>Assignee: Apoorv Naik
>Priority: Critical
> Attachments: 
> 0002-ATLAS-2025-Validation-of-classification-type-in-basi.patch
>
>
> Fired a basic query with following POST request body with Non Existing tag 
> using curl (because UI only lets user select from existing tags):
> {code}
> {
> "entityFilters":null,
> "tagFilters":null,
> "attributes":null,
> "query":null,
> "excludeDeletedEntities":true,
> "limit":25,
> "typeName":"kafka_topic",
> "classification":"non_existing_tag"
> }
> {code}
> GET Basic search request with classification parameter also lists all the 
> kakfa_topic entities:
> {code}
> http://localhost:21000/api/atlas/v2/search/basic?typeName=kafka_topic=non_existing_tag=50
> {code}
> Expected 40X Response code saying that tag doesn't exist. But the response 
> listed all the kafka_topic entities. This gives an delusion that all returned 
> kafka_topic entities are tagged with 'non_existing_tag'



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2032) classificationDef update

2017-08-08 Thread David Radley (JIRA)
David Radley created ATLAS-2032:
---

 Summary: classificationDef update
 Key: ATLAS-2032
 URL: https://issues.apache.org/jira/browse/ATLAS-2032
 Project: Atlas
  Issue Type: Sub-task
Reporter: David Radley
Assignee: David Radley


Ensure that ClassificationDef update can remove and add entityTypes



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2029) Enhance classificationDef create to include a list of entities it supports

2017-08-08 Thread David Radley (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Radley updated ATLAS-2029:

Summary: Enhance classificationDef create to include a list of entities it 
supports  (was: Enhance classification to include a list of entities it 
supports)

> Enhance classificationDef create to include a list of entities it supports
> --
>
> Key: ATLAS-2029
> URL: https://issues.apache.org/jira/browse/ATLAS-2029
> Project: Atlas
>  Issue Type: Sub-task
>Reporter: David Radley
>Assignee: David Radley
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2031) EntityDef deletion

2017-08-08 Thread David Radley (JIRA)
David Radley created ATLAS-2031:
---

 Summary: EntityDef deletion
 Key: ATLAS-2031
 URL: https://issues.apache.org/jira/browse/ATLAS-2031
 Project: Atlas
  Issue Type: Sub-task
Reporter: David Radley
Assignee: David Radley


My current thinking is:
- if there is a classificationdef that refers to this entitydef - then do not 
allow the deletion to proceed. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2029) Enhance classification to include a list of entities it supports

2017-08-08 Thread David Radley (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Radley updated ATLAS-2029:

Summary: Enhance classification to include a list of entities it supports  
(was: Enhance classification to include a list of enttities it supports)

> Enhance classification to include a list of entities it supports
> 
>
> Key: ATLAS-2029
> URL: https://issues.apache.org/jira/browse/ATLAS-2029
> Project: Atlas
>  Issue Type: Sub-task
>Reporter: David Radley
>Assignee: David Radley
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2030) Enhance graph to link ClassificationDefs and entityDefs

2017-08-08 Thread David Radley (JIRA)
David Radley created ATLAS-2030:
---

 Summary: Enhance graph to link ClassificationDefs and entityDefs  
 Key: ATLAS-2030
 URL: https://issues.apache.org/jira/browse/ATLAS-2030
 Project: Atlas
  Issue Type: Sub-task
Reporter: David Radley
Assignee: David Radley






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (ATLAS-2029) Enhance classification to include a list of enttities it supports

2017-08-08 Thread David Radley (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Radley reassigned ATLAS-2029:
---

Assignee: David Radley

> Enhance classification to include a list of enttities it supports
> -
>
> Key: ATLAS-2029
> URL: https://issues.apache.org/jira/browse/ATLAS-2029
> Project: Atlas
>  Issue Type: Sub-task
>Reporter: David Radley
>Assignee: David Radley
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2029) Enhance classification to include a list of enttities it supports

2017-08-08 Thread David Radley (JIRA)
David Radley created ATLAS-2029:
---

 Summary: Enhance classification to include a list of enttities it 
supports
 Key: ATLAS-2029
 URL: https://issues.apache.org/jira/browse/ATLAS-2029
 Project: Atlas
  Issue Type: Sub-task
Reporter: David Radley






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2026) Basic/DSL Query with invalid typeName/classification name throws 500 Internal server error

2017-08-08 Thread Sharmadha Sainath (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sharmadha Sainath updated ATLAS-2026:
-
Attachment: ATLAS-2026.2.patch

> Basic/DSL Query with invalid typeName/classification name throws 500 Internal 
> server error
> --
>
> Key: ATLAS-2026
> URL: https://issues.apache.org/jira/browse/ATLAS-2026
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Affects Versions: 0.9-incubating
>Reporter: Sharmadha Sainath
> Attachments: ATLAS-2026.2.patch, ATLAS-2026.patch
>
>
> Following DSL/Basic queries with invalid classification name and type name 
> throw 500 Internal server error
> {code}
> http://localhost:21000/api/atlas/v2/search/basic?typeName=unknown_type=unknown_tag
> http://localhost:21000/api/atlas/v2/search/dsl?typeName=unknown_type=unknown_tag
> {code}
> It would be appropriate to throw 40X Error code instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2028) Basic query with entity and tag filters : Invalid filter keys for type and tags attributes are ignored and fetches all entities of the type / associated to the tag

2017-08-08 Thread Sharmadha Sainath (JIRA)
Sharmadha Sainath created ATLAS-2028:


 Summary: Basic query with entity and tag filters : Invalid filter 
keys for type and tags attributes are ignored and fetches all entities of the 
type / associated to the tag
 Key: ATLAS-2028
 URL: https://issues.apache.org/jira/browse/ATLAS-2028
 Project: Atlas
  Issue Type: Bug
Affects Versions: 0.9-incubating
Reporter: Sharmadha Sainath


Basic search request with POST body fired using curl:
{code}
{

"entityFilters":{"condition":"AND","criterion":[{"attributeName":"invalid_attr","operator":"=","attributeValue":"userdir"}]},
"tagFilters":null,
"attributes":null,
"query":null,
"excludeDeletedEntities":true,
"limit":25,
"typeName":"hdfs_path",
"classification":null
}
{code}

All the hdfs_path entities are fetched because invalid filter keys are ignored :
{code}
Converted query string with 2 replacements: [v."__typeName":(hdfs_path) AND 
v."__state":ACTIVE] => [iyt_t:(hdfs_path) AND b2d_t:ACTIVE] 
(IndexSerializer:648)
{code}

Same happens with invalid tag attribute filters also.
This gives a delusion that all returned hdfs_path entities are satisfied by the 
filter condition.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Review Request 61496: ATLAS-2027 : UI : Add type-name with attribute name in query-builder

2017-08-08 Thread keval bhatt

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

Review request for atlas, Apoorv Naik, Madhan Neethiraj, Nixon Rodrigues, and 
Sarath Subramanian.


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


Repository: atlas


Description
---

Add type-name with attribute name in query-builder attribute dropdown.

Example:

Description = > Description (String)


Diffs
-

  dashboardv2/public/js/views/search/QueryBuilderView.js 6cdbeb3 


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


Testing
---

Done one round on sanity test.


Thanks,

keval bhatt



[jira] [Updated] (ATLAS-2026) Basic/DSL Query with invalid typeName/classification name throws 500 Internal server error

2017-08-08 Thread Sharmadha Sainath (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sharmadha Sainath updated ATLAS-2026:
-
Affects Version/s: (was: 0.8.1-incubating)

> Basic/DSL Query with invalid typeName/classification name throws 500 Internal 
> server error
> --
>
> Key: ATLAS-2026
> URL: https://issues.apache.org/jira/browse/ATLAS-2026
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Affects Versions: 0.9-incubating
>Reporter: Sharmadha Sainath
> Attachments: ATLAS-2026.patch
>
>
> Following DSL/Basic queries with invalid classification name and type name 
> throw 500 Internal server error
> {code}
> http://localhost:21000/api/atlas/v2/search/basic?typeName=unknown_type=unknown_tag
> http://localhost:21000/api/atlas/v2/search/dsl?typeName=unknown_type=unknown_tag
> {code}
> It would be appropriate to throw 40X Error code instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2027) UI : Add type-name with attribute name in query-builder

2017-08-08 Thread Keval Bhatt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Keval Bhatt updated ATLAS-2027:
---
Fix Version/s: 0.8.1-incubating
   0.9-incubating

> UI : Add type-name with attribute name in query-builder 
> 
>
> Key: ATLAS-2027
> URL: https://issues.apache.org/jira/browse/ATLAS-2027
> Project: Atlas
>  Issue Type: Improvement
>  Components: atlas-webui
>Affects Versions: 0.9-incubating
>Reporter: Keval Bhatt
>Assignee: Keval Bhatt
> Fix For: 0.9-incubating, 0.8.1-incubating
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2027) UI : Add type-name with attribute name in query-builder

2017-08-08 Thread Keval Bhatt (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Keval Bhatt updated ATLAS-2027:
---
Affects Version/s: 0.9-incubating

> UI : Add type-name with attribute name in query-builder 
> 
>
> Key: ATLAS-2027
> URL: https://issues.apache.org/jira/browse/ATLAS-2027
> Project: Atlas
>  Issue Type: Improvement
>  Components: atlas-webui
>Affects Versions: 0.9-incubating
>Reporter: Keval Bhatt
>Assignee: Keval Bhatt
> Fix For: 0.9-incubating, 0.8.1-incubating
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2027) UI : Add type-name with attribute name in query-builder

2017-08-08 Thread Keval Bhatt (JIRA)
Keval Bhatt created ATLAS-2027:
--

 Summary: UI : Add type-name with attribute name in query-builder 
 Key: ATLAS-2027
 URL: https://issues.apache.org/jira/browse/ATLAS-2027
 Project: Atlas
  Issue Type: Improvement
Reporter: Keval Bhatt
Assignee: Keval Bhatt






--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (ATLAS-2026) Basic/DSL Query with invalid typeName/classification name throws 500 Internal server error

2017-08-08 Thread Sharmadha Sainath (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-2026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sharmadha Sainath updated ATLAS-2026:
-
Attachment: ATLAS-2026.patch

> Basic/DSL Query with invalid typeName/classification name throws 500 Internal 
> server error
> --
>
> Key: ATLAS-2026
> URL: https://issues.apache.org/jira/browse/ATLAS-2026
> Project: Atlas
>  Issue Type: Bug
>  Components:  atlas-core
>Affects Versions: 0.9-incubating, 0.8.1-incubating
>Reporter: Sharmadha Sainath
> Attachments: ATLAS-2026.patch
>
>
> Following DSL/Basic queries with invalid classification name and type name 
> throw 500 Internal server error
> {code}
> http://localhost:21000/api/atlas/v2/search/basic?typeName=unknown_type=unknown_tag
> http://localhost:21000/api/atlas/v2/search/dsl?typeName=unknown_type=unknown_tag
> {code}
> It would be appropriate to throw 40X Error code instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (ATLAS-2026) Basic/DSL Query with invalid typeName/classification name throws 500 Internal server error

2017-08-08 Thread Sharmadha Sainath (JIRA)
Sharmadha Sainath created ATLAS-2026:


 Summary: Basic/DSL Query with invalid typeName/classification name 
throws 500 Internal server error
 Key: ATLAS-2026
 URL: https://issues.apache.org/jira/browse/ATLAS-2026
 Project: Atlas
  Issue Type: Bug
  Components:  atlas-core
Affects Versions: 0.9-incubating, 0.8.1-incubating
Reporter: Sharmadha Sainath


Following DSL/Basic queries with invalid classification name and type name 
throw 500 Internal server error
{code}
http://localhost:21000/api/atlas/v2/search/basic?typeName=unknown_type=unknown_tag
http://localhost:21000/api/atlas/v2/search/dsl?typeName=unknown_type=unknown_tag
{code}

It would be appropriate to throw 40X Error code instead.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


<> AttributeDef string validation

2017-08-08 Thread David Radley
Hi all,
I have been having an email conversation with William  (Songqing Ding). 
William is looking for some Atlas work to do. I suggested he looks at 
introducing new AttributeDefs that allow strings to be validated using 
regex patterns; Richard has responded with other helpful considerations. 
This requirement is something that Madhan and others were supportive of in 
a meeting a couple of weeks ago.

The below is the email exchange we have had to date. This email is to 
invite the community to contribute to this design discussion, 
many thanks,  David. 

- Forwarded by David Radley/UK/IBM on 08/08/2017 10:12 -

From:   David Radley/UK/IBM
To: Songqing Ding/Silicon Valley/IBM@IBMUS
Cc: Graham Wallis/UK/IBM@IBMGB, Kelvin Lawrence/Austin/IBM@IBMUS, 
Mandy Chessell/UK/IBM@IBMGB, Nigel L Jones/UK/IBM@IBMGB
Date:   08/08/2017 10:12
Subject:Re: Fw: Atlas Jiras and features


Hi Richard, 

Some comments in  tags. 
   all the best David. 




From:   Songqing Ding/Silicon Valley/IBM
To: David Radley/UK/IBM@IBMGB
Cc: Graham Wallis/UK/IBM@IBMGB, Kelvin Lawrence/Austin/IBM@IBMUS, 
Mandy Chessell/UK/IBM@IBMGB, Nigel L Jones/UK/IBM@IBMGB
Date:   08/08/2017 00:46
Subject:Re: Fw: Atlas Jiras and features



Hi David,
 
Thanks for the info, it is very helpful. 
 
I took a look at these Jiras:
 
ATLAS-1955: Validation for Attributes
Each Atlas Type (e.g. String, Date, Struct, ...) currently has a 
isValidValue(Object obj) method and attribute values are validated using 
attribute types. So if Atlas defines a static EMail type, he or she can 
implements isValidValue to validate the email addresses.  My 
thinking was that we should make the new attribtutedef validation, data 
driven and declarative and not require programming. If people want very 
complex validation that cannot be easily represented as a pattern - then 
they could look at the programming approach. I think we open up the 
ability to add custom validation - if all they need to do is understand 
regex. Defining the validation in metadata also means that it is managed 
with the other metadata like EntityDefs, whereas managing custom code 
fragments that may not be in the master would become a headache.   
 
If, say, different organizations have different email formats, then one 
wants to define dynamic email attributes. The existing facility on can use 
is AtlasConstraintDef. Currently each AtlasAttributeDef contains a list of 
AtlasConstraintDefs. However only two types of constraints (ownedRef & 
inverseRef) are defined and constraints are not used to validate the 
attribute values. Therefore, one way to implement a pattern matching 
validation for attributes is to add a PATTERN_MATCH constraint type and 
check the constraint during the value validation process.  I 
suggest we have a basic email pattern, which looks for characters followed 
by an @ followed by string segments separated by dots. If an organization 
wants to have a more specialized or different mail format - for example a 
Lotus notes format - they just define a new type with a different pattern. 
 With the proposed approach, we supply a attributedef that 90% could take 
and the other 10% have the flexibility to create their own versions if 
they want to.   
The drawback of the 2nd approach is that the constraints are local to the 
entity types. One needs to define the same constraint in multiple entity 
types if needed. 
ATLAS-1953:
 
It is good idea to have icon attributes so that users can define icons 
associated with their entity types. An new icon type can encapsulate this 
requirement.
 
Thanks,
-Richard
 
 
- Original message -
From: David Radley/UK/IBM
To: Kelvin Lawrence/Austin/IBM@IBMUS
Cc: Graham Wallis/UK/IBM@IBMGB, Mandy Chessell/UK/IBM@IBMGB, Songqing 
Ding/Silicon Valley/IBM@IBMUS, Nigel L Jones/UK/IBM@IBMGB
Subject: Fw: Atlas Jiras and features
Date: Mon, Aug 7, 2017 4:05 AM
 
Hi Kelvin,
I am back now. I noticed Richard has been active on the Jiras. I have an 
idea that Richard could look at; in the last call I attended, I mentioned 
some features, that would be great to get in, which the team supported. I 
was thinking Richard could do something along the lines of (draft 
unreviewed design follows  :-) ) : 

1) Adding an optional icon to EntityDefs
2) To do this is would be good to have a new ValidatableStringDefs  that 
could police the value of the attribute, the idea is that 
ValidatableStringDefs could be CRUD in a similar way to EntityDefs. These 
ValidatableStringDefs would have mandatory Regex expressions and possibly 
a customer validation message. 
3) New ValidatableAttributeDefs would have have specific Regex expressions 
in. Atlas can ship email, url, image AttributeDefs (and others?) . 
4)  The optional icon in EntityDef could then have a type IMAGE. 
5) Due to the inability to validate and reject content during imports - we 
are looking to accept string content - and return warning not error return 
codes 

[jira] [Created] (ATLAS-2025) Basic query with entity and tag filters : Providing invalid tag name for classification returns all entities matching typename/query

2017-08-08 Thread Sharmadha Sainath (JIRA)
Sharmadha Sainath created ATLAS-2025:


 Summary: Basic query with entity and tag filters : Providing 
invalid tag name for classification returns all entities matching typename/query
 Key: ATLAS-2025
 URL: https://issues.apache.org/jira/browse/ATLAS-2025
 Project: Atlas
  Issue Type: Bug
  Components:  atlas-core
Affects Versions: 0.9-incubating, 0.8.1-incubating
Reporter: Sharmadha Sainath
Priority: Critical


Fired a basic query with following POST request body with Non Existing tag 
using curl (because UI only lets user select from existing tags):
{code}
{
"entityFilters":null,
"tagFilters":null,
"attributes":null,
"query":null,
"excludeDeletedEntities":true,
"limit":25,
"typeName":"kafka_topic",
"classification":"non_existing_tag"
}
{code}

GET Basic search request with classification parameter also lists all the 
kakfa_topic entities:
{code}
http://localhost:21000/api/atlas/v2/search/basic?typeName=kafka_topic=non_existing_tag=50
{code}

Expected 40X Response code saying that tag doesn't exist. But the response 
listed all the kafka_topic entities. This gives an delusion that all returned 
kafka_topic entities are tagged with 'non_existing_tag'



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Review Request 61191: [ATLAS-1999]: Use AtlasRelatedObjectId to display relationshipAttribute values during entity retrieval

2017-08-08 Thread Sarath Subramanian

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

(Updated Aug. 7, 2017, 11:15 p.m.)


Review request for atlas, David Radley and Madhan Neethiraj.


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


Repository: atlas


Description
---

* Currently relationship attributes uses AtlasObjectId format during entity 
retrieval. Change this to use AtlasRelatedObjectId to contain additional 
information for use in search and UI
* validate and normalize relationship attribute values supplied during entity 
creation


Diffs (updated)
-

  intg/src/main/java/org/apache/atlas/model/instance/AtlasRelatedObjectId.java 
PRE-CREATION 
  intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java f89c5568 
  repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 
c47a89e6 
  
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java
 49e08a07 
  
repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java
 31fc8377 
  
repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1Test.java
 77a591a9 


Diff: https://reviews.apache.org/r/61191/diff/5/

Changes: https://reviews.apache.org/r/61191/diff/4-5/


Testing
---

* tested using POSTMAN rest client - valid relationship attribute values in 
AtlasRelatedObjectId format is retrieved
* mvn clean package - succeeded


Thanks,

Sarath Subramanian