[
https://issues.apache.org/jira/browse/FLINK-15773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17024235#comment-17024235
]
Aljoscha Krettek commented on FLINK-15773:
------------------------------------------
That is an interesting point, as of
[this|https://github.com/apache/flink/commit/68cc21e4af71505efa142110e35a1f8b1c25fe6e]
change, the {{ClosureCleaner}} should detect when an object uses custom
serialization and then skip further checking. Could you maybe step into the
code with a debugger and see what happens around this code for your actual
case:
https://github.com/apache/flink/blob/fa8d11b53fdac1dc6d40e5a15a79ad5dee6a8d26/flink-core/src/main/java/org/apache/flink/api/java/ClosureCleaner.java#L89.
> ClosureCleaner fails with joda DateTimeZone
> -------------------------------------------
>
> Key: FLINK-15773
> URL: https://issues.apache.org/jira/browse/FLINK-15773
> Project: Flink
> Issue Type: Bug
> Components: API / Core
> Affects Versions: 1.9.1
> Reporter: Jozef Vilcek
> Priority: Minor
>
> Flink fails to launch my Apache Beam job which uses windowing function with
> time zone. Closure cleaner reports time zone as not serializable. Part of
> stack trace:
>
> {noformat}
> org.joda.time.tz.DateTimeZoneBuilder$OfYear@3b035d0c is not serializable. The
> object probably contains or references non serializable fields.
>
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:151)
>
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
>
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
>
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
>
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
>
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
>
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
> org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:71)
> org.apache.flink.api.java.DataSet.clean(DataSet.java:186)
> org.apache.flink.api.java.DataSet.flatMap(DataSet.java:267)
> ....{noformat}
> Actual instance of DateTimeZone is
> [PrecalculatedZone|https://github.com/JodaOrg/joda-time/blob/v2.10.5/src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java#L1373]
> which itself is serializable but it's fields are not necessarily standalone
> java serializable, because enclosing class it managing their serialization
> and deserialization.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)