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,8 +58,12 @@ 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 = " spark.kryo.registrator"
64+
6165 def register (conf : SparkConf ): SparkConf = {
62- conf.set(KRYO_USER_REGISTRATORS , Seq (classOf [HoodieSparkKryoRegistrar ].getName))
66+ conf.set(KRYO_USER_REGISTRATORS , Seq (classOf [HoodieSparkKryoRegistrar ].getName).mkString( " , " ) )
6367 }
6468
6569}
You can’t perform that action at this time.
0 commit comments