Re: Replaying logs with microsecond delay

Posted by Ted Yu on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Replaying-logs-with-microsecond-delay-tp20181p20183.html

Please see the following:

http://www.rationaljava.com/2015/10/measuring-microsecond-in-java.html

https://stackoverflow.com/questions/11498585/how-to-suspend-a-java-thread-for-a-small-period-of-time-like-100-nanoseconds

On Tue, May 15, 2018 at 10:40 AM, Dhruv Kumar <[hidden email]> wrote:
Hi

I am trying to replay a log file in which each record has a timestamp associated with it. The time difference between the records is of the order of microseconds. I am trying to replay this log maintaining the same delay between the records (using Thread.sleep()) and sending it to a socket. And then the Flink program reads the incoming data from this socket. Currently, replay of the entire log file takes much more time (3 times) then the expected time (last_timstamp - first_timstamp).

I wanted to know what are the standard ways of replaying log files if one wants to maintain the same arrival delay between the records.

Let me know if I am not clear above.

ThanksĀ 
--------------------------------------------------
Dhruv Kumar
PhD Candidate
Department of Computer Science andĀ Engineering
University of Minnesota
www.dhruvkumar.me