Uploaded image for project: 'Crunch'
  1. Crunch
  2. CRUNCH-471

Add synchronization checks to DoFnIterator

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: Core
    • Labels:
      None

      Description

      I hit this one when I was working on a port of the Hadoop Streaming logic to Crunch: if a DoFn emits records via some sort of asynchronous process (e.g., a daemon thread), it can cause a problem for DoFnIterator, which doesn't have thread-safe controls over its underlying records list. Easy fix is to make the accessor methods for CacheEmitter inside of DoFnIterator synchronized.

        Attachments

        1. CRUNCH-471.patch
          2 kB
          Josh Wills

          Activity

            People

            • Assignee:
              jwills Josh Wills
              Reporter:
              jwills Josh Wills
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: