Command Line Installation
Also available as:
loading table of contents...

Install and Enable Ranger Kafka Plug-in

  1. Extract your build at the appropriate place.

    Copy ranger-<version>-SNAPSHOT-kafka-plugin.tar.gz to Active_Resourcemanager host in directory /usr/hdp/<hdp-version>/.

  2. Change directory to /usr/hdp/<hdp-version>.

  3. Untar ranger-<version>-SNAPSHOT-SNAPSHOT-kafka-plugin.tar.gz.

  4. Change directories to ranger-<version>-SNAPSHOT-kafka-plugin.

  5. Edit the file.

    Enter the appropriate values for each of the following properties:

    Table 5.20. Property Values


    Additionally, for the Audit info, Solr/HDFS options are available.

  6. Enable the Kafka plug-in:

    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64

    In the HA environment, the Knox plug-in must be enabled on all Knox instances.

  7. Stop and start the Kafka gateway:

    su kafka -c "/usr/hdp/current/kafka-broker/bin/kafka stop"
    su kafka -c "/usr/hdp/current/kafka-broker/bin/kafka start"
  8. Create the default repo for Kafka with proper configuration.

    In the custom repo configuration, add the component user kafka for each of the following properties:

    • policy.grantrevoke.auth.users or


  9. Use the Audit->plugins tab to verify that the Kafka plug-in is communicating with Ranger admin.


    If the Kafka plugin is unable to communicate with Ranger admin, check that the property in file /usr/hdp/<hdp-version>/kafka/config/, is set to org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer .