澄清 Spark 物理计划交换哈希分区中“[id=#]”的含义

问题描述 投票:0回答:1

在查看 Spark 物理计划以查找代码中的任何瓶颈时,我偶然发现了一个出现在分区阶段的 ID。

+- *(2) Sort [Column#46 ASC NULLS FIRST], true, 0
    +- Exchange hashpartitioning(ColumnId#329, 200), ENSURE_REQUIREMENTS, [id=#278]

[id=#278]到底指的是什么?

我见过一些例子,说这个 ID 是对特定分区、阶段 id 或 plan_id 的引用,但我无法确认它是哪一个。

python apache-spark pyspark apache-spark-sql bigdata
1个回答
0
投票

在我看来,它是通过 Spark codegen 进程生成的阶段 ID。

此链接可能有助于了解更多详细信息:

https://jaceklaskowski.gitbooks.io/mastering-spark-sql/content/spark-sql-CollapseCodegenStages.html

© www.soinside.com 2019 - 2024. All rights reserved.