zoukankan      html  css  js  c++  java
  • Flume 1.7.0单机版安装

    下载解压到/usr/local/flume


    配置环境变量

    export FLUME_HOME=/usr/local/flume
    export FLUME_CONF_DIR=$FLUME_HOME/conf
    export PATH=.:$PATH::$FLUME_HOME/bin

    在conf里配置flume-env.sh  添加jdk路径

    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64


    flume-ng version

    验证是否安装成功

    root@kali:~# flume-ng version
    Flume 1.7.0
    Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
    Revision: 511d868555dd4d16e6ce4fedc72c2d1454546707
    Compiled by bessbd on Wed Oct 12 20:51:10 CEST 2016
    From source with checksum 0d21b3ffdc55a07e1d08875872c00523
    View Code

    ps:如果报这错java.lang.ClassNotFoundException: org.apache.flume.tools.GetJavaProperty

    就将hbase的hbase.env.sh的一行配置注释掉

    #export HBASE_CLASSPATH=/xxx

    在conf里创建single-node.conf
    # example.conf: A single-node Flume configuration
    
    # 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
    View Code

    运行

    bin/flume-ng agent --conf conf --conf-file conf/single-node.conf --name a1 -Dflume.root.logger=INFO,console

    另外打开一个终端

    telnet 127.0.0.1 44444
    Trying 127.0.0.1...
    Connected to 127.0.0.1.
    Escape character is '^]'.
    View Code

    然后在这边随便输入内容,再去原来的终端观察

     
     
     
     
  • 相关阅读:
    C++模板编译模型
    C++继承与构造函数、复制控制
    PHP判断用户是手机端?还是浏览器端访问?
    CentOS6.5搭建LNMP
    星级评分--封装成jquery插件
    扩展thinkphp5的redis类方法
    js实现星级评分之方法一
    js原型与继承
    一个基于Tp3.2(thinkphp3.2)的工会管理系统
    实验楼的php比赛题,网页数据提取。
  • 原文地址:https://www.cnblogs.com/tk55/p/6528019.html
Copyright © 2011-2022 走看看