Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


+
Otis Gospodnetic 2013-06-25, 16:11
+
Bhaskar V. Karambelkar 2013-06-28, 13:26
+
Mahadevappa, Shobha 2013-07-01, 04:56
+
Alexander Alten-Lorenz 2013-06-26, 08:19
+
Otis Gospodnetic 2013-06-27, 23:02
+
Ashish 2013-06-28, 06:11
+
Brock Noland 2013-06-27, 23:47
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
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB