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
Chukwa >> mail # dev >> agent: doubt about sleeping condition in FileTailer.java


+
Luangsay Sourygna 2012-12-14, 20:16
Copy link to this message
-
Re: agent: doubt about sleeping condition in FileTailer.java
Yes, you are right.  Mind submitting a patch?

regards,
Eric

On Fri, Dec 14, 2012 at 12:16 PM, Luangsay Sourygna <[EMAIL PROTECTED]>wrote:

> Hi,
>
> In the run() method we have:
>         if (timeToReadFiles < SAMPLE_PERIOD_MS || shouldISleep) {
>           Thread.sleep(SAMPLE_PERIOD_MS);
>
> If there is no more data to tail, we shall sleep 2 seconds. Fine.
>
> But:
> if we manage to tail files in less than 2 seconds, then we must wait 2
> seconds.
> Even if there is more data to tail???
>
> Seems like it is a bug and the real condition should be:
> (timeToReadFiles < SAMPLE_PERIOD_MS && shouldISleep).
>
> Makes sense?
>
> Sourygna
>
+
Luangsay Sourygna 2012-12-15, 11:43
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