zoukankan      html  css  js  c++  java
  • Flume参数小结

    名词解释:

    1、netcat:通过网络端口获取数据,source的实现类

    2、logger:将数据显示到控制台,sink的实现类

    3、memory: ,channel的实现类

    4、capacity:是指channel的最大容量

    5、spooldir:本地文件目录(文件夹)用来读取数据(文件)

    6、file Header:存取采集数据所在文件的绝对路径,默认为true

    7、event:将数据反序列化生成的对象,有两个属性,分别是header 和 body

    8、fileSuffix:更改文件后缀名

    9、flume在采集数据的时候,会将数据封装成一个event对象,event对象的里面有:header:Map[String,String]属性,还有一个body(数据的本身):byte[ ]属性;

    10,kafkaSink:将数据存储到Kafka集群中

    11、filePrefix:文件的前缀名

    12、exec :执行,exec source 是指命令行的source,可以执行Unix命令

    # Name the components on this agent
    a1.sources = r1
    a1.sinks = k1
    a1.channels = c1
    
    # 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 = logger
    
    # Use a channel which buffers events in memory
    a1.channels.c1.type = memory
    a1.channels.c1.capacity = 1000
    a1.channels.c1.transactionCapacity = 100
    
    # Bind the source and sink to the channel
    a1.sources.r1.channels = c1
    a1.sinks.k1.channel = c1
    

      

  • 相关阅读:
    Mathematics:GCD & LCM Inverse(POJ 2429)
    MST:Out of Hay(POJ 2395)
    DP:Cow Exhibition(POJ 2184)(二维问题转01背包)
    《程序员修炼之道——从小工到专家》阅读笔记*part1
    Java课05
    Java课04
    Javaweb课堂测试
    Java课03
    Java课02
    回文判断
  • 原文地址:https://www.cnblogs.com/beiyi888/p/9859131.html
Copyright © 2011-2022 走看看