[ 
https://issues.apache.org/jira/browse/BEAM-7035?focusedWorklogId=227381&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-227381
 ]

ASF GitHub Bot logged work on BEAM-7035:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Apr/19 18:14
            Start Date: 14/Apr/19 18:14
    Worklog Time Spent: 10m 
      Work Description: tweise commented on pull request #8300: [BEAM-7035] 
Compatible wire representation for timers in Python SDK
URL: https://github.com/apache/beam/pull/8300#discussion_r275167931
 
 

 ##########
 File path: 
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/ExecutableStageDoFnOperator.java
 ##########
 @@ -378,14 +379,20 @@ public ByteBuffer getCurrentKey() {
 
   private void setTimer(WindowedValue<InputT> timerElement, 
TimerInternals.TimerData timerData) {
     try {
+      LOG.debug("Setting timer: {} {}", timerElement, timerData);
       // KvToByteBufferKeySelector returns the key encoded
       ByteBuffer encodedKey = (ByteBuffer) keySelector.getKey(timerElement);
       // We have to synchronize to ensure the state backend is not 
concurrently accessed by the
       // state requests
       try {
         stateBackendLock.lock();
         getKeyedStateBackend().setCurrentKey(encodedKey);
-        timerInternals.setTimer(timerData);
+        if 
(timerData.getTimestamp().isAfter(GlobalWindow.TIMESTAMP_MAX_VALUE)) {
 
 Review comment:
   The constant is actually defined in BoundedWindow 
https://github.com/apache/beam/blob/a9723d954a92391e9ca79130a199a8eaf38953f2/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/BoundedWindow.java#L57
   
   I will change this to avoid confusion.
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 227381)
    Time Spent: 2h 10m  (was: 2h)

> Clear() method of OutputTimer is inconsistent
> ---------------------------------------------
>
>                 Key: BEAM-7035
>                 URL: https://issues.apache.org/jira/browse/BEAM-7035
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-model
>            Reporter: Rakesh Kumar
>            Assignee: Thomas Weise
>            Priority: Major
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> [Clear()|https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/bundle_processor.py#L378]
>  method of OutputTimer is not consistent () 
> The timestamp parameter is passed here but never used. Also in the [test 
> cases 
> |[https://github.com/apache/beam/blob/master/sdks/python/apache_beam/transforms/userstate_test.py#L501]]
>  and direct runner timer doesn't pass any parameter in the clear method



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to