Skip to content

Commit e56fd4a

Browse files
committed
getAbsolutePath
1 parent 5a259f5 commit e56fd4a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ private[hive] object SparkSQLCLIDriver {
7474
System.exit(1)
7575
}
7676

77-
val localMetastore = {
78-
val temp = Utils.createTempDir()
79-
temp.delete()
80-
temp
81-
}
8277
val cliConf = new HiveConf(classOf[SessionState])
8378
// Override the location of the metastore since this is only used for local execution.
8479
HiveContext.newTemporaryConfiguration().foreach {

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ private[hive] object HiveContext {
465465
/** Constructs a configuration for hive, where the metastore is located in a temp directory. */
466466
def newTemporaryConfiguration(): Map[String, String] = {
467467
val tempDir = Utils.createTempDir()
468-
val localMetastore = new File(tempDir, "metastore")
468+
val localMetastore = new File(tempDir, "metastore").getAbsolutePath
469469
Map(
470470
"javax.jdo.option.ConnectionURL" -> s"jdbc:derby:;databaseName=$localMetastore;create=true")
471471
}

0 commit comments

Comments
 (0)