callback by using process function

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

callback by using process function

Abdullah bin Omar
Hi,

According to [1] example section,

(i) If we check the stored count of the last modification time against the previous timestamp count, then emit the count if they (count from last modification time) match with the previous timestamp count.

Is there refere about checking the previous count? am I understanding correctly? help me to understand this part.

(ii)  can the process function be used to look back the previous key/count?


Thank you

Reply | Threaded
Open this post in threaded view
|

Re: callback by using process function

Dawid Wysakowicz-2
Hi,

I am sorry, but I think I don't fully get your question. Could you try
to rephrase it? Maybe an example could help.

Generally speaking the KeyedProcessFunction is scoped to a single key.
Whenever you access a state (MapState, ValueState, ... ) it keeps the
current value of that state for the current key.

Best,

Dawid

On 06/05/2021 12:30, Abdullah bin Omar wrote:

> Hi,
>
> According to [1] example section,
>
> (i) If we check the stored count of the last modification time against
> the previous timestamp count, then emit the count if they (count from
> last modification time) match with the previous timestamp count.
>
> Is there refere about checking the previous count? am I understanding
> correctly? help me to understand this part.
>
> (ii)  can the process function be used to look back the previous
> key/count?
>
> [1] https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/operators/process_function/
> <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/operators/process_function/>
>
> Thank you
>


OpenPGP_signature (855 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: callback by using process function

Abdullah bin Omar
Hi,

I am asking about the attached two images that are from [1]. Does it refer to checking the previous state count by callback?

Thank you

On Mon, May 10, 2021 at 4:52 AM Dawid Wysakowicz <[hidden email]> wrote:
Hi,

I am sorry, but I think I don't fully get your question. Could you try
to rephrase it? Maybe an example could help.

Generally speaking the KeyedProcessFunction is scoped to a single key.
Whenever you access a state (MapState, ValueState, ... ) it keeps the
current value of that state for the current key.

Best,

Dawid

On 06/05/2021 12:30, Abdullah bin Omar wrote:
> Hi,
>
> According to [1] example section,
>
> (i) If we check the stored count of the last modification time against
> the previous timestamp count, then emit the count if they (count from
> last modification time) match with the previous timestamp count.
>
> Is there refere about checking the previous count? am I understanding
> correctly? help me to understand this part.
>
> (ii)  can the process function be used to look back the previous
> key/count?
>
> [1] https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/operators/process_function/
> <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/operators/process_function/>
>
> Thank you
>


2.png (156K) Download Attachment
1.png (170K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: callback by using process function

Abdullah bin Omar
Hi,

I am asking about the attached two images that are from [1]. Does it refer to checking the previous state count by callback?


Thank you

On Mon, May 10, 2021 at 6:40 AM Abdullah bin Omar <[hidden email]> wrote:
Hi,

I am asking about the attached two images that are from [1]. Does it refer to checking the previous state count by callback?

Thank you

On Mon, May 10, 2021 at 4:52 AM Dawid Wysakowicz <[hidden email]> wrote:
Hi,

I am sorry, but I think I don't fully get your question. Could you try
to rephrase it? Maybe an example could help.

Generally speaking the KeyedProcessFunction is scoped to a single key.
Whenever you access a state (MapState, ValueState, ... ) it keeps the
current value of that state for the current key.

Best,

Dawid

On 06/05/2021 12:30, Abdullah bin Omar wrote:
> Hi,
>
> According to [1] example section,
>
> (i) If we check the stored count of the last modification time against
> the previous timestamp count, then emit the count if they (count from
> last modification time) match with the previous timestamp count.
>
> Is there refere about checking the previous count? am I understanding
> correctly? help me to understand this part.
>
> (ii)  can the process function be used to look back the previous
> key/count?
>
> [1] https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/operators/process_function/
> <https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/datastream/operators/process_function/>
>
> Thank you
>


1.png (170K) Download Attachment
2.png (156K) Download Attachment