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

Xu Mingmin resolved BEAM-2019.
------------------------------
       Resolution: Fixed
    Fix Version/s: First stable release

> Count.globally() requires default values for non-GlobalWindows
> --------------------------------------------------------------
>
>                 Key: BEAM-2019
>                 URL: https://issues.apache.org/jira/browse/BEAM-2019
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-core
>            Reporter: Xu Mingmin
>            Assignee: Xu Mingmin
>            Priority: Minor
>             Fix For: First stable release
>
>
> Here's my code:
> {code}
> .apply(Window.<String>into(FixedWindows.of(Duration.standardHours(1)))  
> .triggering(Repeatedly.forever(AfterProcessingTime.pastFirstElementInPane().plusDelayOf(Duration.standardMinutes(1))))
>           .withAllowedLateness(Duration.standardMinutes(10))
>           .accumulatingFiredPanes()
>           )
> .apply(Count.<String>globally());
> {code}
> And the error message as below:
> {code}
> Exception in thread "main" java.lang.IllegalStateException: Default values 
> are not supported in Combine.globally() if the output PCollection is not 
> windowed by GlobalWindows. Instead, use Combine.globally().withoutDefaults() 
> to output an empty PCollection if the input PCollection is empty, or 
> Combine.globally().asSingletonView() to get the default output of the 
> CombineFn if the input PCollection is empty.
>       at 
> org.apache.beam.sdk.transforms.Combine$Globally.expand(Combine.java:1463)
>       at 
> org.apache.beam.sdk.transforms.Combine$Globally.expand(Combine.java:1336)
>       at org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:420)
>       at org.apache.beam.sdk.Pipeline.applyTransform(Pipeline.java:334)
>       at org.apache.beam.sdk.values.PCollection.apply(PCollection.java:154)
> {code}



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

Reply via email to