Connect 2 datastreams and iterate

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Connect 2 datastreams and iterate

Biplob Biswas
Hi,

Is there a way to connect 2 datastreams and iterate and then get the feedback as a third stream?

I tried doing
mergedDS = datastream1.connect(datastream2)
iterateDS = mergedDS.iterate().withFeedback(datastream3type.class)

but this didnt work and it was showing me errors.

Is there any other way past this?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Connect 2 datastreams and iterate

Ufuk Celebi
Please provide the error message and stack trace in order to help
investigating this further.

On Thu, May 19, 2016 at 7:17 PM, Biplob Biswas <[hidden email]> wrote:

> Hi,
>
> Is there a way to connect 2 datastreams and iterate and then get the
> feedback as a third stream?
>
> I tried doing
> mergedDS = datastream1.connect(datastream2)
> iterateDS = mergedDS.iterate().withFeedback(datastream3type.class)
>
> but this didnt work and it was showing me errors.
>
> Is there any other way past this?
>
> Thanks
>
>
>
> --
> View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Connect-2-datastreams-and-iterate-tp7009.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Connect 2 datastreams and iterate

Biplob Biswas
Hi Ufuk,

I get the error before running it. I mean somehow the syntax is also not right.
I am trying to do the following:

                ConnectedStreams<Long[], Long> connectedStream = br.connect(mainInput);
       
                IterativeStream.ConnectedIterativeStreams<Long[], Long, Long[]> iteration =
                        connectedStream.iterate().withFeedbackType(Long[].class);

and i am getting an error at the iterate() method, it says the following:
                "The method iterate() is undefined for the type ConnectedStreams<Long[],Long>"
and also,

"Incorrect number of arguments for type IterativeStream.ConnectedIterativeStreams; it cannot be parameterized with arguments <Long[], Long, Long[]>"

What a I doing wrong here?

Thanks and Regards
Biplob Biswas


Ufuk Celebi wrote
Please provide the error message and stack trace in order to help
investigating this further.

On Thu, May 19, 2016 at 7:17 PM, Biplob Biswas <[hidden email]> wrote:
> Hi,
>
> Is there a way to connect 2 datastreams and iterate and then get the
> feedback as a third stream?
>
> I tried doing
> mergedDS = datastream1.connect(datastream2)
> iterateDS = mergedDS.iterate().withFeedback(datastream3type.class)
>
> but this didnt work and it was showing me errors.
>
> Is there any other way past this?
>
> Thanks
>
>
>
> --
> View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Connect-2-datastreams-and-iterate-tp7009.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.