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

ClosureCleaner to include reference classes for non-serialization exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.18.2
    • None
    • API / Core

    Description

      Currently the ClosureCleaner throws exception if {{checkSerializable} is enabled while some object is non-serializable. It includes the non-serializable (nested) object in the exception in the exception message.

      However, when the user job program gets more complex pulling multiple operators each of which pulls multiple 3rd party libraries, it is unclear how the non-serializable object is referenced as some of those objects could be nested in multiple levels. For example, following exception is not straightforward where to check:

      org.apache.flink.api.common.InvalidProgramException: java.lang.Object@528c868 is not serializable. 
      

      It would be nice to include the reference stack in the exception message, as following:

      org.apache.flink.api.common.InvalidProgramException: java.lang.Object@72437d8d is not serializable. Referenced via [class com.mycompany.myapp.ComplexMap, class com.mycompany.myapp.LocalMap, class com.yourcompany.yourapp.YourPojo, class com.hercompany.herapp.Random, class java.lang.Object] ...
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              liuml07 Mingliang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: