Thank you Viktor,
However, I still get this error:
val withoutSink = source via graphFlows.fold(Fold[NormalRow,
NormalRow])(_ via _)
val runnableFlow = withoutSink to sink
"Error:(25, 54) object Fold in package fusing cannot be accessed in
package akka.stream.impl.fusing
val withoutSink = source via graphFlows.fold(Fold[NormalRow])(_ via
_)
^
"
Fold is defined as a private class. Where should I import Fold?
Thank you,
Allen Nie
On Wednesday, July 8, 2015 at 4:26:10 AM UTC-4, √ wrote:
>
> val withoutSink = source via graphFlows.fold(Fold[NormalRow])(_ via _)
>
> val runnableFlow = withoutSink to sink
>
> runnableFlow.run()
>
> On Wed, Jul 8, 2015 at 2:35 AM, Allen Nie <[email protected] <javascript:>
> > wrote:
>
>> Hi,
>>
>> I'm trying to construct a stream pipeline automatically based on a
>> list of Flow:
>>
>> val graphFlows: mutable.ListBuffer[Flow[NormalRow, NormalRow, Unit]] =
>> mutable.ListBuffer.empty[Flow[NormalRow,
>> NormalRow, Unit]]
>>
>>
>> The example given in stream cookbook chapter:
>> http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0-M4/scala/stream-cookbook.html
>>
>> only talks about a fixed pool of workers and how to connect it to a
>> balancer.
>>
>> This is what my code looks like right now:
>>
>> val g = FlowGraph.closed(sink) { implicit builder: FlowGraph.Builder
>> =>
>>
>> sink =>
>>
>> import FlowGraph.Implicits._
>>
>> graphFlows.foreach { flow =>
>> source ~> flow
>> }
>>
>> }
>>
>>
>> I have no reason to believe this would work, and I don't even know
>> how to hook this up to a sink after the flow is chained with source.
>>
>> Can anyone shed some light on this?
>>
>> Sincerely,
>> Allen Nie
>>
>> --
>> >>>>>>>>>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Cheers,
> √
>
--
>>>>>>>>>> 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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.