You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Weizhong (JIRA)" <ji...@apache.org> on 2016/04/13 16:26:25 UTC

[jira] [Updated] (SPARK-13768) Set hive conf failed use --hiveconf when beeline connect to thriftserver

     [ https://issues.apache.org/jira/browse/SPARK-13768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weizhong updated SPARK-13768:
-----------------------------
    Description: 
1. Start thriftserver
2. ./bin/beeline -u '...' --hiveconf hive.exec.max.dynamic.partitions=10000
3. set hive.exec.max.dynamic.partitions;  --  return is default value 1000, not 10000

May be we can pass conf to context when open session
{code:java}
override def openSession(...): SessionHandle = {
  ...
  if (sessionConf != null) {
    import scala.collection.JavaConversions._
    for ((k, v) <- sessionConf) {
      if (k.startsWith("set:hiveconf:")) {
        val setK = k.split("set:hiveconf:")(1)
        ctx.setConf(setK, v)
      }
    }
  }
  ctx.setConf("spark.sql.hive.version", HiveContext.hiveExecutionVersion)
  ...
}
{code}

  was:
1. Start thriftserver
2. ./bin/beeline -u '...' --hiveconf hive.exec.max.dynamic.partitions=10000
3. set hive.exec.max.dynamic.partitions;  --  return is default value 1000, not 10000

May be we can pass conf to context when open session
{code:java}
override def openSession(...): SessionHandle = {
  ...
  if (sessionConf != null) {
    import scala.collection.JavaConversions._
    for ((k, v) <- sessionConf) {
      if (k.startsWith("set:hiveconf:")) {
        val setK = k.split("set:hiveconf:")(1)
        ctx.setConf(setK, v)
      }
    }
  }
  ctx.setConf("spark.sql.hive.version", InnerHiveContext.hiveExecutionVersion)
  ...
}
{code}


> Set hive conf failed use --hiveconf when beeline connect to thriftserver
> ------------------------------------------------------------------------
>
>                 Key: SPARK-13768
>                 URL: https://issues.apache.org/jira/browse/SPARK-13768
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.1
>            Reporter: Weizhong
>            Priority: Minor
>
> 1. Start thriftserver
> 2. ./bin/beeline -u '...' --hiveconf hive.exec.max.dynamic.partitions=10000
> 3. set hive.exec.max.dynamic.partitions;  --  return is default value 1000, not 10000
> May be we can pass conf to context when open session
> {code:java}
> override def openSession(...): SessionHandle = {
>   ...
>   if (sessionConf != null) {
>     import scala.collection.JavaConversions._
>     for ((k, v) <- sessionConf) {
>       if (k.startsWith("set:hiveconf:")) {
>         val setK = k.split("set:hiveconf:")(1)
>         ctx.setConf(setK, v)
>       }
>     }
>   }
>   ctx.setConf("spark.sql.hive.version", HiveContext.hiveExecutionVersion)
>   ...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org