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

Add SetUp() and TearDown() for CombineFns

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: beam-model, sdk-py-core
    • Labels:

      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

            • Assignee:
              Unassigned
              Reporter:
              chuanyu Chuan Yu Foo
            • Votes:
              0 Vote for this issue
              Watchers:
              13 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