【发布时间】:2021-10-23 17:28:19
【问题描述】:
从 Glue 2.0 切换到 3.0 时,也意味着从 Spark 2.4 切换到 3.1.1, 在处理 1900 年之前的时间戳时,我的工作开始失败并出现此错误:
An error occurred while calling z:org.apache.spark.api.python.PythonRDD.runJob.
You may get a different result due to the upgrading of Spark 3.0: reading dates before 1582-10-15 or timestamps before 1900-01-01T00:00:00Z from Parquet INT96 files can be ambiguous,
as the files may be written by Spark 2.x or legacy versions of Hive, which uses a legacy hybrid calendar that is different from Spark 3.0+s Proleptic Gregorian calendar.
See more details in SPARK-31404.
You can set spark.sql.legacy.parquet.int96RebaseModeInRead to 'LEGACY' to rebase the datetime values w.r.t. the calendar difference during reading.
Or set spark.sql.legacy.parquet.int96RebaseModeInRead to 'CORRECTED' to read the datetime values as it is.
我尝试了一切在 Glue 中设置 int96RebaseModeInRead 配置,甚至联系了支持,但目前 Glue 似乎正在覆盖该标志,您无法自行设置。
如果有人知道解决方法,那就太好了。否则我将继续使用 Glue 2.0。并等待 Glue 开发团队解决此问题。
【问题讨论】:
-
你有没有试过在创建sparkSession的时候直接设置conf?
-
是的,不幸的是这不起作用,通过环境变量设置也不起作用。
-
你能展示一下你到目前为止所尝试的吗?
-
试试 --conf 就像docs.aws.amazon.com/glue/latest/dg/…
-
正如我所说,将其设置为环境变量也不起作用
标签: amazon-web-services apache-spark pyspark aws-glue