|NO.Z.00011|——————————|BigDataEnd|——|Hadoop&PB级数仓.V03|——|PB数仓.v03|会员活跃度分析|hdfs sink|

一、日志采集配置:hdfs sink配置
### --- 日志采集配置:hdfs sink配置

a1.sinks.k1.type = hdfs
a1.sinks.k1.hdfs.path = /user/data/logs/start/%Y-%m-%d/
a1.sinks.k1.hdfs.filePrefix = startlog.
a1.sinks.k1.hdfs.fileType = DataStream
~~~     # 配置文件滚动方式(文件大小32M)

a1.sinks.k1.hdfs.rollSize = 33554432
a1.sinks.k1.hdfs.rollCount = 0
a1.sinks.k1.hdfs.rollInterval = 0
a1.sinks.k1.hdfs.idleTimeout = 0
a1.sinks.k1.hdfs.minBlockReplicas = 1
~~~     # 向hdfs上刷新的event的个数
a1.sinks.k1.hdfs.batchSize = 100

~~~     # 使用本地时间
a1.sinks.k1.hdfs.useLocalTimeStamp = true
### --- HDFS Sink 都会采用滚动生成文件的方式,滚动生成文件的策略有:

~~~     基于时间。hdfs.rollInterval 30秒
~~~     基于文件大小。hdfs.rollSize 1024字节
~~~     基于event数量。hdfs.rollCount 10个event
~~~     基于文件空闲时间。hdfs.idleTimeout 0
~~~     0,禁用
~~~     minBlockReplicas。默认值与 hdfs 副本数一致。
~~~     设为1是为了让 Flume 感知不到hdfs的块复制,
~~~     此时其他的滚动方式配置(时间间隔、文件大小、events数量)才不会受影响

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(19)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示