You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/08/29 07:10:12 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #6522: [minor]The Kryo of Hudi conflicts with the Kryo of Flink

danny0405 commented on code in PR #6522:
URL: https://github.com/apache/hudi/pull/6522#discussion_r956966210


##########
hudi-common/src/main/java/org/apache/hudi/common/util/SerializationUtils.java:
##########
@@ -117,7 +117,9 @@ public Kryo newKryo() {
       // ensure that kryo doesn't fail if classes are not registered with kryo.
       kryo.setRegistrationRequired(false);
       // This would be used for object initialization if nothing else works out.
-      kryo.setInstantiatorStrategy(new Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));
+      Kryo.DefaultInstantiatorStrategy instantiatorStrategy = new Kryo.DefaultInstantiatorStrategy();
+      instantiatorStrategy.setFallbackInstantiatorStrategy(new StdInstantiatorStrategy());
+      kryo.setInstantiatorStrategy(instantiatorStrategy);
       // Handle cases where we may have an odd classloader setup like with libjars

Review Comment:
   We already add some shade pattern for the kryo in `hudi-flink-bundle` jar in https://github.com/apache/hudi/pull/4251, does that solve your conflicts here ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org