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

InsertIntoHadoopFsRelationCommand

InsertIntoHadoopFsRelationCommand Logical Command

InsertIntoHadoopFsRelationCommand is a DataWritingCommand that writes the data of the query out using the FileFormat.

InsertIntoHadoopFsRelationCommand is created when:

Executing Logical Command — run Method

Note
run is part of RunnableCommand Contract to execute (run) a logical command.

run uses the spark.sql.hive.manageFilesourcePartitions configuration property to…​FIXME

Caution
FIXME When is the catalogTable defined?
Caution
FIXME When is tracksPartitionsInCatalog of CatalogTable enabled?

run…​FIXME

Creating InsertIntoHadoopFsRelationCommand Instance

InsertIntoHadoopFsRelationCommand takes the following when created:

  • Output Hadoop’s Path

  • Static table partitions (Map[String, String])

  • ifPartitionNotExists flag

  • Partition columns (Seq[Attribute])

  • BucketSpec

  • FileFormat

  • Options (Map[String, String])

  • Logical plan

  • SaveMode

  • CatalogTable

  • FileIndex

  • Output column names

Note

staticPartitions may hold zero or more partitions as follows:

With that, staticPartitions are simply the partitions of an InsertIntoTable logical operator.

赞(0) 打赏
未经允许不得转载:spark技术分享 » InsertIntoHadoopFsRelationCommand
分享到: 更多 (0)

关注公众号:spark技术分享

联系我们联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏