Hi,
I am trying to implement some actor based computations on a big file (tens
of GB). At the moment I have an actor splitting job between workers, but
the input data is Seq[]. To read the data from file I wanted to use akka
streams, but somehow after reading a lot online I got lost. All file
processing examples I found online were ending with
.to(Sink.foreach(prlinln))
so they was processing the whole file at once.
My quesion is how pause file reading or make a request to read a line/set
of bytes?
As for now my source is defined as
val file_source:Source[MyObject, Future[IOResult]] = FileIO.fromPath(new
File(file_name))
.via(Framing.delimiter(ByteString("\n"), maximumFrameLength = 1024))
.map(_.utf8String)
.map(x => do_some_transfromations(x))
Thanks,
Marcin
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.