Skip to content

Commit

Permalink
Fixed relative path issue of metastore location
Browse files Browse the repository at this point in the history
  • Loading branch information
ravipesala committed Jul 9, 2016
1 parent 94b192d commit fccae0d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ class CarbonContext(
override protected def configure(): Map[String, String] = {
sc.hadoopConfiguration.addResource("hive-site.xml")
if (sc.hadoopConfiguration.get(CarbonCommonConstants.HIVE_CONNECTION_URL) == null) {
val hiveMetaStoreDB = metaStorePath + "/metastore_db"
val metaStorePathAbsolute = new File(metaStorePath).getCanonicalPath
val hiveMetaStoreDB = metaStorePathAbsolute + "/metastore_db"
logDebug(s"metastore db is going to be created in location : $hiveMetaStoreDB")
super.configure() ++ Map((CarbonCommonConstants.HIVE_CONNECTION_URL,
s"jdbc:derby:;databaseName=$hiveMetaStoreDB;create=true"),
("hive.metastore.warehouse.dir", metaStorePath + "/hivemetadata"))
("hive.metastore.warehouse.dir", metaStorePathAbsolute + "/hivemetadata"))
} else {
super.configure()
}
Expand Down

0 comments on commit fccae0d

Please sign in to comment.