> On May 11, 2018, 1:54 p.m., Madhan Neethiraj wrote: > > webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java > > Lines 116 (patched) > > <https://reviews.apache.org/r/67085/diff/1/?file=2019898#file2019898line116> > > > > In ATLAS-2310, use of URLDecoder.decode() was replaced wito use > > UriUtils.encodeQuery() in ActiveServerFilter. Please review this patch > > https://reviews.apache.org/r/64538/.
In ATLAS-2310 the special characters in URL querystring were encoded using UriUtils.encodeQuery(), now in ATLAS-2673 this encoded queryString need to be decoded when it is read in DSL API. This patch handles this fix. - Nixon ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67085/#review202937 ----------------------------------------------------------- On May 11, 2018, 11 a.m., Nixon Rodrigues wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67085/ > ----------------------------------------------------------- > > (Updated May 11, 2018, 11 a.m.) > > > 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 > >