zoukankan      html  css  js  c++  java
  • flume 1.7在windows下的安装部署与测试运行

    一、安装

    1. 安装java,配置环境变量。
    2. 安装flume,下载地址,下载后直接解压即可。

    二、运行

    1. 创建配置文件:在解压后的文件 apache-flume-1.7.0-binconf下创建一个example.conf,内容如下
     1 # example.conf: A single-node Flume configuration
     2 
     3 # Name the components on this agent
     4 a1.sources = r1
     5 a1.sinks = k1
     6 a1.channels = c1
     7 
     8 # Describe/configure the source
     9 a1.sources.r1.type = netcat
    10 a1.sources.r1.bind = localhost
    11 a1.sources.r1.port = 5555
    12 
    13 # Describe the sink
    14 a1.sinks.k1.type = logger
    15 
    16 # Use a channel which buffers events in memory
    17 a1.channels.c1.type = memory
    18 a1.channels.c1.capacity = 1000
    19 a1.channels.c1.transactionCapacity = 100
    20 
    21 # Bind the source and sink to the channel
    22 a1.sources.r1.channels = c1
    23 a1.sinks.k1.channel = c1

    2.打开cmd进入到apache-flume-1.7.0-binin目录下,运行如下命令。

    flume-ng.cmd  agent -conf ../conf  -conf-file ../conf/example.conf  -name a1  -property flume.root.logger=INFO,console

    运行效果如下图

    3.另外打开一个cmd窗口,运行如下命令。

    telnet localhost 5555

    如果连接成功,则该窗口会变为输入状态,可以输入文字。同时在步骤2中的cmd窗口中,也会显示接收到的信息。 效果图(右键查看原图):

     

  • 相关阅读:
    数据库迁移到Amazon RDS 的问题
    排序算法之希尔排序
    第一个 Shell脚本
    排序算法之直接插入排序
    当前工作参考
    cerr
    阿里云典型应用案例
    云服务引擎ACE
    阿里云SLB
    指针使用注意事项
  • 原文地址:https://www.cnblogs.com/songpingyi/p/7206062.html
Copyright © 2011-2022 走看看