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. python之格式化输出(3种方式)

    python3.6后支持3种格式化输出方式,其中前两种为%-formatting及str.format ,第三种即为 f-string. 1.%-formatting 据传该格式化方法源于C.. &g ...

  2. python-requests模块的讲解和应用

    在WINDOWS上可以通过命令行窗口(运行cmd命令), 利用pip进行自动地安装--------pip install requests 1.向网站发送请求:requests.get(url) 2. ...

  3. 【Selenium-WebDriver自学】Selenium-IDE安装和使用(一)

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

  4. IntelliJ IDEA tomcat 远程Ddbug调试

    在开发过程中 有时候需要idea Ddbug 服务器代码,如下是配置步骤 1.需要测试服务器开通相应端口提供远程调试 2.idea配置 最后  点击Apply  OK idea配置就完成了 3.测试服 ...

  5. 学习笔记: js插件 —— fullPage.js (页面全屏滚动)

    fullPage.js (页面全屏滚动) 必须依赖 jquery-ui.min.js,   233K 14760个星. 以后有时间再看. API挺全 https://github.com/alvaro ...

  6. nohup top & 问题: top: failed tty get

    执行 nohup top & nohup.out 显示 top: failed tty get +++++++++++++++++ top后台执行显示:top: failed tty get ...

  7. node-disconf-client基本配置

    node-disconf-client 需要cppm install node-disconf-client var  disconf  = require (' node-disconf-clien ...

  8. jsp中文乱码

    <%@page pageEncoding="UTF-8"%> <meta http-equiv="Content-Type" content= ...

  9. APPium-Xpath,swipe练习

    写自动化测试,实现 滚动到 口碑最佳 部分,并且打印出所有 口碑最佳 部分的5个应用名称 # coding:utf-8from appium import webdriverimport time d ...

  10. beego注解路由 [自定义方法]

    背景: beego生成的controller里面,默认get请求到由Get()方法处理:post请求由Post()方法处理 etc. 如果想自定义方法来处理请求,改怎么做? 直接拿beego的文档来说 ...