大数据系列教程_分布式日志收集flume
来源:互联网 发布:时空大数据云平台 编辑:程序博客网 时间:2024/05/16 07:57
10、分布式日志收集flume
./flume-ng agent --conf /home/hadoop/flume140cdh501/conf --conf-file /home/hadoop/flume140cdh501/conf/exec1 --name a1 -Dflume.root.logger=DEBUG,console备注:当hdfs做了HA之后,需要将hadoop的hdfs-site.xml放在flume的conf目录下,hdfs配置为联邦前缀
1、spool配置
agent1表示代理名称
agent1.sources=source1
agent1.sinks=sink1
agent1.channels=channel1
#配置source1
agent1.sources.source1.type=spooldir
agent1.sources.source1.spoolDir=/home/hadoop/flume150cdh512/yth
agent1.sources.source1.channels=channel1
agent1.sources.source1.fileHeader = false
#配置sink1
agent1.sinks.sink1.type=hdfs
agent1.sinks.sink1.hdfs.path=hdfs://hadoopCluster/yth
agent1.sinks.sink1.hdfs.fileType=DataStream
agent1.sinks.sink1.hdfs.writeFormat=TEXT
agent1.sinks.sink1.hdfs.rollInterval=4
agent1.sinks.sink1.channel=channel1
#配置channel1
agent1.channels.channel1.type=file
agent1.channels.channel1.checkpointDir=/home/hadoop/flume150cdh512/yth_tmp123
agent1.channels.channel1.dataDirs=/home/hadoop/flume150cdh512/yth_tmp
1、 exec配置
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.channels = c1
a1.sources.r1.command = tail -F /home/hadoop/flume140cdh501/log.log
#配置sink1
a1.sinks.k1.type=hdfs
a1.sinks.k1.hdfs.path=hdfs://hadoopCluster/exx
a1.sinks.k1.hdfs.fileType=DataStream
a1.sinks.k1.hdfs.writeFormat=TEXT
a1.sinks.k1.hdfs.rollInterval=4
a1.sinks.k1.channel=channel1
a1.sinks.k1.channel=c1
# Use a channel which buffers events in memory
a1.channels.c1.type = file
a1.channels.c1.checkpointDir=/home/hadoop/flume140cdh501/yth_tmp123
a1.channels.c1.dataDirs=/home/hadoop/flume140cdh501/yth_tmp
2、 Kafka配置
3、 a1.sources = r1
4、 a1.sinks = k1
5、 a1.channels = c1
6、 # Describe/configure the source
7、 a1.sources.r1.type = exec
8、 a1.sources.r1.channels = c1
9、 a1.sources.r1.command = tail -F /home/hadoop/flume140cdh501/log.log
10、 #配置sink1
11、
12、
13、
14、 a1.sinks.k1.type = org.apache.flume.plugins.KafkaSink
15、 a1.sinks.k1.metadata.broker.list=node6:9092,node7:9093,node8:9094
16、 a1.sinks.k1.partition.key=0
17、 a1.sinks.k1.partitioner.class=org.apache.flume.plugins.SinglePartition
18、 a1.sinks.k1.serializer.class=kafka.serializer.StringEncoder
19、 a1.sinks.k1.request.required.acks=-1
20、 #a1.sinks.k1.max.message.size=10000
21、 #a1.sinks.k1.producer.type=sync
22、 #a1.sinks.k1.custom.encoding=UTF-8
23、 a1.sinks.k1.custom.topic.name=mytopic
24、
25、
26、
27、 a1.sinks.k1.channel=c1
28、 # Use a channel which buffers events in memory
29、 a1.channels.c1.type = memory
30、 a1.channels.c1.capacity = 1000
- 大数据系列教程_分布式日志收集flume
- [大数据]flume日志收集
- Flume 分布式日志收集
- 【大数据新手上路】“零基础”系列课程--Flume收集网站日志数据到MaxCompute
- 大数据系列教程_分布式消息队列kafka
- 分布式日志收集系统:Flume
- 分布式数据日志收集之Flume的安装和使用
- 分布式日志收集收集系统:Flume(转)
- Flume分布式日志收集收集系统
- 分布式日志收集收集系统:Flume
- 分布式日志收集收集系统:Flume
- 大数据日志收集框架之Flume入门
- 分布式日志收集系统- Cloudera Flume 介绍
- flume分布式日志收集系统操作
- Apache Flume 分布式日志收集系统学习
- Alex 的 Hadoop 菜鸟教程: 第22课 分布式日志收集组件:flume
- Flume, Kafka和NiFi,大数据实时日志数据收集、数据获取技术哪家强?
- 初探Flume—又一个分布式日志收集系统
- MATLAB基本的使用方法归纳(图像,矩阵及函数)
- ios7 设备唯一标志
- Hello CSDN 博客
- 红黑树
- 12-6java面向对象之String类常用方法的总结
- 大数据系列教程_分布式日志收集flume
- Codeforces Round #281 (Div. 2)
- Java 实现导出excel表 POI
- 使用jspSmartUpload组件实现图片的上传
- ASP.NET 之 经典回顾
- 服务器性能优化(二) --- Nginx性能优化
- Android开发 QQ sso登录和分享到QQ好友功能,调用本地QQ客户端
- JNI/NDK开发指南(一)—— JNI开发流程及HelloWorld
- Xcode6.1版本中怎样设置字体大小?