zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    arp攻击 (可查看同一局域网他人手机照片)
    SQL注入(转载)
    常见文件文件头文件尾格式总结及各类文件头
    CTF
    Base64,Base32,Base16进制的区别
    Maven学习总结(二):安装
    Maven学习总结(一):基本概念
    Myeclipse下集成SVN插件
    Windows下多个JDK版本之间的切换
    java线程的常用方法
  • 原文地址:https://www.cnblogs.com/DowneyJr/p/7636934.html
Copyright © 2011-2022 走看看