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

Add SetUp() and TearDown() for CombineFns

Details

    • Improvement
    • Status: Triage Needed
    • P3
    • Resolution: Unresolved
    • None
    • None
    • beam-model, sdk-py-core
    • None

    Description

      I have a CombineFn that has a large amount of state that needs to be loaded once before it can add_input or merge_combiners (for example, the CombineFn might load up a large lookup table used for combining). 

      Right now, to initialise this state, for each of the methods, I check if the state has already been initialised, and if not, I initialise it. It would be nice if CombineFn provided a SetUp() method that is called once to initialise this state (and a corresponding TearDown() method to clean up this state if necessary).

      Attachments

        Activity

          People

            Unassigned Unassigned
            chuanyu Chuan Yu Foo
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 13h
                13h