apache-spark - Spark History - Log timestamps have wrong time zone
问题描述
When I submit a job on a set of machines machine located in London timezone, the Spark Master on the dashboard has the correct time, but the dashboard of history server shows time that is 1 hrs ahead which is GMT. Is there a way to fix this in Apache Spark?
解决方案
您的日志时间戳很可能没有“错误”的时区,但是您的 spark 集群位于 GMT,或者 conf 设置为:
spark.conf.set("spark.sql.session.timeZone", "GMT")
将此行明确更改为伦敦时区(BST?)
或者使用花哨的 from_utc_timestamp 函数,它可以让您在转换 ts 时指定时区
还要检查您的 ts 是否以毫秒为单位,并在 JVM 配置 spark.executor.extraJavaOptions 中设置 -Duser.timezone
推荐阅读
- angular - 类型'可观察的
>' 不可分配给类型 'Observable '。输入“承诺” ' 不见了 - html - 网格列开始和结束而不指定开始或结束
- ios - 如何将 PDF 查看器实现到 SwiftUI 应用程序?
- python - Python中不可子类化的对象
- java - 使用 android 复选框崩溃
- swift - Swift UI 按钮动作函数
- java - MCP 无法识别的选项:-Xincgc
- python - 'geckodriver' 可执行文件需要通过 Selenium 使用 GeckoDriver 和 Firefox 在 PATH 中
- c# - 用户定义的从接口到类的转换
- twitter-bootstrap - Bootstrap 5 中的多级下拉菜单