I get an exception running a job with a GenericUDF in HIVE with Spark. Exception trace as below -
at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:630)
at org.apache.spark.SparkContext.runJob(SparkContext.scala:2029)
at org.apache.spark.sql.execution.datasources.FileFormatWriter$$anonfun$write$1.apply$mcV$sp(FileFormatWriter.scala:186)
... 40 more
Caused by: org.apache.hive.com.esotericsoftware.kryo.KryoException: Unable to find class: java.time.temporal.TemporalQueries$$Lambda$27/1278539211
Serialization trace:
query (java.time.format.DateTimeFormatterBuilder$ZoneTextPrinterParser)
printerParsers (java.time.format.DateTimeFormatterBuilder$CompositePrinterParser)
printerParser (java.time.format.DateTimeFormatter)
frmt (com.ds.common.udfs.TZToOffset)
at org.apache.hive.com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:138)
at org.apache.hive.com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:115)
Solution - Refer https://issues.apache.org/jira/browse/HIVE-7711
1) set hive.plan.serialization.format=javaXML
2) Implement a custom Serializer
3)In my case, we realized that error was due to use of "java.time.ZonedDateTime". We updated to use "java.time.LocalDateTime" and it worked fine.
at org.apache.spark.scheduler.DAGScheduler.runJob(DAGScheduler.scala:630)
at org.apache.spark.SparkContext.runJob(SparkContext.scala:2029)
at org.apache.spark.sql.execution.datasources.FileFormatWriter$$anonfun$write$1.apply$mcV$sp(FileFormatWriter.scala:186)
... 40 more
Caused by: org.apache.hive.com.esotericsoftware.kryo.KryoException: Unable to find class: java.time.temporal.TemporalQueries$$Lambda$27/1278539211
Serialization trace:
query (java.time.format.DateTimeFormatterBuilder$ZoneTextPrinterParser)
printerParsers (java.time.format.DateTimeFormatterBuilder$CompositePrinterParser)
printerParser (java.time.format.DateTimeFormatter)
frmt (com.ds.common.udfs.TZToOffset)
at org.apache.hive.com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:138)
at org.apache.hive.com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:115)
Solution - Refer https://issues.apache.org/jira/browse/HIVE-7711
1) set hive.plan.serialization.format=javaXML
2) Implement a custom Serializer
3)In my case, we realized that error was due to use of "java.time.ZonedDateTime". We updated to use "java.time.LocalDateTime" and it worked fine.
Comments
Post a Comment