Code Monkey home page Code Monkey logo

flume's Introduction

CISC 525 Apache Flume Project

Running a Flume agent

source spooldir - channel file - sink logger

mkdir /tmp/spooldir

flume-ng agent --conf-file spool-to-logger.properties --name agent1 --conf $FLUME_HOME/conf -Dflume.root.logger=INFO,console

Wait for the agent to get started. Then, run this:

echo "hello, world!" > /tmp/spooldir/file1.txt
echo "hello, USA!" > /tmp/spooldir/file2.txt
echo "hello, Pennsylvania, USA!" > /tmp/spooldir/file3.txt
echo "hello, Harrisburg, PA, USA!" > /tmp/spooldir/file4.txt
echo "hello, Harrisburg University of Science and Technologies, PA, USA!" > /tmp/spooldir/file5.txt

After each run of the above commands, verify the output in the log file.

source exec with tail -F ... - channel memory - sink hdfs

flume-ng agent --conf-file tail-in-memory-hdfs.conf --name agent1 --conf $FLUME_HOME/conf -Dflume.root.logger=INFO,console

Watch the logs file from your own tail -F command:

tail -F /usr/local/hadoop/logs/hadoop-student-namenode-student-VirtualBox.log

When you see output from the above log, you should verify that you see the same text from one of the file under Hadoop stored under /tmp/system.log directory.

Capturing ActiveMQ logs into HDFS

flume-ng agent --conf-file activemq-memory-hdfs.conf --name activemq_agent --conf $FLUME_HOME/conf -Dflume.root.logger=INFO,console

hdfs dfs -ls /tmp/activemq.log | awk '{print $8}' | while read f; do hdfs dfs -cat $f | grep -i hello && echo $f; done

Capturing ActiveMQ logs and forward to the custom sink

flume-ng agent --classpath ../custom_sink/target/custom_sink-jar-with-dependencies.jar --conf-file activemq-memory-custom-sink.conf --name activemq_agent --conf $FLUME_HOME/conf -Dflume.root.logger=DEBUG,console

flume's People

Contributors

drkiettran avatar

Watchers

Claire Bai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.