flume kafka 配置指南
1、官方网站也有配置:
https://flume.apache.org/FlumeUserGuide.html#kafka-source
2、clodera 官方配置
https://www.cloudera.com/documentation/kafka/2-0-x/topics/kafka_flume.html
1\
tier1.sources = source1
tier1.channels = channel1
tier1.sinks = sink1 tier1.sources.source1.type = org.apache.flume.source.kafka.KafkaSource
tier1.sources.source1.zookeeperConnect = zk01.example.com:
tier1.sources.source1.topic = weblogs
tier1.sources.source1.groupId = flume
tier1.sources.source1.channels = channel1
tier1.sources.source1.interceptors = i1
tier1.sources.source1.interceptors.i1.type = timestamp
tier1.sources.source1.kafka.consumer.timeout.ms = tier1.channels.channel1.type = memory
tier1.channels.channel1.capacity =
tier1.channels.channel1.transactionCapacity = tier1.sinks.sink1.type = hdfs
tier1.sinks.sink1.hdfs.path = /tmp/kafka/%{topic}/%y-%m-%d
tier1.sinks.sink1.hdfs.rollInterval =
tier1.sinks.sink1.hdfs.rollSize =
tier1.sinks.sink1.hdfs.rollCount =
tier1.sinks.sink1.hdfs.fileType = DataStream
tier1.sinks.sink1.channel = channel1
2\
tier1.sources = source1
tier1.channels = channel1
tier1.sinks = sink1 tier1.sources.source1.type = exec
tier1.sources.source1.command = /usr/bin/vmstat
tier1.sources.source1.channels = channel1 tier1.channels.channel1.type = memory
tier1.channels.channel1.capacity =
tier1.channels.channel1.transactionCapacity = tier1.sinks.sink1.type = org.apache.flume.sink.kafka.KafkaSink
tier1.sinks.sink1.topic = sink1
tier1.sinks.sink1.brokerList = kafka01.example.com:,kafka02.example.com:
tier1.sinks.sink1.channel = channel1
tier1.sinks.sink1.batchSize =
3\
tier1.sources = source1
tier1.channels = channel1
tier1.sinks = sink1 tier1.sources.source1.type = exec
tier1.sources.source1.command = /usr/bin/vmstat
tier1.sources.source1.channels = channel1 tier1.channels.channel1.type = org.apache.flume.channel.kafka.KafkaChannel
tier1.channels.channel1.capacity =
tier1.channels.channel1.transactionCapacity =
tier1.channels.channel1.brokerList = kafka02.example.com:,kafka03.example.com:
tier1.channels.channel1.topic = channel2
tier1.channels.channel1.zookeeperConnect = zk01.example.com:
tier1.channels.channel1.parseAsFlumeEvent = true tier1.sinks.sink1.type = hdfs
tier1.sinks.sink1.hdfs.path = /tmp/kafka/channel
tier1.sinks.sink1.hdfs.rollInterval =
tier1.sinks.sink1.hdfs.rollSize =
tier1.sinks.sink1.hdfs.rollCount =
tier1.sinks.sink1.hdfs.fileType = DataStream
tier1.sinks.sink1.channel = channel1
总结:
这样配置以后我们可以通过监控,或者消费kafka console打印效果
/bin/kafka-console-consumer.sh --bootstrap-server master:9092 --topic topicTest2 --from-beginning
flume kafka 配置指南的更多相关文章
- Scala + Thrift+ Zookeeper+Flume+Kafka配置笔记
1. 开发环境 1.1. 软件包下载 1.1.1. JDK下载地址 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downl ...
- Flume - Kafka日志平台整合
1. Flume介绍 Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集.聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据:同时,Flume提供 ...
- Kafka权威指南——broker的常用配置
前面章节中的例子,用来作为单个节点的服务器示例是足够的,但是如果想要把它应用到生产环境,就远远不够了.在Kafka中有很多参数可以控制它的运行和工作.大部分的选项都可以忽略直接使用默认值就好,遇到一些 ...
- 【转】flume+kafka+zookeeper 日志收集平台的搭建
from:https://my.oschina.net/jastme/blog/600573 flume+kafka+zookeeper 日志收集平台的搭建 收藏 jastme 发表于 10个月前 阅 ...
- hadoop 之 kafka 安装与 flume -> kafka 整合
62-kafka 安装 : flume 整合 kafka 一.kafka 安装 1.下载 http://kafka.apache.org/downloads.html 2. 解压 tar -zxvf ...
- Flume+Kafka+Strom基于伪分布式环境的结合使用
目录: 一.Flume.Kafka.Storm是什么,如何安装? 二.Flume.Kafka.Storm如何结合使用? 1) 原理是什么? 2) Flume和Kafka的整合 3) Kafka和St ...
- 【Flume NG用户指南】(1)设置
作者:周邦涛(Timen) Email:zhoubangtao@gmail.com 转载请注明出处: http://blog.csdn.net/zhoubangtao/article/details ...
- 【Flume NG用户指南】(2)构造
作者:周邦涛(Timen) Email:zhoubangtao@gmail.com 转载请注明出处: http://blog.csdn.net/zhoubangtao/article/details ...
- 最新 Zookeeper + Flume + Kafka 简易整合教程
在大数据领域有很多耳熟能详的框架,今天要介绍的就是 zookeeper.flume.kafka.因为平时是做数据接入的,所以对这些实时的数据处理系统不是很熟悉.通过官网的简要介绍,搭建了一套简要的平台 ...
随机推荐
- WPF Storyboard 动画播放完毕时触发的事件
/*故事版*/ Storyboard ClSto2; public PopUpWindow() { /*播放完毕,将当前窗体关闭*/ ClSto2.Completed += (s, e) => ...
- HPUX and AIX SSH 互信
HPUX side: su - orasid check file AIX side: su - sidadm double check
- 学习笔记:vue(代码篇)
http://cn.vuejs.org/ VUE官网 http://cn.vuejs.org/v2/guide/ 教程 VUE模板文件: <html lang="zh-cn" ...
- Hive 优化汇总
参考: http://www.cnblogs.com/yshb/p/3147710.html http://www.cnblogs.com/sandbank/p/6408762.html 一 jo ...
- layui动态options
layui 坑 layui 针对各种表单元素做了较为全面的UI支持,你无需去书写那些 UI 结构,你只需要写 HTML 原始的 input.select.textarea 这些基本的标签即可.我们在 ...
- PHP Composer 包管理器的安装和使用
一,包管理器的安装 01,首先确定 php 命令能够全局使用,要是不能请修改环境变量 02,使用 curl 命令安装 => curl -sS http://install.phpcomposer ...
- react-native ios打包 、设置图标 启动图片
在这里只记录xcode 打包操作,申请证书操作,之前已经记录过了. https://www.cnblogs.com/hellovoidworld/p/4127576.html 参考了这篇文章,只是可 ...
- FDQuery多表更新生成sql语句的问题
query.sql='select a,b,c,d,e from a,b,c where ....'; 来源3个表, 设计时添加字段列表,每个字段有Origin属性 分别是a.a,b.b,c.c格式 ...
- Dubbo的优化 --- 开发时使用
开发时的三个优化: 1.开发者在本地开发的时候启动Dubbo比较麻烦,所以采用直接连接的配置: 2.开发者本地开发时会打断点调试,会超过Dubbo默认的超时时间1s,所以需要全局设置超时时间: 3.开 ...
- 【坑】tableView cell默认选中
在tableView展示的过程时候,如果想一开始就有一些cell默认被选中,不能在cellForRowAtIndexPath中cell.selected=YES, 必须在willDisplayCell ...