美文网首页
Apache flume安装

Apache flume安装

作者: 薛落花随泪绽放 | 来源:发表于2017-12-22 09:47 被阅读21次

    解压(只在hadoop21上面)

    # tar -zxvf apache-flume-1.8.0-bin.tar.gz
    # rm -rf apache-flume-1.8.0-bin.tar.gz
    # mv apache-flume-1.8.0-bin/ flume
    # cd flume/conf
    # mv flume-env.sh.template flume-env.sh
    # vi flume-env.sh
    export JAVA_HOME=/usr/java/default
    
    #vi /etc/profile
    export FLUME_HOME=/root/training/flume
    
    export PATH=$PATH:$FLUME_HOME/bin
    
    #source /etc/profile
    #cd ..
    #mkdir ~/training/mylogs
    #mkdir myagent
    
    #vi a3.conf
    #bin/flume-ng agent -n a3 -f myagent/a3.conf -c conf -Dflume.root.logger=INFO,console
    #定义agent名,source、sink的名称
    a3.sources = r1
    a3.channels =c1
    a3.sinks = k1
    
    #具体定义source
    a3.sources.r1.type = spooldir
    a3.sources.r1.spoolDir = /root/training/mylogs
    
    #具体定义channel
    a3.channels.c1.type = memory
    a3.channels.c1.capacity = 1000
    a3.channels.c1.transactionCapacity = 100
    
    #具体定义sink
    a3.sinks.k1.type = logger
    
    #组装source、channel、sink
    a3.sources.r1.channels = c1a3.sinks.k1.channel = c1
    a3.sinks.k1.channel = c1
    
    #cd training
    #vi a.txt
    #mv a.txt mylogs/
    

    相关文章

      网友评论

          本文标题:Apache flume安装

          本文链接:https://www.haomeiwen.com/subject/bjctgxtx.html