You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (Jira)" <ji...@apache.org> on 2022/06/04 01:53:00 UTC

[jira] [Commented] (BEAM-7155) Provide access to within DoFn.OnTimerContext

    [ https://issues.apache.org/jira/browse/BEAM-7155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17547752#comment-17547752 ] 

Kenneth Knowles commented on BEAM-7155:
---------------------------------------

This issue has been migrated to https://github.com/apache/beam/issues/19479

> Provide access to <K> within DoFn.OnTimerContext 
> -------------------------------------------------
>
>                 Key: BEAM-7155
>                 URL: https://issues.apache.org/jira/browse/BEAM-7155
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>    Affects Versions: 2.11.0
>            Reporter: Reza ardeshir rokni
>            Priority: P3
>              Labels: Clarified
>
> org.apache.beam.sdk.transforms.DoFn.OnTimerContext Does not support access to Key. Current workaround:
> @ProcessElement 
> @StateId("dataKey") ValueState<String> key
> { key.write(key)}
>  
> ...
>  
> @OnTimer("processTimer") public void OnTimer(OnTimerContext otc,
> @StateId("dataKey") ValueState<String> key,
> {key.read()}
>  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)