IBM developer:Setting up the Kafka plugin for Ranger
Follow these steps to enable and configure the Kafka plugin for Ranger.
Before you begin
The default policy user (ambari-qa) used for a plug-in should be an existing valid user on the system which is configured for Ranger.
Procedure
- From the Ambari web interface, select the Ranger service and then open the Configs tab. Select the Ranger Plugin tab.

- In the Ranger Plugin section, enable the Kafka Ranger Plugin, and then click Save.
Note
- The Kafka Ranger plugin requires Kerberos. You will see a warning if you try to enable Kafka on an non-Kerberized cluster. For details see the Kafka Plugin section of the Ranger FAQ.
- Topic creation can be authorized via Ranger, but only if the topic is being auto-created by consumers or producers. The recommended policy setup to authorize topic auto-creation for producers or consumers is as follows:
- Create a policy where resource is all topics, i.e. *.
- For producers, create a policy item under this policy which grants both Produce and Configure permissions to the relevant user or user-groups.
- For consumers, create a policy item under this policy which grants both Consume and Configure permissions to the relevant user or user-groups.
Example
- Ensure that the default policy created when the plugin is enabled is enabled and synced.
- Ensure that Kerberos tickets are not expired by using the kinit command as the kafka user.
- Run the following command to create a topic in Kafka. Run the command as the kafka user and from the /usr/iop/current/kafka-broker/ directory:
bin/kafka-topics.sh --create --zookeeper hostname.fyre.ibm.com:2181 --replication-factor 1
--partitions 1 --topic test-topic
- Create files named producer.properties and consumer.properties, each with a single line with the value security.protocol=SASL_PLAINTEXT.
- Run the following command to start the producer. Run the command as the kafka user and from the /usr/iop/current/kafka-broker/ directory:
bin/kafka-console-producer.sh --broker-list <cluster url>:6667 --topic test-topic
--producer.config <path>/producer.properties
- In another window, run the following command to start the consumer. Run the command as the root user and from the /usr/iop/current/kafka-broker/ directory:
bin/kafka-console-consumer.sh --topic test-topic --from-beginning --bootstrap-server <cluster url>:6667
--consumer.config <path>/consumer.properties
- In the producer window, write some test messages and observe that they appear in the consumer window.
- Disable the policy and observe that error messages show up in both windows that they can no longer connect.
- Re-enable the policy and observe that messages can be sent and received properly again.
IBM developer:Setting up the Kafka plugin for Ranger的更多相关文章
- IBM Developer:Java 9 新特性概述
Author: 成富 Date: Dec 28, 2017 Category: IBM-Developer (20) Tags: Java (27) 原文地址:https://www.ibm.com/ ...
- IBM developer:Kafka ACLs
Overview In Apache Kafka, the security feature is supported from version 0.9. When Kerberos is enabl ...
- Installing the Ranger Kafka Plug-in
This section describes how to install and enable the Ranger Kafka plug-in. The Ranger Kafka plug-in ...
- 高并发面试必问:分布式消息系统Kafka简介
转载:https://blog.csdn.net/caisini_vc/article/details/48007297 Kafka是分布式发布-订阅消息系统.它最初由LinkedIn公司开发,之后成 ...
- 【原】无脑操作:Windows下搭建Kafka运行环境
Kafka是一种高吞吐量的分布式发布订阅消息系统 1.优点:① 通过磁盘数据结构提供消息的持久化,这种结构对于即使数以TB的消息存储也能够保持长时间的稳定性能.② 高吞吐量:即使是非常普通的硬件Kaf ...
- Maven------报错:Error resolving version for plugin
配置Maven插件时报错:Error resolving version for plugin 'org.springframeboot.boot:spring-boot-maven-plugin' ...
- kafka之一:Windows上搭建Kafka运行环境
搭建环境 1. 安装JDK 1.1 安装文件:http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-213315 ...
- 微信小程序 报错:Setting data field "xxx" to undefined is invalid
通过网络请求获取的数据,当返回的数据没有xxx(变量名)这个变量时,此时xxx是undefined 若使用setData进行赋值,则会报如下的错误: Setting data field " ...
- [转帖]IBM报告:多国央行考虑发行数字货币 最快5年内问世
IBM报告:多国央行考虑发行数字货币 最快5年内问世 https://news.cnblogs.com/n/646001/ DCEP 中国央行可能是第一家发布 数字货币的央行 DCEP 是基于 UTX ...
随机推荐
- 排错-升级Exchange 2013 CU22后程序名称显示异常
近期在按需更新Exchange 2013 CU22补丁以便解决Microsoft Exchange Server ADV190007 Guidance for "PrivExchange&q ...
- MySQL和SQLyog的配置-安装及遇到的问题
1. 安装MySQL 我先是参考了菜鸟教程上的#Windows 上安装 MySQL #版块的安装教程,不过经历了种种磨难,我最后是按照#此篇博客#安装成功的. 这两篇教程最大的差别是在于下载的版本不同 ...
- c# word文档的操作
参考https://blog.csdn.net/ruby97/article/details/7406806 Word对象模型 (.Net Perspective) 本文主要针对在Visual St ...
- 滚动视差?CSS 不在话下
何为滚动视差 视差滚动(Parallax Scrolling)是指让多层背景以不同的速度移动,形成立体的运动效果,带来非常出色的视觉体验. 作为网页设计的热点趋势,越来越多的网站应用了这项技术. 通常 ...
- MySql开启慢查询日志并使用pt-query-digest 分析
慢查询日志会将查询过程中超出你设置的时间的查询记录下来,以便供开发者进行分析和优化. 1. 开启慢查询 1.1 查看当前设置 mysql> show variables like "% ...
- 3.Flask-SQLAlchemy
(1)安装 pip install flask_sqlalchemy (2)数据库连接 from flask import Flask # 1.导入 from flask_sqlalchemy imp ...
- Devexpress 常用的功能
一 .GridControl的删除操作 private void rILinkEditInfoDel_Click(object sender, EventArgs e) { if (XtraMessa ...
- LindDotNetCore~授权中间件的介绍
回到目录 LindDotNetCore中间件 大叔认识中间件就是主要对http请求进行拦截,然后添加具体个性化功能的逻辑,这种把请求切开,添加新逻辑的方式一般称为面向方面的逻辑AOP! 授权中间件 请 ...
- [翻译]在Windows版或MacOS版的Microsoft Edge上安装一个谷歌浏览器拓展
原文:Install a Chrome Web Store extension on Microsoft Edge for Windows and MacOS 拓展阅读:What to expect ...
- .net 多线程 Thread ThreadPool Task
先准备一个耗时方法 /// <summary>/// 耗时方法/// </summary>/// <param name="name">< ...