其他分享
首页 > 其他分享> > |NO.Z.00011|——————————|BigDataEnd|——|Hadoop&PB级数仓.V03|---------------------------------------|PB数仓.v

|NO.Z.00011|——————————|BigDataEnd|——|Hadoop&PB级数仓.V03|---------------------------------------|PB数仓.v

作者:互联网



[BigDataHadoop:Hadoop&PB级数仓.V03]                                      [BigDataHadoop.PB级企业电商离线数仓][|章节二|Hadoop|会员活跃度分析:日志数据采集&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数量)才不会受影响








===============================END===============================


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



来自为知笔记(Wiz)

标签:---------------------------------------,a1,sinks,v03,hdfs,PB,k1,sink
来源: https://www.cnblogs.com/yanqivip/p/16125754.html