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




repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
Lines 61 (patched)
<https://reviews.apache.org/r/61502/#comment258393>

    I am not sure Apoorv is quite right. The code seems to be saying if there 
is a supplied type then it needs to exist. If there is a supplied 
classification it needs to exist. Is it valid to not supply a classification 
type or an entity type? Should we test for this as an error case?   
    
    I also suggest we do not put text as a message insert . The text should be 
in the message template and have unique message numbers. Ideally the message 
should put out the search request that is being issued - so the user has the 
context of what type is missing / invalid.


- David Radley


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
> 
>

Reply via email to