Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Flume >> mail # user >> Using Flume *only* for tailing?


Copy link to this message
-
Re: Using Flume *only* for tailing?
Otis,

I have not implemented this yet but check out the Apache Commons IO Library.

It has a set of classes that supports tailing files that could accomplish
what you are trying to do.

http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/Tailer.html
http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/TailerListener.html
http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/TailerListenerAdapter.html

Here is how you can bring the maven dependency into your project:

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
On 25 June 2013 12:11, Otis Gospodnetic <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I'm wondering if Flume (its ExecSource?) can be used separately from
> the rest of Flume?
>
> Specifically, I need to tail a log file from a Java app and then do
> something with each new line.  I just want my Java app to get each new
> line from tailing and process it in some custom way.  In other words,
> I don't really need Flume to be involved in anything beyond tailing
> files.
>
> Is that doable?
>
> Thanks,
> Otis
> --
> Solr & ElasticSearch Support -- http://sematext.com/
> Performance Monitoring -- http://sematext.com/spm
>