You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beam.apache.org by amir bahmanyari <am...@yahoo.com> on 2016/08/24 17:53:44 UTC
Re: Can someone respond please? TextIO().Read pipeline
implementation question
Thanks. Really appreciate it.CheersAmir-
From: amir bahmanyari <am...@yahoo.com>
To: "user@beam.incubator.apache.org" <us...@beam.incubator.apache.org>
Sent: Tuesday, August 23, 2016 3:51 PM
Subject: TextIO().Read pipeline implementation question
Hi Colleagues,I have no problem reading through TextIO() & processing, all by default behavior.p.apply(TextIO.Read.from("/tmp/LRData.dat")) .apply("PseduLRDoFn", ParDo.of(new DoFn<String, String>() {
I want to change this logic like the following:
- Start executing TextIo().Read but before reading anything yet- Sleep for a random no of seconds between 5 & 15- Wake-up- Read the records from the file (for the time-stamps) while TextIo().Read was sleep- Process records- Back to putting TextIo() to sleep for a random no of seconds between 5 & 15 and continue til end of the file is reached
I appreciate your suggestions and/or if you can point me to an example.Cheers+thanksAmir-