jessiedanwang commented on issue #5414:
URL: https://github.com/apache/iceberg/issues/5414#issuecomment-1204690039
Thanks for getting back to me quickly. I am still getting the same error
after adding the following, do i miss anything here?
val sparkConf = new
SparkConf().setAppName(appName).registerKryoClasses(Array(classOf[com.google.common.collect.ImmutableList[Any]],
classOf[com.google.common.collect.ImmutableMap[Any, Any]]))
spark = SparkSession
.builder()
.config("spark.sql.legacy.parquet.datetimeRebaseModeInWrite",
"CORRECTED")
.config("spark.sql.extensions",
"org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions") // Iceberg
related configs
.config("spark.sql.autoBroadcastJoinThreshold", "-1")
.config("spark.sql.adaptive.autoBroadcastJoinThreshold", "-1")
.config(s"spark.sql.catalog.iceberg_catalog",
"org.apache.iceberg.spark.SparkCatalog")
.config(s"spark.sql.catalog.iceberg_catalog.warehouse",
warehousePath)
.config(s"spark.sql.catalog.iceberg_catalog.catalog-impl",
"org.apache.iceberg.aws.glue.GlueCatalog")
.config(s"spark.sql.catalog.iceberg_catalog.io-impl",
"org.apache.iceberg.aws.s3.S3FileIO")
.config(s"spark.sql.catalog.iceberg_catalog.client.factory",
"org.apache.iceberg.aws.AssumeRoleAwsClientFactory")
.config(s"spark.sql.catalog.iceberg_catalog.client.assume-role.arn",
s"arn:aws:iam::$catalogId:role/$role")
.config(s"spark.sql.catalog.iceberg_catalog.client.assume-role.region",
"us-east-2")
.config("spark.sql.iceberg.handle-timestamp-without-timezone",
"true")
.config("spark.hadoop.hive.metastore.glue.catalogid", catalogId)
.config("spark.serializer",
"org.apache.spark.serializer.KryoSerializer")
.config(sparkConf)
.enableHiveSupport()
.getOrCreate()
I have also tried the following, same error as well,
spark = SparkSession
.builder()
.config("spark.serializer",
"org.apache.spark.serializer.KryoSerializer")
.config("spark.kryo.registrator", "xxx.xxx.CustomKryoRegistrator")
....
import com.esotericsoftware.kryo.Kryo
import de.javakaffee.kryoserializers.guava.{ImmutableListSerializer,
ImmutableSetSerializer, ImmutableMapSerializer}
import org.apache.spark.serializer.KryoRegistrator
class CustomKryoRegistrator extends KryoRegistrator {
override def registerClasses(kryo: Kryo): Unit = {
ImmutableListSerializer.registerSerializers(kryo)
ImmutableSetSerializer.registerSerializers(kryo)
ImmutableMapSerializer.registerSerializers(kryo)
}
}
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]