[ https://issues.apache.org/jira/browse/BEAM-656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kenneth Knowles updated BEAM-656: --------------------------------- Description: Currently there's no way to use side inputs or outputs within Java 8 lambdas and MapElements. It would be nice if you could do something like this: {code:java} PCollection<Integer> wordLengths = words.apply( MapElements.via((String word) -> { int sideInput1= [[[ GetSideInputHere(); ]]] [[[ SetSideOutputHere ]]] (sideInput1+word.length()); return word.length(); }).withOutputType(new TypeDescriptor<Integer>() {}); {code} was: Currently there's no way to use side inputs or outputs within Java 8 lambdas and MapElements. It would be nice if you could do something like this: PCollection<Integer> wordLengths = words.apply( MapElements.via((String word) -> { int sideInput1= [[[ GetSideInputHere(); ]]] [[[ SetSideOutputHere ]]] (sideInput1+word.length()); return word.length(); }).withOutputType(new TypeDescriptor<Integer>() {}); > Add support for side inputs/outputs to Java 8 lambdas in MapElements > -------------------------------------------------------------------- > > Key: BEAM-656 > URL: https://issues.apache.org/jira/browse/BEAM-656 > Project: Beam > Issue Type: Improvement > Components: sdk-ideas > Environment: Java 8 > Reporter: Jani Patokallio > Assignee: James Malone > Priority: Minor > > Currently there's no way to use side inputs or outputs within Java 8 lambdas > and MapElements. It would be nice if you could do something like this: > {code:java} > PCollection<Integer> wordLengths = words.apply( > MapElements.via((String word) -> { > int sideInput1= [[[ GetSideInputHere(); ]]] > [[[ SetSideOutputHere ]]] (sideInput1+word.length()); > return word.length(); > }).withOutputType(new TypeDescriptor<Integer>() {}); > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)