Github user marmbrus commented on a diff in the pull request: https://github.com/apache/spark/pull/2812#discussion_r19120144 --- Diff: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala --- @@ -69,6 +71,10 @@ object HiveThriftServer2 extends Logging { logInfo("Starting SparkContext") SparkSQLEnv.init() SessionState.start(ss) + SparkSQLEnv.hiveContext.sessionState.err = + new PrintStream(SparkSQLEnv.hiveContext.outputBuffer, true, "UTF-8") + SparkSQLEnv.hiveContext.sessionState.out = + new PrintStream(SparkSQLEnv.hiveContext.outputBuffer, true, "UTF-8") --- End diff -- Instead of duplicating this code, can we just change the line above to `SessionState.start(SparkSQLEnv.hiveContext.sessionState)`. `out` and `err` would be initialized then. I'm actually not sure why we are creating our own session state here at all instead of using the one provided by the context.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org