flume-ng数据复用案列配置详解

#类型 AVRO spooldir netcat HTTP
a1.sources = sourceMqtt
a1.sinks = sinkMqtt1 sinkMqtt2
a1.channels = channelMqtt1 channelMqtt2

# Describe/configure the source
a1.sources.sourceMqtt.type = com.leapmotor.emqflumesource.MQTTSource
a1.sources.sourceMqtt.selector.type = multiplexing
a1.sources.sourceMqtt.selector.header = biztype
a1.sources.sourceMqtt.selector.mapping.cardata = channelMqtt2
a1.sources.sourceMqtt.selector.default = channelMqtt1

# Describe the sinkMqtt1
#类型 file_roll avro HDFS
a1.sinks.sinkMqtt1.type = hdfs  
#写入hdfs的路径,需要包含文件系统标识
a1.sinks.sinkMqtt1.hdfs.path = hdfs://cluster/clusterfolder/data1/%Y-%m-%d/%H
a1.sinks.sinkMqtt1.hdfs.fileType = DataStream
a1.sinks.sinkMqtt1.hdfs.writeFormat=TEXT
a1.sinks.sinkMqtt1.hdfs.filePrefix = gbt32960Hdfs
a1.sinks.sinkMqtt1.hdfs.batchSize = 1000
a1.sinks.sinkMqtt1.hdfs.rollSize = 0
a1.sinks.sinkMqtt1.hdfs.rollCount = 10
a1.sinks.sinkMqtt1.hdfs.rollInterval = 0
a1.sinks.sinkMqtt1.hdfs.useLocalTimeStamp = true

# Describe the sinkMqtt1
#类型 file_roll avro HDFS
a1.sinks.sinkMqtt2.type = hdfs  
#写入hdfs的路径,需要包含文件系统标识
a1.sinks.sinkMqtt2.hdfs.path = hdfs://cluster/clusterfolder/data2/%Y-%m-%d/%H
a1.sinks.sinkMqtt2.hdfs.fileType = DataStream
a1.sinks.sinkMqtt2.hdfs.writeFormat=TEXT
a1.sinks.sinkMqtt2.hdfs.filePrefix = cardataHdfs
a1.sinks.sinkMqtt2.hdfs.batchSize = 1000
a1.sinks.sinkMqtt2.hdfs.rollSize = 0
a1.sinks.sinkMqtt2.hdfs.rollCount = 10
a1.sinks.sinkMqtt2.hdfs.rollInterval = 0
a1.sinks.sinkMqtt2.hdfs.useLocalTimeStamp = true

# Use a channel which buffers events in memory
a1.channels.channelMqtt1.type = memory
a1.channels.channelMqtt1.capacity = 5000
a1.channels.channelMqtt1.transactionCapacity = 1000

a1.channels.channelMqtt2.type = memory
a1.channels.channelMqtt2.capacity = 5000
a1.channels.channelMqtt2.transactionCapacity = 1000

# Bind the source and sink to the channel
a1.sources.sourceMqtt.channels = channelMqtt1 channelMqtt2
a1.sinks.sinkMqtt1.channel = channelMqtt1
a1.sinks.sinkMqtt2.channel = channelMqtt2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值