- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图了解 createOrReplaceGlobalTempView 和 createOrReplaceTempView 之间的区别。
createOrReplaceTempView是在2.0版本中引入的,createOrReplaceGlobalTempView是在2.2版本中引入的。
根据文档,
对于 createOrReplaceGlobalTempView :此临时 View 的生命周期与此 Spark 应用程序相关联。
对于 createOrReplaceGlobalTempView :此临时表的生命周期与用于创建此 DataFrame 的 SparkSession 相关联。
能否请您详细说明一下 Spark Application 和 SparkSession 的区别。
问候,
尼拉吉
最佳答案
标准临时表位于用户空间中,similarly to Hive
The data in these tables is stored in the user's scratch directory rather than in the Hive warehouse directory. The scratch directory effectively acts as the user' data sandbox.
并且仅限于单个用户 session 。
全局临时 View 的不同之处在于,可以被多个 session 访问,因此在普通 View (可以全局访问,它注册在全局临时数据库中)和临时 View (其范围是仅限于单个 session )。
关于apache-spark - createOrReplaceGlobalTempView 和 createOrReplaceTempView 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48519038/
我的代码在 emr 中不起作用 finalDF.createOrReplaceGlobalTempView("temp_visits") spark.sql(s"insert overwrite ta
我试图了解 createOrReplaceGlobalTempView 和 createOrReplaceTempView 之间的区别。 createOrReplaceTempView是在2.0版本中
我是一名优秀的程序员,十分优秀!