Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-11630

ClosureCleaner incorrectly warns for class based closures

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.4.1
    • 2.4.0
    • Spark Core
    • None

    Description

      Spark's `ClosureCleaner` utility seems to check whether a function is an anonymous function: ClosureCleaner.scala on line 49 If not, it warns the user.

      However, I'm using some class based functions. Something along the lines of:

      trait FromUnreadRow[T] extends (UnreadRow => T) with Serializable
      
      object ToPlainRow extends FromUnreadRow[PlainRow] {
        override def apply(row: UnreadRow): PlainRow = ???
      }
      

      This works just fine. I can't really see that the warning is actually useful in this case. I appreciate checking for common 'mistakes', but in my case a user might be alarmed unnecessarily.

      Anything that can be done about this? Anything I can do?

      Attachments

        Issue Links

          Activity

            People

              rekhajoshm Rekha Joshi
              frensjan Frens Jan Rumph
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: