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 配置指南的更多相关文章

  1. Scala + Thrift+ Zookeeper+Flume+Kafka配置笔记

    1. 开发环境 1.1. 软件包下载 1.1.1. JDK下载地址 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downl ...

  2. Flume - Kafka日志平台整合

    1. Flume介绍 Flume是Cloudera提供的一个高可用的,高可靠的,分布式的海量日志采集.聚合和传输的系统,Flume支持在日志系统中定制各类数据发送方,用于收集数据:同时,Flume提供 ...

  3. Kafka权威指南——broker的常用配置

    前面章节中的例子,用来作为单个节点的服务器示例是足够的,但是如果想要把它应用到生产环境,就远远不够了.在Kafka中有很多参数可以控制它的运行和工作.大部分的选项都可以忽略直接使用默认值就好,遇到一些 ...

  4. 【转】flume+kafka+zookeeper 日志收集平台的搭建

    from:https://my.oschina.net/jastme/blog/600573 flume+kafka+zookeeper 日志收集平台的搭建 收藏 jastme 发表于 10个月前 阅 ...

  5. hadoop 之 kafka 安装与 flume -> kafka 整合

    62-kafka 安装 : flume 整合 kafka 一.kafka 安装 1.下载 http://kafka.apache.org/downloads.html 2. 解压 tar -zxvf ...

  6. Flume+Kafka+Strom基于伪分布式环境的结合使用

    目录: 一.Flume.Kafka.Storm是什么,如何安装? 二.Flume.Kafka.Storm如何结合使用? 1) 原理是什么? 2) Flume和Kafka的整合  3) Kafka和St ...

  7. 【Flume NG用户指南】(1)设置

    作者:周邦涛(Timen) Email:zhoubangtao@gmail.com 转载请注明出处:  http://blog.csdn.net/zhoubangtao/article/details ...

  8. 【Flume NG用户指南】(2)构造

    作者:周邦涛(Timen) Email:zhoubangtao@gmail.com 转载请注明出处:  http://blog.csdn.net/zhoubangtao/article/details ...

  9. 最新 Zookeeper + Flume + Kafka 简易整合教程

    在大数据领域有很多耳熟能详的框架,今天要介绍的就是 zookeeper.flume.kafka.因为平时是做数据接入的,所以对这些实时的数据处理系统不是很熟悉.通过官网的简要介绍,搭建了一套简要的平台 ...

随机推荐

  1. Javascript函数心得

    Javascript函数 Javascript函数是由事件驱动的或者当他被调用时执行的可重复使用的代码块.所以说我们光创建了函数不调用是没有啥用的,我们必须得调用它才能执行. 1.什么是函数 (1)函 ...

  2. 【Jmeter自学】JMeter的安装(一)

    ==================================================================================================== ...

  3. 3.Appnium的安装

    Appnium:移动端的自动测试话工具,类似selenium,可利用其驱动手机端去模拟点击.滑动.输入操作. 下载地址:https://github.com/appium/appium-desktop ...

  4. Maven传递依懒

    A依赖B,B依赖C.B是A的直接依赖,C是A的传递依赖. 1.Maven自己调解原则 先定义者优级先原则,谁先定义就用谁的传递依赖. 路径近者优级先原则,直接依赖级别高高于传递依赖. 2.排除依懒 & ...

  5. esxI开启虚拟化

    开启esxi的ssh服务 http://blog.51cto.com/7385147/1891513 6.7通过浏览器登陆开启ssh服务,然后再用Xshell登陆esxi服务器,然后修改内容 开启虚拟 ...

  6. eclipse插件spket安装

    1.

  7. linux配置sphinx

    1. 配置索引 cd /usr/local/sphinx/etc/ cp sphinx.conf.dist sphinx.conf //备份配置文件,防止改错 vim sphinx.conf 配置文件 ...

  8. Windows下MongoDB安装配置

    一.安装 官网下载,一般选择community server版本下载,如果是企业可以选择enterprise版本,个人使用的话community就可以了,附上链接:https://www.mongod ...

  9. AJax知识介绍

    参考:http://www.runoob.com/ajax/ajax-asp-php.html

  10. Delphi 三层TDataSetProvider

    在Delphi想使用三层架构或者使用TClientDataSet控件,一般都需要引用TDataSetProvider控件,现对TDataSetProvider控件的Options属性值做一个简单的分析 ...