• Hadoop实战-Flume之Source multiplexing(十五)


    a1.sources = r1
    a1.sinks = k1 k2
    a1.channels = c1 c2
    
    # Describe/configure the source
    a1.sources.r1.type = netcat
    a1.sources.r1.bind = localhost
    a1.sources.r1.port = 44444
    
    # Describe the sink
    a1.sinks.k1.type =file_roll
    a1.sinks.k1.sink.directory=/home/chenyun/data/flume/file_sinke1
    
    a1.sinks.k2.type =file_roll
    a1.sinks.k2.sink.directory=/home/chenyun/data/flume/file_sinke2
    
    # Use a channel which buffers events in memory
    a1.channels.c1.type = memory
    a1.channels.c1.capacity = 1000
    a1.channels.c1.transactionCapacity = 100
    
    a1.channels.c2.type = memory
    a1.channels.c2.capacity = 1000
    a1.channels.c2.transactionCapacity = 100
    
    # Bind the source and sink to the channel
    a1.sources.r1.channels = c1 c2
    a1.sources.r1.interceptors = i1
    a1.sources.r1.interceptors.i1.type = regex_extractor 
    a1.sources.r1.interceptors.i1.regex = (\w+):(\w+):(\w+)
    a1.sources.r1.interceptors.i1.serializers = s1 s2 s3
    a1.sources.r1.interceptors.i1.serializers.s1.name = one
    a1.sources.r1.interceptors.i1.serializers.s2.name = two
    a1.sources.r1.interceptors.i1.serializers.s3.name = three
    a1.sources.r1.selector.type = multiplexing
    a1.sources.r1.selector.header = one
    a1.sources.r1.selector.mapping.hadoop = c1
    a1.sources.r1.selector.default = c2
    a1.sinks.k1.channel=c1
    a1.sinks.k2.channel = c2
  • 相关阅读:
    最近相对闲点,写个笔记2
    最近相对闲点,写个笔记
    ORACLE 调优
    静态工厂方法与构造函数 创建类 区别
    组合与继承 区别
    Java异常
    abstract class 和 interface 区别
    java中的io系统详解
    Tomcat Apache 区别
    Vmware 下的网络模式配置
  • 原文地址:https://www.cnblogs.com/qq27271609/p/6864169.html
Copyright © 2020-2023  润新知