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

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


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


Repository: atlas


Description
-------

This patch handles decoding of encoded query string for DSL search.

Use case:-

DSL query :

/api/atlas/v2/search/dsl?typeName=hive_table&query=name="weather2"
fired on PASSIVE server redirects to ACTIVE server as

/api/atlas/v2/search/dsl?limit=25&offset=0&query=name=%2522weather2%2522&typeName=hive_table
fails with

{
errorCode: "ATLAS-400-00-059",
errorMessage: "Invalid DSL query: `hive_table` name=%22weather2%22 | Reason: 
DSL Semantic Error - weather2 type not found, DSL Semantic Error - weather2 
type not found, DSL Semantic Error - 22 type not found, DSL Semantic Error - 22 
type not found. Please refer to Atlas DSL grammar for more information"
}


Diffs
-----

  webapp/src/main/java/org/apache/atlas/examples/QuickStartV2.java 0ca0ba748 
  webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java ad3785935 
  webapp/src/main/java/org/apache/atlas/web/util/Servlets.java ec340cfee 


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


Testing
-------

Tested by accessing URL 
/api/atlas/v2/search/dsl?typeName=Table&query=name="sales_fact" on passive 
which redirects on active node now working properly.

And also on Active node.

Added few encode queryparam in ITs

Integration testcase working
https://builds.apache.org/job/PreCommit-ATLAS-Build-Test/388/console

2018-05-11 10:39:16,828  
2018-05-11T10:39:16.566Z|admin|127.0.0.1|GET|http://localhost:31000/api/atlas/v2/search/dsl?offset=0&query=DB+where+name%3D%22Reporting%22&limit=10|200|262
2018-05-11 10:39:17,089  
2018-05-11T10:39:16.832Z|admin|127.0.0.1|GET|http://localhost:31000/api/atlas/v2/search/dsl?offset=0&query=DB+where+name%3D%22encode_db_name%22&limit=10|200|257
2018-05-11 10:39:17,351  
2018-05-11T10:39:17.093Z|admin|127.0.0.1|GET|http://localhost:31000/api/atlas/v2/search/dsl?offset=0&query=Table+where+name%3D%2522sales_fact%2522&limit=10|200|258


Thanks,

Nixon Rodrigues

Reply via email to