zoukankan      html  css  js  c++  java
  • Flume Avor Source

    1.cd /usr/local2/flume/conf

    sudo vim avro.conf:

    1. a1.sources = r1
    2. a1.sinks = k1
    3. a1.channels = c1
    4.  
    5. # Describe/configure the source
    6. a1.sources.r1.type = avro
    7. a1.sources.r1.channels = c1
    8. a1.sources.r1.bind = 0.0.0.0
    9. a1.sources.r1.port = 5252
    10. # Describe the sink
    11. a1.sinks.k1.type = logger
    12.  
    13. # Use a channel which buffers events in memory
    14. a1.channels.c1.type = memory
    15. a1.channels.c1.capacity = 1000
    16. a1.channels.c1.transactionCapacity = 100
    17.  
    18. # Bind the source and sink to the channel
    19. a1.sources.r1.channels = c1
    20. a1.sinks.k1.channel = c1
    21. shell:  cd/usr/local2/flume/bin
      ./flume-ng agent -c . -f /usr/local/flume/conf/avro.conf -n a1 -Dflume.root.logger=INFO,console #启动日志控制台        

    保留这个shell

    测试文件:

    cd /usr/local2/flume

    vim soyo.txt

    再开一个shell:./flume-ng avro-client --conf conf -H localhost -p 5252 -F /usr/local/flume/soyo.txt

    即可看见soyo.txt的内容

     

  • 相关阅读:
    N^N hdu1060
    二叉树的所有操作
    溢出问题
    POJ1562深搜问题
    已知前序,中序,求后序
    交换a,b
    深度和广度优先搜索
    最长回文子串
    scanf
    WCF Ria Service 理解
  • 原文地址:https://www.cnblogs.com/soyo/p/7686774.html
Copyright © 2011-2022 走看看