Uploaded image for project: 'Crunch (Retired)'
  1. Crunch (Retired)
  2. CRUNCH-157

Call DoFn.initialize directly, instead of from setContext

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.3.0, 0.4.0
    • 0.5.0
    • Core
    • None

    Description

      We often use a pattern of nested DoFns-- DoFns that are composed of operations on other DoFns. There is currently an ambiguity around the right way to initialize those DoFns, since it can be done either via overriding the initialize() or the setContext() methods in DoFn. We should separate the calls to setContext and initialize to remove the ambiguity and fix the instances in Crunch core where we override setContext() instead of initialize().

      Attachments

        1. CRUNCH-157.patch
          2 kB
          Josh Wills
        2. CRUNCH-157-sep.patch
          18 kB
          Josh Wills

        Activity

          People

            jwills Josh Wills
            jwills Josh Wills
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: