Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-6746

Support DoFn.setup and DoFn.teardown in Python

Details

    • Improvement
    • Status: Resolved
    • P2
    • Resolution: Duplicate
    • None
    • Not applicable
    • beam-model, sdk-py-core
    • None

    Description

      DoFn.setup and DoFn.teardown is currently supported in Java but not Python. These would be useful for performing expensive per-thread initialization.

      While lazy initialization is a usable workaround, first class support for setup and teardown would encourage consistent conventions and make the API more uniform with the Java version.

      This is related to BEAM-3736 (same issue, but for CombineFn).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              myffical@gmail.com Yifan Mai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: