• Ubuntu16.04 install apache-flume-1.7.0-bin.tar.gz


    下载  wget http://mirror.bit.edu.cn/apache/flume/1.7.0/apache-flume-1.7.0-bin.tar.gz

    解压  tar zxvf apache-flume-1.7.0-bin.tar.gz

    存放  sudo mv apache-flume-1.7.0-bin.tar.gz /opt/flume

    进入  cd /opt/flume

    执行  bin/flume-ng agent -n agent -c ./conf -f conf/hello-world.properties -Dflume.root.logger=INFO,console

    新开窗口  telnet localhost 12345

    flume退出,进程销毁

    改为后台进程  nohup bin/flume-ng agent -n agent -c ./conf -f conf/hello-world.properties -Dflume.root.logger=INFO,console &

    查看nohup日记  tail -f nohup.out

    销毁进程  kill -9 进程ID

    监听输出  tail -f nohup.out

    http

    bin/flume-ng agent -n agent -c conf -f conf/http.properties -Dflume.root.logger=INFO,console

    curl -X POST -d '[{"headers" :{"name":"lancer","level":"min"},"body":"text"}]' http://localhost:50000

    spooling

    mkdir -p /data/log/flume_spool

    bin/flume-ng agent -n agent -c conf -f conf/spooling.properties -Dflume.root.logger=INFO,console

    cp Ubuntu /data/log/flume_spool/

    cp /data/demo_sql/data_op/order.data /data/log/flume_spool/

    spooling-hdfs

    窗口一:

    bin/flume-ng agent -n agent -c conf -f conf/spooling-hdfs.properties -Dflume.root.logger=INFO,console

    窗口二:

    hdfs dfs -ls /

    hdfs dfs -mkdir /flume

    hdfs dfs -ls /flume/

    hdfs dfs -cat /flume/20171008/log_20171008_21.1507467792328.log

    窗口三:

    cd /data/log/flume_spool

    rm *

    cp Linux  /data/log/flume_spool

  • 相关阅读:
    P2704 [NOI2001]炮兵阵地[状压dp]
    【CRT】中国剩余定理简介
    乘法逆元
    P2921 [USACO08DEC]在农场万圣节[SCC缩点]
    P1967 货车运输[生成树+LCA]
    P2746 P2812 [USACO5.3]校园网Network of Schools[SCC缩点]
    Debian初始化配置
    Linux网桥配置
    Jenkins与Gitlab集成
    Gitlab搭建
  • 原文地址:https://www.cnblogs.com/DowneyJr/p/7636934.html
Copyright © 2020-2023  润新知