{"record":{"id":"2c5144ada03826da","repo":"apache/beam","slug":"timer-time-domain","errorCode":null,"errorMessage":"{timer.time_domain}","messagePattern":"\\{timer\\.time_domain\\}","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/runner.py","lineNumber":226,"sourceCode":"    # pylint: disable=wrong-import-order, wrong-import-position\n    from apache_beam.runners.portability.fn_api_runner import translations\n    supported_requirements = set(supported_requirements)\n    for requirement in pipeline_proto.requirements:\n      if requirement not in supported_requirements:\n        raise ValueError(\n            'Unable to run pipeline with requirement: %s' % requirement)\n    for transform in pipeline_proto.components.transforms.values():\n      if transform.spec.urn == common_urns.primitives.TEST_STREAM.urn:\n        if common_urns.primitives.TEST_STREAM.urn not in supported_requirements:\n          raise NotImplementedError(transform.spec.urn)\n      elif transform.spec.urn in translations.PAR_DO_URNS:\n        payload = beam_runner_api_pb2.ParDoPayload.FromString(\n            transform.spec.payload)\n        for timer in payload.timer_family_specs.values():\n          if timer.time_domain not in (\n              beam_runner_api_pb2.TimeDomain.EVENT_TIME,\n              beam_runner_api_pb2.TimeDomain.PROCESSING_TIME):\n            raise NotImplementedError(timer.time_domain)\n\n  def default_pickle_library_override(self):\n    \"\"\"Default pickle library, can be overridden by runner implementation.\"\"\"\n    return None\n\n\n# FIXME: replace with PipelineState(str, enum.Enum)\nclass PipelineState(object):\n  \"\"\"State of the Pipeline, as returned by :attr:`PipelineResult.state`.\n\n  This is meant to be the union of all the states any runner can put a\n  pipeline in. Currently, it represents the values of the dataflow\n  API JobState enum.\n  \"\"\"\n  UNKNOWN = 'UNKNOWN'  # not specified by a runner, or unknown to a runner.\n  STARTING = 'STARTING'  # not yet started\n  STOPPED = 'STOPPED'  # paused or not yet started\n  RUNNING = 'RUNNING'  # currently running","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/runner.py#L208-L244","documentation":"check_requirements() inspects ParDo payloads for timer family specs and rejects timers declared in a time domain other than EVENT_TIME or PROCESSING_TIME. The unsupported time_domain enum value is raised as NotImplementedError.","triggerScenarios":"A DoFn declares a @user_timer (or timer family) with a time_domain outside {EVENT_TIME, PROCESSING_TIME} — e.g. a runner-unsupported or SYNCHRONIZED_PROCESSING_TIME domain — and the pipeline is run through run_portable_pipeline.","commonSituations":"Using synchronized processing-time timers in a runner that hasn't implemented them; porting a pipeline from a runner supporting all time domains to one that supports only event/processing time.","solutions":["Change the timer to EVENT_TIME or PROCESSING_TIME domain","Upgrade to a runner version that supports the timer time domain you need","Drop or refactor the timer usage if the domain isn't required"],"exampleFix":"// before\n@user_timer(time_domain=TimeDomain.SYNCHRONIZED_PROCESSING_TIME)\ndef my_timer(self):\n  ...\n// after\n@user_timer(time_domain=TimeDomain.PROCESSING_TIME)\ndef my_timer(self):\n  ...","handlingStrategy":"validation","validationCode":"from apache_beam.portability.api import beam_runner_api_pb2\nallowed = (beam_runner_api_pb2.TimeDomain.EVENT_TIME,\n           beam_runner_api_pb2.TimeDomain.PROCESSING_TIME)\nassert all(t.time_domain in allowed\n           for t in timer_family_specs.values())","typeGuard":null,"tryCatchPattern":"try:\n    runner.check_requirements(pipeline_proto, runner.supported_requirements)\nexcept NotImplementedError as e:\n    print('unsupported timer time domain:', e)","preventionTips":["Declare timers only with EVENT_TIME or PROCESSING_TIME unless the runner supports more","Review timer time domains when porting between runners","Test timer-bearing pipelines on the target runner early"],"tags":["apache-beam","timers","unsupported-feature","pardo"],"backgroundTag":"unsupported-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}