rehmanmuradali commented on a change in pull request #11154:
URL: https://github.com/apache/beam/pull/11154#discussion_r411345158
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/DoFnOperator.java
##########
@@ -837,11 +837,15 @@ public void onProcessingTime(InternalTimer<ByteBuffer,
TimerData> timer) {
// allow overriding this in ExecutableStageDoFnOperator to set the key
context
protected void fireTimerInternal(Object key, TimerData timerData) {
- fireTimer(timerData);
+ if (key instanceof java.nio.ByteBuffer) {
+ key = FlinkKeyUtils.decodeKey((ByteBuffer) key, keyCoder);
Review comment:
```keyStateInternal.getKey()``` internally assumes that the key is of
type ```ByteBuffer``` and tries to decode it. Since we have some test that uses
decoded key, we get ClassCastException here as well. To prevent it I have added
a ```key instanceof java.nio.ByteBuffer``` check on ```timer.getKey```. This
will let me know when to decode, as a workaround. @mxm
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]