Flume的基本使用
来源:互联网 发布:java 开源网盘 编辑:程序博客网 时间:2024/06/05 19:33
一,Flume收集端的使用说明
1,conf文件的配置说明:
#a1为代理名称a1.sources = tailsource-1 #源码的名称为 tailsource-1a1.sinks = remotesink a1.channels = memoryChnanel-1 #sources 从Client收集数据,传递给Channel。a1.sources.tailsource-1.type = spooldir #收集数据的类型a1.sources.tailsource-1.spoolDir = /opt/flume/wc #收集的目录a1.sources.tailsource-1.channels = memoryChnanel-1 a1.sources.tailsource-1.inputCharset = GBK #收集的数据的字符集# Sinks从Channel收集数据,运行在一个独立线程。a1.sinks.k1.type = loggera1.sinks.remotesink.type = avroa1.sinks.remotesink.hostname = flume-01-dev a1.sinks.remotesink.port = 800 #与发送端响应的端口号# Channel连接 sources 和 sinks ,这个有点像一个队列。a1.channels.memoryChnanel-1.type = memorya1.channels.memoryChnanel-1.keep-alive = 10a1.channels.memoryChnanel-1.capacity = 100000a1.channels.memoryChnanel-1.transactionCapacity = 100000# Bind the source and sink to the channela1.sinks.remotesink.channel = memoryChnanel-1a1.sources.tailsource-1.channel = memoryChnanel-12,注意配置的后面不能有注析的信息(上面是做个样例,用的话把其删掉)
3,运行的命令如下:
/usr/local/flume/bin/flume-ng agent --conf conf --conf-file /usr/local/flume/conf/tt_s.conf --name a1 -Dflume.root.logger=INFO,console &
注意:a1是其代理名称注意
二,Flume发送端的使用说明
1,conf文件的配置说明:
#a1为代理名称a1.sources =s1 #源码的名称为 s1a1.sinks = k1a1.channels = c1# Describe/configure the sourcea1.sources.s1.type = avroa1.sources.s1.bind = flume-01-deva1.sources.s1.port = 800 #与收集端响应的端口号a1.sources.s1.inputCharset = GBK #收集的数据的字符集# Describe the sink# 把数据推到kafkaa1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSinka1.sinks.k1.topic = wc #kafka的一个主题名称a1.sinks.k1.brokerList = kafka-01-dev:9092,kafka-02-dev:9092 #主机名和端口号a1.sinks.k1.requiredAcks = 1a1.sinks.k1.batchSize = 100# Use a channel which buffers events in memorya1.channels.c1.type = memorya1.channels.c1.capacity = 200a1.channels.c1.transactionCapacity = 200# Bind the source and sink to the channela1.sources.s1.channels = c1a1.sinks.k1.channel = c1
2,注意配置的后面不能有注析的信息(上面是做个样例,用的话把其删掉)
3,运行的命令如下:
/usr/local/flume/bin/flume-ng agent --conf conf --conf-file /usr/local/flume/conf/tt_s.conf --name a1 -Dflume.root.logger=INFO,console &
注意:a1是其代理名称注意
阅读全文
0 0
- Flume的基本使用
- Flume的基本使用介绍
- flume的概念和基本使用
- Flume基本使用
- FLUME介绍 基本使用 常见问题
- Flume 的使用案例
- flume的简单使用
- flume的使用
- Flume Interceptors的使用
- Flume Interceptors的使用
- flume学习:Flume Interceptors的使用
- flume的原理和使用
- flume的原理和使用
- flume的原理和使用
- flume-ng的简单使用
- flume的安装与使用
- flume的安装与使用
- flume的安装和使用
- java实现倒计时器-图形界面
- Qt信号槽机制初探
- 排序
- Android---Tablayout+ViewPager
- IntelliJ IDEA快捷键(常用)
- Flume的基本使用
- imx6平台Android源码笔记——Camera系统架构
- java多线程【Semaphore】
- Java 简介
- es 调优
- JAVA Web过滤器学习
- PHP实现页面静态化——全部纯静态化
- city-deeplab
- C++调试帮助之assert和NDEBUG