You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Prateek Maheshwari (JIRA)" <ji...@apache.org> on 2017/05/04 20:23:04 UTC

[jira] [Resolved] (SAMZA-1253) MessageStream.merge operator broken for nested types

     [ https://issues.apache.org/jira/browse/SAMZA-1253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Prateek Maheshwari resolved SAMZA-1253.
---------------------------------------
    Resolution: Fixed

Fixed in https://github.com/apache/samza/pull/159

> MessageStream.merge operator broken for nested types
> ----------------------------------------------------
>
>                 Key: SAMZA-1253
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1253
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Prateek Maheshwari
>            Assignee: Prateek Maheshwari
>             Fix For: 0.13.0
>
>
> From [~cpettitt-linkedin]:
> {code}
> I picked up the latest code and found that MessageStream.merge is now broken for nested types. For example, the following:
>     final MessageStream<BeamMessage<InT>> inputStream = ...;
>     final Collection<MessageStream<BeamMessage<InT>>> sideInputStreams = ...;
>     final MessageStream<BeamMessage<OutT>> outputStream =
>         inputStream
>             .merge(sideInputStreams);
> Now fails to compile:
> incompatible types: java.util.Collection<org.apache.samza.operators.MessageStream<com.linkedin.beam.runners.samza.runtime.BeamMessage<InT>>> cannot be converted to java.util.Collection<org.apache.samza.operators.MessageStream<? extends com.linkedin.beam.runners.samza.runtime.BeamMessage<InT>>>
> This forces the user to go to raw types, which is not intuitive and certainly not type safe.
> Per http://www.angelikalanger.com/GenericsFAQ/FAQSections/TypeArguments.html#FAQ104, I believe we want the parameter type to be
> Collection<? extends MessageStream<? extends M>>
> , which does compile.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)