zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    利用百度搜集子域名--爬虫技巧
    IoC模式
    SpringMVC @RequestBody接收Json对象字符串
    用eclipse创建动态web项目手动生成web.xml方法
    1.Java Spring MVC入门 安装
    获取所有注解
    带参数的方法获取注解
    利用反射调用注解
    java枚举类型
    java创建多线程
  • 原文地址:https://www.cnblogs.com/qq27271609/p/6864169.html
Copyright © 2011-2022 走看看