How to add a coarse URI check for Hive agent

Hive command performance deteriorates when the Hive URL location specified has a large number of folders and files. Performance suffers while the recursive check for permission occurs on all folders and files. One way to improve performance is to enable a Hive URL policy. Another way is to configure a coarse URI check that checks the parent folder permission only for authorization.

You can set the Hive agent authorization check at the parent folder level using a safety valve configuration in Cloudera Manager.

To avoid a URL recursive permission check, create the following configuration:
  1. Go to CM > Hive > Configuration > Hive Service Advanced Configuration Snippet (Safety Valve) for ranger-hive-security.xml.,
  2. Click + to add a new configuration.
    1. In Name, type xasecure.hive.uri.permission.coarse.check.
    2. In Value, type true.
  3. Click Save Changes.
  4. Restart the Hive service.