[
https://issues.apache.org/jira/browse/BEAM-5277?focusedWorklogId=140510&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-140510
]
ASF GitHub Bot logged work on BEAM-5277:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Sep/18 09:12
Start Date: 03/Sep/18 09:12
Worklog Time Spent: 10m
Work Description: mxm commented on a change in pull request #6325:
[BEAM-5277] Flink portable streaming: Empty side input for ready windows
URL: https://github.com/apache/beam/pull/6325#discussion_r214621732
##########
File path:
runners/core-java/src/main/java/org/apache/beam/runners/core/SideInputHandler.java
##########
@@ -183,8 +177,9 @@ public void addSideInputValue(PCollectionView<?>
sideInput, WindowedValue<Iterab
ValueState<Iterable<?>> state =
stateInternals.state(StateNamespaces.window(windowCoder, window),
stateTag);
- // returns null when the side input is not ready
- return state.read();
+ Iterable<?> elements = state.read();
+ // return empty collection when no side input was received for ready window
+ return (elements != null) ? elements : Collections.emptyList();
Review comment:
Slightly suspicious that we don't receive elements here. I understand that
side inputs may not always be ready depending on the trigger strategy. We
discovered the bug running Wordcount in streaming mode, which uses side inputs
for the write operations. The trigger there is the default trigger, i.e. end of
global window. Shouldn't all side inputs be ready then?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 140510)
Time Spent: 20m (was: 10m)
> Python SDK wordcount fails due to side inputs in streaming mode
> ---------------------------------------------------------------
>
> Key: BEAM-5277
> URL: https://issues.apache.org/jira/browse/BEAM-5277
> Project: Beam
> Issue Type: Bug
> Components: runner-flink
> Reporter: Maximilian Michels
> Assignee: Thomas Weise
> Priority: Major
> Labels: portability
> Fix For: 2.8.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> After BEAM-5250 is fixed, the wordcount fails with:
> {noformat}
> RuntimeError: java.lang.NullPointerException: Element processed by SDK before
> side input is ready
> at
> org.apache.beam.repackaged.beam_runners_flink_2.11.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787)
> at
> org.apache.beam.runners.flink.translation.functions.FlinkStreamingSideInputHandlerFactory$1.get(FlinkStreamingSideInputHandlerFactory.java:126)
> at
> org.apache.beam.runners.fnexecution.state.StateRequestHandlers$StateRequestHandlerToSideInputHandlerFactoryAdapter.handleGetRequest(StateRequestHandlers.java:297)
> at
> org.apache.beam.runners.fnexecution.state.StateRequestHandlers$StateRequestHandlerToSideInputHandlerFactoryAdapter.handle(StateRequestHandlers.java:267)
> at
> org.apache.beam.runners.fnexecution.state.GrpcStateService$Inbound.onNext(GrpcStateService.java:121)
> at
> org.apache.beam.runners.fnexecution.state.GrpcStateService$Inbound.onNext(GrpcStateService.java:109)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:248)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.ForwardingServerCallListener.onMessage(ForwardingServerCallListener.java:33)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.Contexts$ContextualizedServerCallListener.onMessage(Contexts.java:76)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:263)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:683)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> [while running 'write/Write/WriteImpl/FinalizeWrite']
> at
> org.apache.beam.runners.fnexecution.control.FnApiControlClient$ResponseStreamObserver.onNext(FnApiControlClient.java:157)
> at
> org.apache.beam.runners.fnexecution.control.FnApiControlClient$ResponseStreamObserver.onNext(FnApiControlClient.java:140)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.stub.ServerCalls$StreamingServerCallHandler$StreamingServerCallListener.onMessage(ServerCalls.java:248)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.ForwardingServerCallListener.onMessage(ForwardingServerCallListener.java:33)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.Contexts$ContextualizedServerCallListener.onMessage(Contexts.java:76)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messagesAvailable(ServerCallImpl.java:263)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1MessagesAvailable.runInContext(ServerImpl.java:683)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
> at
> org.apache.beam.vendor.grpc.v1.io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> ... 1 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)