You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,6 +187,8 @@ However, this project cannot enforce TypeInformation usage in the Flink Java API
187
187
188
188
Usage of this code may lead to silently fallback to Kryo.
189
189
190
+
From Flink 1.19, a check is done to detect this misusage. To disable it, see [Disable fail-fast on Scala type resolution with Class feature flag](#disable-fail-fast-on-scala-type-resolution-with-class).
191
+
190
192
> [!WARNING]
191
193
> Official `flink-scala` deprecated dependency contains Scala-specialized Kryo serializers. If this dependency is removed from the classpath (see [Supported Flink versions](#supported-flink-versions)), usage of Kryo with Scala classes leads to erroneous re-instantiations of `object` and `case object` singletons.
192
194
>
@@ -402,7 +404,7 @@ env
402
404
403
405
In the [1.1.5 release](https://github.com/flink-extended/flink-scala-api/releases/tag/v1.18.1_1.1.5) the Case Class serialization process also [stores case class arity](https://github.com/flink-extended/flink-scala-api/pull/98/files#diff-e896c210d6a754cb3afb462aea34cca08f090330f6f3c663a64dfb5584fc3727R106) number to
404
406
a savepoint. This was introduced to support Case Class schema evolution and allow to add new
405
-
class fields with default values. However, unfortunatelly this is the breaking change to the Flink job state restore process. Flink job will fail, if
407
+
class fields with default values. However, unfortunately this is the breaking change to the Flink job state restore process. Flink job will fail, if
406
408
a savepoint used for the job restore was created by 1.1.4 or earlier releases.
407
409
408
410
In order migrate to the 1.1.5 release version, one can use specially added environment variable:
@@ -412,12 +414,18 @@ To disable new savepoint format and be able to restore a Flink job with a savepo
412
414
413
415
Example: `DISABLE_CASE_CLASS_ARITY_USAGE = true`
414
416
415
-
To enbale new serialization logic set this variable to `false` or simply do not define this envrionment vairable.
417
+
To enable new serialization logic set this variable to `false` or simply do not define this environment variable.
416
418
417
419
Example: `DISABLE_CASE_CLASS_ARITY_USAGE = false`
418
420
419
421
P.S. this flag can be deprecated in future when most of the users migrate to the latest library version.
420
422
423
+
### Disable fail-fast on Scala type resolution with Class
424
+
425
+
From [1.3.0 release](https://github.com/flink-extended/flink-scala-api/releases/tag/v1.19.1_1.3.0), a check is done to prevent misusage of Scala type resolution with `Class` which may lead to silently fallback to generic Kryo serializers.
426
+
427
+
You can disable this check with the `DISABLE_FAIL_FAST_ON_SCALA_TYPE_RESOLUTION_WITH_CLASS` environment variable set to `true`.
428
+
421
429
## Release
422
430
423
431
Create SBT file at ~/.sbt/1.0/sonatype.sbt with the following content:
s"""You are using a 'Class' to resolve '${formatType(t, params)}' Scala type. flink-scala-api has no control over this kind of type resolution which may lead to silently fallback to generic Kryo serializers.
16
+
|Use type information instead: import 'org.apache.flinkx.api.serializers._' to make implicitly available in the scope required 'TypeInformation' to resolve Scala types.
17
+
|To disable this check, set 'DISABLE_FAIL_FAST_ON_SCALA_TYPE_RESOLUTION_WITH_CLASS' environment variable to 'true'.""".stripMargin
0 commit comments