You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by JoshRosen <gi...@git.apache.org> on 2015/10/20 03:45:32 UTC

[GitHub] spark pull request: [SPARK-10152] [SQL] Support Init script for hi...

Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8355#discussion_r42447490
  
    --- Diff: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2.scala ---
    @@ -67,6 +68,46 @@ object HiveThriftServer2 extends Logging {
         }
       }
     
    +  def runScript(sqlContext: HiveContext) {
    +    val hiveConf = sqlContext.hiveconf
    +    val script = hiveConf.get("hive.server2.init.script", null)
    +    if (script != null && !script.isEmpty) {
    +      getCommands(script).foreach { c =>
    +        try {
    +          LOG.warn("Running.. " + c)
    +          sqlContext.runSqlHive(c).foreach { o => LOG.warn(o) }
    +        } catch {
    +          case t: Throwable => LOG.warn("Failed to run command " + c, t)
    --- End diff --
    
    This should probably catch `NonFatal` instead of throwable, no?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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