关注 spark技术分享,
撸spark源码 玩spark最佳实践

HiveSessionStateBuilder — Builder of Hive-Specific SessionState

HiveSessionStateBuilder — Builder of Hive-Specific SessionState

spark sql HiveSessionStateBuilder.png
Figure 1. HiveSessionStateBuilder’s Hive-Specific Properties

HiveSessionStateBuilder is created (using newBuilder) exclusively when…​FIXME

spark sql HiveSessionStateBuilder SessionState.png
Figure 2. HiveSessionStateBuilder and SessionState (in SparkSession)
Table 1. HiveSessionStateBuilder’s Properties
Name Description

analyzer

catalog

HiveSessionCatalog with the following:

Note
If parentState is defined, the state is copied to catalog

Used to create Hive-specific Analyzer and a RelationConversions logical evaluation rule (as part of Hive-Specific Analyzer’s PostHoc Resolution Rules)

externalCatalog

HiveExternalCatalog

planner

SparkPlanner with Hive-specific strategies.

resourceLoader

HiveSessionResourceLoader

SparkPlanner with Hive-Specific Strategies — planner Property

Note
planner is part of BaseSessionStateBuilder Contract to create a query planner.

planner is a SparkPlanner with…​FIXME

planner uses the Hive-specific strategies.

Table 2. Hive-Specific SparkPlanner’s Hive-Specific Strategies
Strategy Description

HiveTableScans

Scripts

Logical Query Plan Analyzer with Hive-Specific Rules — analyzer Property

Note
analyzer is part of BaseSessionStateBuilder Contract to create a logical query plan analyzer.

analyzer is a Analyzer with Hive-specific SessionCatalog (and SQLConf).

analyzer uses the Hive-specific extended resolution, postHoc resolution and extended check rules.

Table 3. Hive-Specific Analyzer’s Extended Resolution Rules (in the order of execution)
Logical Rule Description

ResolveHiveSerdeTable

FindDataSourceTable

ResolveSQLOnFile

Table 4. Hive-Specific Analyzer’s PostHoc Resolution Rules
Logical Rule Description

DetermineTableStats

RelationConversions

PreprocessTableCreation

PreprocessTableInsertion

DataSourceAnalysis

HiveAnalysis

Table 5. Hive-Specific Analyzer’s Extended Check Rules
Logical Rule Description

PreWriteCheck

PreReadCheck

Builder Function to Create HiveSessionStateBuilder — newBuilder Factory Method

Note
newBuilder is part of BaseSessionStateBuilder Contract to…​FIXME.

newBuilder…​FIXME

Creating HiveSessionStateBuilder Instance

HiveSessionStateBuilder takes the following when created:

赞(0) 打赏
未经允许不得转载:spark技术分享 » HiveSessionStateBuilder — Builder of Hive-Specific SessionState
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏