[ https://issues.apache.org/jira/browse/BEAM-5299?focusedWorklogId=161069&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-161069 ]
ASF GitHub Bot logged work on BEAM-5299: ---------------------------------------- Author: ASF GitHub Bot Created on: 31/Oct/18 09:36 Start Date: 31/Oct/18 09:36 Worklog Time Spent: 10m Work Description: mxm commented on a change in pull request #6381: [BEAM-5299] Define max timestamp for global window in proto URL: https://github.com/apache/beam/pull/6381#discussion_r229619777 ########## File path: sdks/python/apache_beam/transforms/window.py ########## @@ -295,19 +294,14 @@ def __lt__(self, other): class GlobalWindow(BoundedWindow): """The default window into which all data is placed (via GlobalWindows).""" _instance = None - # The maximum timestamp for global windows is MAX_TIMESTAMP - 1 day. - # This is due to timers triggering when the watermark passes the trigger - # time, which is only possible for timestamps < MAX_TIMESTAMP. - # See also GlobalWindow in the Java SDK. - _END_OF_GLOBAL_WINDOW = MAX_TIMESTAMP - (24 * 60 * 60) def __new__(cls): if cls._instance is None: cls._instance = super(GlobalWindow, cls).__new__(cls) return cls._instance def __init__(self): - super(GlobalWindow, self).__init__(GlobalWindow._END_OF_GLOBAL_WINDOW) + super(GlobalWindow, self).__init__(GlobalWindow._getTimestampFromProto()) Review comment: As far as I understand `GlobalWindow` is already a singleton and `__init__` will only be called once by the `__new__` method to initialize the `_instance` class member. Correct me if I'm wrong. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 161069) Time Spent: 6.5h (was: 6h 20m) > Define max global window as a shared value in protos like URN enums. > -------------------------------------------------------------------- > > Key: BEAM-5299 > URL: https://issues.apache.org/jira/browse/BEAM-5299 > Project: Beam > Issue Type: Improvement > Components: beam-model, sdk-go, sdk-java-core, sdk-py-core > Reporter: Luke Cwik > Assignee: Maximilian Michels > Priority: Minor > Labels: portability > Time Spent: 6.5h > Remaining Estimate: 0h > > Instead of having each language define a max timestamp themselves, define the > max timestamps within proto to be shared across different languages. -- This message was sent by Atlassian JIRA (v7.6.3#76005)