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

[jira] [Updated] (SAMZA-1277) merge() operator should not require chaining.

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

Jake Maes updated SAMZA-1277:
-----------------------------
    Description: 
The current design forces users to do stuff like this (I can provide more than a few examples already)

{noFormat}
List<MessageStream<GenericRecord>> xTrackingMonitoringEvents = new ArrayList<>();
// ... populate the list
 MessageStream<GenericRecord>  initialInputStream =
        xTrackingMonitoringEvents.remove(xTrackingMonitoringEvents.size() - 1);
    Collection<MessageStream<? extends GenericRecord>> otherStreams =
        (Collection<MessageStream<? extends GenericRecord>>) (Object) xTrackingMonitoringEvents;

    initialInputStream
        .merge(otherStreams)
// .do other stuff

{noFormat}

^ eww. Removing one item from the array so it can be used as the initial message stream seems to cause pain.

Lets see if we can come up with a cleaner way to do merge()

  was:
The current design forces users to do stuff like this (I can provide more than a few examples already)

{noFormat}
List<MessageStream<GenericRecord>> xTrackingMonitoringEvents = new ArrayList<>();
// ... populate the list
 MessageStream<GenericRecord>  initialInputStream =
        xTrackingMonitoringEvents.remove(xTrackingMonitoringEvents.size() - 1);
    Collection<MessageStream<? extends GenericRecord>> otherStreams =
        (Collection<MessageStream<? extends GenericRecord>>) (Object) xTrackingMonitoringEvents;
    initialInputStream
        .merge(otherStreams)

{noFormat}

^ eww. Lets see if we can come up with a cleaner way to do merge()


> merge() operator should not require chaining. 
> ----------------------------------------------
>
>                 Key: SAMZA-1277
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1277
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Jake Maes
>             Fix For: 0.14.0
>
>
> The current design forces users to do stuff like this (I can provide more than a few examples already)
> {noFormat}
> List<MessageStream<GenericRecord>> xTrackingMonitoringEvents = new ArrayList<>();
> // ... populate the list
>  MessageStream<GenericRecord>  initialInputStream =
>         xTrackingMonitoringEvents.remove(xTrackingMonitoringEvents.size() - 1);
>     Collection<MessageStream<? extends GenericRecord>> otherStreams =
>         (Collection<MessageStream<? extends GenericRecord>>) (Object) xTrackingMonitoringEvents;
>     initialInputStream
>         .merge(otherStreams)
> // .do other stuff
> {noFormat}
> ^ eww. Removing one item from the array so it can be used as the initial message stream seems to cause pain.
> Lets see if we can come up with a cleaner way to do merge()



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