[
https://issues.apache.org/jira/browse/CARBONDATA-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15363668#comment-15363668
]
ASF GitHub Bot commented on CARBONDATA-40:
------------------------------------------
Github user gvramana commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/23#discussion_r69669006
--- Diff:
integration/spark/src/main/scala/org/apache/spark/sql/CarbonContext.scala ---
@@ -32,8 +34,22 @@ import org.carbondata.common.logging.LogServiceFactory
import org.carbondata.core.util.CarbonProperties
import org.carbondata.spark.rdd.CarbonDataFrameRDD
-class CarbonContext(val sc: SparkContext, val storePath: String) extends
HiveContext(sc) {
+class CarbonContext(
+ val sc: SparkContext,
+ val storePath: String,
+ metaStorePath: String) extends HiveContext(sc) with Logging {
self =>
+
+ def this (sc: SparkContext) = {
+ this (sc,
+ new File("./carbonstore").getCanonicalPath,
+ new File("./carbonmetastore").getCanonicalPath)
--- End diff --
we also can add a configuration CarbonCommonConstants.META_STORE_LOCATION,
defaulting to ./carbonmetastore.
> Make metastore_db location of derby configurable in CarbonContext
> -----------------------------------------------------------------
>
> Key: CARBONDATA-40
> URL: https://issues.apache.org/jira/browse/CARBONDATA-40
> Project: CarbonData
> Issue Type: Improvement
> Reporter: Ravindra Pesala
> Assignee: Ravindra Pesala
>
> Currently metastore_db location of derby is not configurable and it is always
> created in current directory. Because of this constraint user not able to
> create multiple CarbonContext with derby db. This is the reason user cannot
> create CarbonContext in spark-shell with standalone derby db.
> To overcome the above issue we can make the derby db location configurable
> while creating CarbonContext.
> Case 1:
> {code}
> val cc = new CarbonContext(sc)
> {code}
> In above scenario, default store location at `./carbondata` it means store is
> created in current directory.And default metastore location
> `./carbonmetastore`, it means metastore is created at current directory.
> Case 2 :
> {code}
> val cc = new CarbonContext(sc, storeLocation)
> {code}
> In above scenario, default metastore location `./carbonmetastore`, it means
> metastore is created at current directory.
> Case 3:
> {code}
> val cc = new CarbonContext(sc, storeLocation, metastoreLocation)
> {code}
> In above scenario all parameters are passed, so store location and
> metastoreLocation would be created at desired location.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)