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

Support DoFn.setup and DoFn.teardown in Python

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: Not applicable
    • Component/s: beam-model, sdk-py-core
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: