Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-3978

Add hasBroadcastVariable method to RuntimeContext

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.0
    • 1.1.0
    • None
    • None

    Description

      The javadocs for RuntimeContext state that getAccumulator "throws an exception if the accumulator does not exist or if the accumulator exists, but with different type", although AbstractRuntimeUDFContext does not throw an exception but will return null.

      The javadocs for getBroadcastVariable do not mention throwing an exception. Currently the only way to handle a broadcast variable that that may or may not exist is to catch and ignore the exception. Adding a containsBroadcastVariable method to RuntimeContext would make this explicit.

      Attachments

        Issue Links

          Activity

            People

              greghogan Greg Hogan
              greghogan Greg Hogan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: