zoukankan      html  css  js  c++  java
  • Flume实例一学习

    cp conf/flume-env.sh.template conf/flume-env.sh

    打开flume-env.sh,配置Java环境变量

    image

    [root@test1 apache-flume-1.6.0-bin]# vim conf/flume.conf 
    
    # Define a memory channel called ch1 on agent1
    agent1.channels.ch1.type = memory
    
    # Define an Avro source called avro-source1 on agent1 and tell it
    # to bind to 0.0.0.0:41414. Connect it to channel ch1.
    agent1.sources.avro-source1.channels = ch1
    agent1.sources.avro-source1.type = avro
    agent1.sources.avro-source1.bind = 0.0.0.0
    agent1.sources.avro-source1.port = 41414
    
    # Define a logger sink that simply logs all events it receives
    # and connect it to the other end of the same channel.
    agent1.sinks.log-sink1.channel = ch1
    agent1.sinks.log-sink1.type = logger
    
    # Finally, now that we've defined all of our components, tell
    # agent1 which ones we want to activate.
    agent1.channels = ch1
    agent1.sources = avro-source1
    agent1.sinks = log-sink1
    bin/flume-ng avro-client --conf conf -H localhost -p 41414 -F /etc/passwd -Dflume.root.logger=DEBUG,console

    image

    bin/flume-ng avro-client --conf conf -H localhost -p 41414 -F /etc/passwd -Dflume.root.logger=DEBUG,console

    image

    如果出现上面两个图片信息,表示运行成功。

  • 相关阅读:
    贪婪算法、递归计算、动态规划背包问题
    递归、动态规划计算斐波那契数列
    用于确定两个字符串最长公共子串的函数
    快速排序算法
    顺序、二分查找文本数据
    MyBatis面试题
    Spring面试题
    SpringMvc面试题
    jsp和servlet面试
    EJB的理解
  • 原文地址:https://www.cnblogs.com/panliu/p/4748142.html
Copyright © 2011-2022 走看看