You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "V N, Suchithra (Nokia - IN/Bangalore)" <su...@nokia.com> on 2021/06/09 07:41:48 UTC

Issue with onTimer method of KeyedProcessFunction

Hello,

We are using apache flink 1.7 and now trying to upgrade to flink 1.12.3 version. After upgrading to 1.12.3 version,  the onTimer method of  KeyedProcessFunction is not behaving correctly, the value of ReducingState and ValueState always return null.

Could you please help in debugging the issue.

Thanks,
Suchithra


RE: Issue with onTimer method of KeyedProcessFunction

Posted by "V N, Suchithra (Nokia - IN/Bangalore)" <su...@nokia.com>.
Hi Zhang,

Please find the code snippet.

private ReducingState<NatLogData> aggrRecord; // record being aggregated

@Override
public void onTimer(long timestamp, OnTimerContext ctx, Collector<NatLogData> out) throws Exception {
// FIXME timer is not working? or re-registration not working?
NatLogData event = aggrRecord.get();   // Always get null value.


Thanks,
Suchithra


From: JING ZHANG <be...@gmail.com>
Sent: Wednesday, June 9, 2021 2:20 PM
To: V N, Suchithra (Nokia - IN/Bangalore) <su...@nokia.com>
Cc: user@flink.apache.org; Jash, Shaswata (Nokia - IN/Bangalore) <sh...@nokia.com>
Subject: Re: Issue with onTimer method of KeyedProcessFunction

Hi Suchithra,
Would you please provide more information in detail or paste the main code?

Best regards,
JING ZHANG

V N, Suchithra (Nokia - IN/Bangalore) <su...@nokia.com>> 于2021年6月9日周三 下午3:42写道:
Hello,

We are using apache flink 1.7 and now trying to upgrade to flink 1.12.3 version. After upgrading to 1.12.3 version,  the onTimer method of  KeyedProcessFunction is not behaving correctly, the value of ReducingState and ValueState always return null.

Could you please help in debugging the issue.

Thanks,
Suchithra


RE: Issue with onTimer method of KeyedProcessFunction

Posted by "V N, Suchithra (Nokia - IN/Bangalore)" <su...@nokia.com>.
Hi Zhang,

Please find the code snippet.

private ReducingState<NatLogData> aggrRecord; // record being aggregated

@Override
public void onTimer(long timestamp, OnTimerContext ctx, Collector<NatLogData> out) throws Exception {
// FIXME timer is not working? or re-registration not working?
NatLogData event = aggrRecord.get();   // Always get null value.


Thanks,
Suchithra

From: JING ZHANG <be...@gmail.com>
Sent: Wednesday, June 9, 2021 2:20 PM
To: V N, Suchithra (Nokia - IN/Bangalore) <su...@nokia.com>
Cc: user@flink.apache.org; Jash, Shaswata (Nokia - IN/Bangalore) <sh...@nokia.com>
Subject: Re: Issue with onTimer method of KeyedProcessFunction

Hi Suchithra,
Would you please provide more information in detail or paste the main code?

Best regards,
JING ZHANG

V N, Suchithra (Nokia - IN/Bangalore) <su...@nokia.com>> 于2021年6月9日周三 下午3:42写道:
Hello,

We are using apache flink 1.7 and now trying to upgrade to flink 1.12.3 version. After upgrading to 1.12.3 version,  the onTimer method of  KeyedProcessFunction is not behaving correctly, the value of ReducingState and ValueState always return null.

Could you please help in debugging the issue.

Thanks,
Suchithra


Re: Issue with onTimer method of KeyedProcessFunction

Posted by JING ZHANG <be...@gmail.com>.
Hi Suchithra,
Would you please provide more information in detail or paste the main code?

Best regards,
JING ZHANG

V N, Suchithra (Nokia - IN/Bangalore) <su...@nokia.com>
于2021年6月9日周三 下午3:42写道:

> Hello,
>
>
>
> We are using apache flink 1.7 and now trying to upgrade to flink 1.12.3
> version. After upgrading to 1.12.3 version,  the onTimer method of
>  KeyedProcessFunction is not behaving correctly, the value of ReducingState
> and ValueState always return null.
>
>
>
> Could you please help in debugging the issue.
>
>
>
> Thanks,
>
> Suchithra
>
>
>