Skip to content

Commit

Permalink
[SPARK-2814][SQL] HiveThriftServer2 throws NPE when executing native …
Browse files Browse the repository at this point in the history
…commands

JIRA issue: [SPARK-2814](https://issues.apache.org/jira/browse/SPARK-2814)

Author: Cheng Lian <[email protected]>

Closes apache#1753 from liancheng/spark-2814 and squashes the following commits:

c74a3b2 [Cheng Lian] Fixed SPARK-2814
  • Loading branch information
liancheng authored and marmbrus committed Aug 3, 2014
1 parent 236dfac commit ac33cbb
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,12 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
@transient protected[hive] lazy val sessionState = {
val ss = new SessionState(hiveconf)
set(hiveconf.getAllProperties) // Have SQLConf pick up the initial set of HiveConf.

ss.err = new PrintStream(outputBuffer, true, "UTF-8")
ss.out = new PrintStream(outputBuffer, true, "UTF-8")

ss
}

sessionState.err = new PrintStream(outputBuffer, true, "UTF-8")
sessionState.out = new PrintStream(outputBuffer, true, "UTF-8")

override def set(key: String, value: String): Unit = {
super.set(key, value)
runSqlHive(s"SET $key=$value")
Expand Down

0 comments on commit ac33cbb

Please sign in to comment.