Issue with onTimer method of KeyedProcessFunction

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with onTimer method of KeyedProcessFunction

V N, Suchithra (Nokia - IN/Bangalore)

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

 

Reply | Threaded
Open this post in threaded view
|

Re: Issue with onTimer method of KeyedProcessFunction

JING ZHANG
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) <[hidden email]> 于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

 

Reply | Threaded
Open this post in threaded view
|

RE: Issue with onTimer method of KeyedProcessFunction

V N, Suchithra (Nokia - IN/Bangalore)

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 <[hidden email]>
Sent: Wednesday, June 9, 2021 2:20 PM
To: V N, Suchithra (Nokia - IN/Bangalore) <[hidden email]>
Cc: [hidden email]; Jash, Shaswata (Nokia - IN/Bangalore) <[hidden email]>
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) <[hidden email]> 202169日周三 下午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

 

Reply | Threaded
Open this post in threaded view
|

RE: Issue with onTimer method of KeyedProcessFunction

V N, Suchithra (Nokia - IN/Bangalore)
In reply to this post by JING ZHANG

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 <[hidden email]>
Sent: Wednesday, June 9, 2021 2:20 PM
To: V N, Suchithra (Nokia - IN/Bangalore) <[hidden email]>
Cc: [hidden email]; Jash, Shaswata (Nokia - IN/Bangalore) <[hidden email]>
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) <[hidden email]> 202169日周三 下午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