flume taildir 同时 读取多个文件夹内不同文件名的文件 配置文件

taildirToKafka.conf

    a1.sources = r1 
    a1.sinks = k1 
    a1.channels = c1 

#Describe the source
    a1.sources.r1.type = org.apache.flume.source.wintaildir.TaildirSource
    a1.sources.r1.positionFile = /var/log/flume/taildir_position.json
    a1.sources.r1.filegroups = f1 f2
    a1.sources.r1.filegroups.f1 =/Log/a/^.*\.log(.*)$
    a1.sources.r1.headers.f1.headerKey1 = value1
        a1.sources.r1.filegroups.f2 =/Log/b/^.*\.log.[0-9](.*)$
    a1.sources.r1.headers.f2.headerKey2 = value2 
    a1.sources.r1.fileHeader = true
    a1.sources.r1.maxBatchCount = 50
    a1.sources.r1.batchSize = 1000

# Describe the sink
    a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink
    a1.sinks.k1.kafka.topic = test
    a1.sinks.k1.kafka.bootstrap.servers = 99.xx.xx.xxx:9092,99.xx.xx.xxx:9092
    a1.sinks.k1.kafka.flumeBatchSize = 1000
    a1.sinks.k1.kafka.producer.max.request.size = 104857600
    a1.sinks.k1.kafka.producer.acks = 1
    a1.sinks.k1.kafka.producer.linger.ms = 1
    a1.sinks.k1.kafka.producer.compression.type = snappy

    # Use a channel which buffers events in memory
        a1.channels.c1.type = memory
        a1.channels.c1.capacity = 100000
        a1.channels.c1.transactionCapacity = 1000
 
    # Bind the source and sink to the channel
        a1.sources.r1.channels = c1
        a1.sinks.k1.channel = c1
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容