[
https://issues.apache.org/jira/browse/BEAM-4681?focusedWorklogId=165289&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-165289
]
ASF GitHub Bot logged work on BEAM-4681:
----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Nov/18 03:56
Start Date: 13/Nov/18 03:56
Worklog Time Spent: 10m
Work Description: ryan-williams commented on a change in pull request
#7008: [BEAM-4681] Add support for portable timers in Flink batch mode
URL: https://github.com/apache/beam/pull/7008#discussion_r232888779
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/ExecutableStageDoFnOperator.java
##########
@@ -304,16 +344,126 @@ protected void
addSideInputValue(StreamRecord<RawUnionValue> streamRecord) {
@Override
protected DoFnRunner<InputT, OutputT> createWrappingDoFnRunner(
DoFnRunner<InputT, OutputT> wrappedRunner) {
- return new SdkHarnessDoFnRunner();
+ sdkHarnessRunner =
+ new SdkHarnessDoFnRunner<>(
+ executableStage.getInputPCollection().getId(),
+ stageBundleFactory,
+ stateRequestHandler,
+ progressHandler,
+ outputManager,
+ outputMap,
+ executableStage.getTimers(),
+ (Coder<BoundedWindow>)
windowingStrategy.getWindowFn().windowCoder(),
+ (WindowedValue<InputT> key, TimerInternals.TimerData timerData) ->
{
+ try {
+ keyForTimerToBeSet = keySelector.getKey(key);
+ timerInternals.setTimer(timerData);
+ } catch (Exception e) {
+ throw new RuntimeException("Couldn't set timer", e);
+ } finally {
+ keyForTimerToBeSet = null;
+ }
+ });
+ return sdkHarnessRunner;
+ }
+
+ @Override
+ public void processWatermark(Watermark mark) throws Exception {
+ // Due to the asynchronous communication with the SDK harness,
+ // a bundle might still be in progress and not all items have
+ // yet been received from the SDk harness. If we just set this
Review comment:
```suggestion
// yet been received from the SDK harness. If we just set this
```
----------------------------------------------------------------
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: 165289)
Time Spent: 8h 20m (was: 8h 10m)
> Integrate support for timers using the portability APIs into Flink
> ------------------------------------------------------------------
>
> Key: BEAM-4681
> URL: https://issues.apache.org/jira/browse/BEAM-4681
> Project: Beam
> Issue Type: Sub-task
> Components: runner-flink
> Reporter: Luke Cwik
> Assignee: Maximilian Michels
> Priority: Major
> Labels: portability, portability-flink
> Time Spent: 8h 20m
> Remaining Estimate: 0h
>
> Consider using the code produced in BEAM-4658 to support timers.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)