File tree Expand file tree Collapse file tree
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import org.apache.hudi.client.model.HoodieInternalRow
2323import org .apache .hudi .commmon .model .HoodieSparkRecord
2424import org .apache .hudi .common .util .HoodieCommonKryoRegistrar
2525import org .apache .hudi .config .HoodieWriteConfig
26- import org .apache .spark .internal .config .Kryo . KRYO_USER_REGISTRATORS
26+ import org .apache .spark .internal .config .ConfigBuilder
2727import org .apache .spark .serializer .KryoRegistrator
2828
2929/**
@@ -58,6 +58,13 @@ class HoodieSparkKryoRegistrar extends HoodieCommonKryoRegistrar with KryoRegist
5858
5959object HoodieSparkKryoRegistrar {
6060
61+ // NOTE: We're copying definition of the config introduced in Spark 3.0
62+ // (to stay compatible w/ Spark 2.4)
63+ private val KRYO_USER_REGISTRATORS = ConfigBuilder (" spark.kryo.registrator" )
64+ .stringConf
65+ .toSequence
66+ .createWithDefault(Nil )
67+
6168 def register (conf : SparkConf ): SparkConf = {
6269 conf.set(KRYO_USER_REGISTRATORS , Seq (classOf [HoodieSparkKryoRegistrar ].getName))
6370 }
You can’t perform that action at this time.
0 commit comments