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

Review request for ranger.


Bugs: RANGER-3500
    https://issues.apache.org/jira/browse/RANGER-3500


Repository: ranger


Description
-------

modify the getServicePolicies() method to support sorting by field and 
sortType(i.e. asc or desc). The changes are as following:
1. Add sortBy and sortType to searchFilter
2. Support sorting by sortType("desc" means in decreasing order, otherwise in 
increasing order)
3. Delete a redundant line of code


Diffs
-----

  
agents-common/src/main/java/org/apache/ranger/plugin/store/AbstractPredicateUtil.java
 38d6b03ea 
  security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
f13cef71d 


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


Testing
-------

1. compile and package the code
2. deploy ranger
3. generate hdfs policies and get the hdfs policyList via postman using url 
like 
"http://192.168.0.12:6080/service/plugins/policies/service/2?sortBy=policyName&sortType=desc&serviceName=default-Hdfs";
4. the return policyList is sorted according our specified sortBy and sortType


Thanks,

Xuze Yang

Reply via email to