[
https://issues.apache.org/jira/browse/FLINK-8667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16369056#comment-16369056
]
ASF GitHub Bot commented on FLINK-8667:
---------------------------------------
Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/5500#discussion_r169055575
--- Diff:
flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/BroadcastStateITCase.java
---
@@ -145,17 +147,16 @@ public Watermark checkAndGetNextWatermark(T
lastElement, long extractedTimestamp
private static final long serialVersionUID =
7616910653561100842L;
private final Map<Long, String> expectedState;
-
- private final long timerTimestamp;
+ private final AtomicLong al = new AtomicLong(1000L);
+ // <key, time>
+ private final Map<Long, Long> expectedTimeAndKey = new
HashMap<>();
+ // <time, key>
+ private final Map<Long, Long> expectedKeyAndTime = new
HashMap<>();
private transient MapStateDescriptor<Long, String> descriptor;
- TestBroadcastProcessFunction(
- final long timerTS,
- final Map<Long, String> expectedBroadcastState
- ) {
+ TestBroadcastProcessFunction(final Map<Long, String>
expectedBroadcastState) {
--- End diff --
Please keep the `timerTS` (renaming it to `initialTimerTimestamp`)
parameter as an initial value for the `nextTimerTimestamp`/`al` field that you
have added. Otherwise it's confusing where does this magic value `1000` come
from and what are consequences of changing it. Especially that you have kept
the original comment `// the timestamp should be high enough to trigger the
timer after all the elements arrive.` in the
`testConnectWithBroadcastTranslation()`.
> expose key in KeyedBroadcastProcessFunction#onTimer()
> -----------------------------------------------------
>
> Key: FLINK-8667
> URL: https://issues.apache.org/jira/browse/FLINK-8667
> Project: Flink
> Issue Type: Improvement
> Affects Versions: 1.5.0
> Reporter: Bowen Li
> Assignee: Bowen Li
> Priority: Major
> Fix For: 1.5.0
>
>
> [~aljoscha] [~pnowojski]
> Since KeyedBroadcastProcessFunction is about to get out of the door, I think
> it will be great to expose the timer's key in KeyedBroadcastProcessFunction
> too. If we don't do it now, it will be much more difficult to add the feature
> on later because of user app compatibility issue.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)