mneethiraj commented on code in PR #1152:
URL: https://github.com/apache/ranger/pull/1152#discussion_r3819057209


##########
security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java:
##########
@@ -4245,6 +4250,28 @@ private static List<RangerPolicyDelta> 
compressDeltas(List<RangerPolicyDelta> de
         return ret;
     }
 
+    private Set<String> getPasswordConfigKeys(String serviceType) {
+        List<XXServiceConfigDef> svcConfDefList = serviceType != null ? 
daoMgr.getXXServiceConfigDef().findByServiceDefName(serviceType) : null;

Review Comment:
   It will be efficient to retrieve only config names from the database with 
filter `type = password` (instead of all XXServiceConfigDef entries).
   
   ```
   public class XXServiceConfigDefDao ... {
     ...
     public List<String> getConfigNamesByType(String serviceType, String 
configType) {
       return getEntityManager()
               .createNamedQuery("XXServiceConfigDef.getConfigNamesByType", 
String.class)
               .setParameter("serviceType", serviceType)
               .setParameter("type", configType).getResultList();
       }
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to