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

HiveUtils

HiveUtils

HiveUtils is used to create a HiveClientImpl that HiveExternalCatalog uses to interact with a Hive metastore.

Tip

Enable INFO logging level for org.apache.spark.sql.hive.HiveUtils logger to see what happens inside.

Add the following line to conf/log4j.properties:

Refer to Logging.

Creating HiveClientImpl — newClientForMetadata Method

  1. Executes the other newClientForMetadata with time configurations formatted

Internally, newClientForMetadata creates a new SQLConf with spark.sql properties only (from the input SparkConf).

newClientForMetadata then creates a IsolatedClientLoader per the input parameters and the following configuration properties:

You should see one of the following INFO messages in the logs:

In the end, newClientForMetadata requests the IsolatedClientLoader to create a HiveClientImpl.

Note
newClientForMetadata is used exclusively when HiveExternalCatalog is requested for a HiveClient.

inferSchema Method

inferSchema…​FIXME

Note
inferSchema is used when…​FIXME
赞(0) 打赏
未经允许不得转载:spark技术分享 » HiveUtils
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏