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

SparkRuntimeContext instances are leaking via StateSpecFunctions#mapSourceFunction

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: runner-spark
    • Labels:
      None

      Description

      When creating an anonymous class like so:

      new Iterable<byte[]>() {...}

      it is capturing the enclosing scope's SparkRuntimeContext instance in StateSpecFunctions#mapSourceFunction via

      return new SerializableFunction3<Source<T>, Option<CheckpointMarkT>,
              State<Tuple2<byte[], Instant>>, Tuple2<Iterable<byte[]>, Metadata>>() { ... runtimeContext usage ...  } 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                staslev Stas Levin
                Reporter:
                staslev Stas Levin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: