Skip to content

Commit

Permalink
[SPARK-20594]The staging directory should be appended with ".hive-sta…
Browse files Browse the repository at this point in the history
…ging" to avoid being deleted if we set hive.exec.stagingdir under the table directory without start with "."
  • Loading branch information
zuotingbing committed May 4, 2017
1 parent 02bbe73 commit c154f3a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ case class InsertIntoHiveTable(
val externalCatalog = sparkSession.sharedState.externalCatalog
val hiveVersion = externalCatalog.asInstanceOf[HiveExternalCatalog].client.version
val hadoopConf = sessionState.newHadoopConf()
val stagingDir = hadoopConf.get("hive.exec.stagingdir", ".hive-staging")
val stagingDir = hadoopConf.get("hive.exec.stagingdir", ".hive-staging") + "/.hive-staging"
val scratchDir = hadoopConf.get("hive.exec.scratchdir", "/tmp/hive")

val hiveQlTable = HiveClientImpl.toHiveTable(table)
Expand Down

0 comments on commit c154f3a

Please sign in to comment.