How to pass JVM options to Ranger services

You can pass JVM options to Ranger, service-wide or to a specific Ranger role.

Adding key/value pairs to the Ranger Service Environment Advanced Configuration Snippet (Safety Valve) applies the values across all roles in the Ranger service except client configurations. To pass JVM Options to a specific role level, search and edit the following configurations:
Ranger Admin Environment Advanced Configuration Snippet
applies configurations to the Ranger Admin Default Group role only
Ranger Tagsync Environment Advanced Configuration Snippet
applies configurations to the Ranger Tagsync Default Group role only
Ranger Usersync Environment Advanced Configuration Snippet
applies configurations to the Ranger Usersync Default Group role only
  1. In Cloudera Manager Home, select Ranger, then choose Configuration.
  2. On Configuration, in Search, type Ranger Service Environment Advanced Configuration Snippet.
  3. In RANGER_service_env_safety_valve, click + (Add).
  4. Add a key-value pair that configures a JVM option for Ranger.
    Key
    JAVA_OPTS
    Value

    -XX:ErrorFile=file.log

    You can pass multiple JVM Options, each separated by a space, in the Value field. -XX:MetaspaceSize=100m -XX:MaxMetaspaceSize=200m represent default JVM options passed to the Ranger service.

  5. Click Save Changes.
    After saving changes, the Stale Configuration icon appears on the Cloudera Manager UI. Optionally, click Stale Configuration to view details.
    Stale Configs after passing JVM options - Restart Ranger
  6. Select Actions > Restart.