----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/72517/#review220842 -----------------------------------------------------------
security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java Lines 4714 (patched) <https://reviews.apache.org/r/72517/#comment309559> Does this mean that serviceName was specified in the searchFilter but there is no service with that name? If so, no policies are found which match search criterion. Then it should skip the block starting at line 4718 entirely, and resume at line 4735. Also, please consider printing error message and the exception in full in the catch block. security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java Line 4724 (original), 4749 (patched) <https://reviews.apache.org/r/72517/#comment309560> If processedServicesForGroup variable is not used outside the block starting at line 4736, please consider moving it inside this block. security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java Line 2148 (original), 2148 (patched) <https://reviews.apache.org/r/72517/#comment309561> Please consider removing the commented out lines. - Abhay Kulkarni On May 21, 2020, 12:38 a.m., Ramesh Mani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/72517/ > ----------------------------------------------------------- > > (Updated May 21, 2020, 12:38 a.m.) > > > Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, > Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Selvamohan Neethiraj, > Sailaja Polavarapu, and Velmurugan Periasamy. > > > Bugs: RANGER-2828 > https://issues.apache.org/jira/browse/RANGER-2828 > > > Repository: ranger > > > Description > ------- > > RANGER-2828:RangerExportPolicy with resource filter fails to fetch policies > > > Diffs > ----- > > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java > ed69761 > security-admin/src/test/java/org/apache/ranger/biz/TestServiceDBStore.java > c219e6c > > > Diff: https://reviews.apache.org/r/72517/diff/3/ > > > Testing > ------- > > Verified in local vm with curl > curl -k -u admin:admin --verbose -X GET > 'http://172.25.34.170:6080/service/plugins/policies/exportJson?serviceName=c349_hive&polResource=SZ_SL&resource:database=SZ_SL&serviceType=hive&resourceMatchScope=self_or_ancestor&resourceMatch=full' > curl -k -u admin:admin --verbose -X GET > 'http://172.25.34.170:6080/service/plugins/policies/exportJson?serviceName=c349_hive&polResource=SZ_SL&resource:database=SZ_SL&serviceType=hive&resourceMatchScope=self_or_ancestor' > > > Thanks, > > Ramesh Mani > >
