Skip to content

Commit 59df8bb

Browse files
author
福星
committed
hive.exec.stagingdir have no effect
1 parent 8f0c35a commit 59df8bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/InsertIntoHiveTable.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ case class InsertIntoHiveTable(
5555

5656
def output: Seq[Attribute] = Seq.empty
5757

58-
val stagingDir = sessionState.conf.getConfString("hive.exec.stagingdir", ".hive-staging")
58+
val hadoopConf = sessionState.newHadoopConf()
59+
val stagingDir = hadoopConf.get("hive.exec.stagingdir", ".hive-staging")
5960

6061
private def executionId: String = {
6162
val rand: Random = new Random
@@ -144,7 +145,6 @@ case class InsertIntoHiveTable(
144145
// instances within the closure, since Serializer is not serializable while TableDesc is.
145146
val tableDesc = table.tableDesc
146147
val tableLocation = table.hiveQlTable.getDataLocation
147-
val hadoopConf = sessionState.newHadoopConf()
148148
val tmpLocation = getExternalTmpPath(tableLocation, hadoopConf)
149149
val fileSinkConf = new FileSinkDesc(tmpLocation.toString, tableDesc, false)
150150
val isCompressed =

0 commit comments

Comments
 (0)