You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by adrian-wang <gi...@git.apache.org> on 2015/11/10 08:51:47 UTC

[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

GitHub user adrian-wang opened a pull request:

    https://github.com/apache/spark/pull/9589

    [SPARK-11624][SQL]fix commands that need hive to exec

    spark-sql> !echo "test";
    Exception in thread "main" java.lang.ClassCastException: org.apache.hadoop.hive.ql.session.SessionState cannot be cast to org.apache.hadoop.hive.cli.CliSessionState
    	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:112)
    	at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.processCmd(SparkSQLCLIDriver.scala:301)
    	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
    	at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver$.main(SparkSQLCLIDriver.scala:242)
    	at org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.main(SparkSQLCLIDriver.scala)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:691)
    	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
    	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
    	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120)
    	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/adrian-wang/spark clicommand

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/9589.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #9589
    
----
commit e1716e22a6fd50f35cc2c5e8362ee0828c9622c9
Author: Daoyuan Wang <da...@intel.com>
Date:   2015-11-10T07:49:24Z

    fix commands that need hive to exec

----


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by yhuai <gi...@git.apache.org>.
Github user yhuai commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-187442814
  
    test this please


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-187491687
  
    Merged build finished. Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by yhuai <gi...@git.apache.org>.
Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r53717786
  
    --- Diff: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala ---
    @@ -288,8 +288,11 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging {
         val tokens: Array[String] = cmd_trimmed.split("\\s+")
         val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
         if (cmd_lower.equals("quit") ||
    -      cmd_lower.equals("exit") ||
    -      tokens(0).toLowerCase(Locale.ENGLISH).equals("source") ||
    +      cmd_lower.equals("exit")) {
    +      sessionState.close()
    +      System.exit(0)
    +    }
    +    if (tokens(0).toLowerCase(Locale.ENGLISH).equals("source") ||
    --- End diff --
    
    oh, Hive does the same thing.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r44709825
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    Please add a comment about why we need special handling here.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by adrian-wang <gi...@git.apache.org>.
Github user adrian-wang commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156340093
  
    retest this please.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-161387321
  
    Unfortunately RC1 has been cut already and changes to initialization are too likely to break things at this point.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by jameszhouyi <gi...@git.apache.org>.
Github user jameszhouyi commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-161855688
  
    Thanks @marmbrus for your response. This is regression bug(not found in 1.5.X) so hopefully it can be fixed in 1.6.0.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-155374400
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/45508/
    Test FAILed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-184689897
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/51358/
    Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-187491243
  
    **[Test build #51702 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51702/consoleFull)** for PR 9589 at commit [`dfe248d`](https://github.com/apache/spark/commit/dfe248d6a22d6177b185ec8460486d9b7249247c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r48777449
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    I'm not arguing against the change to avoid replacing the SessionState if it already exists.  I'm asking why it has to check to see if it is a `CliSessionState` or not in order for this logic to work.  Ideally we would not couple these components this closely.  If we have to do so, then you need to explain why.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-155374325
  
    **[Test build #45508 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45508/consoleFull)** for PR 9589 at commit [`e1716e2`](https://github.com/apache/spark/commit/e1716e22a6fd50f35cc2c5e8362ee0828c9622c9).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by zhichao-li <gi...@git.apache.org>.
Github user zhichao-li commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r48398910
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    I guess the idea is to check if it contain user setting(i.e from .hiverc) or not. If we create new SessionState from scratch those info would be lost. 


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by adrian-wang <gi...@git.apache.org>.
Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r44751867
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    I thought of adding flags to these function, but that seems too complicate. @marmbrus do you have a better idea here?


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156030736
  
    Merged build finished. Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156339357
  
    **[Test build #45834 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45834/consoleFull)** for PR 9589 at commit [`6203bc7`](https://github.com/apache/spark/commit/6203bc7afdd75228566322784b15948960524697).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/9589


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r53517914
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -104,29 +104,39 @@ private[hive] class HiveClientImpl(
         }
     
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      // originState will be created if not exists, will never be null
    +      val originalState = SessionState.get()
    +      if (originalState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    What happens if you don't special case this?  Why is this dependent on the type of the session state and not just on the fact that a session has already been started?


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by yhuai <gi...@git.apache.org>.
Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r53677494
  
    --- Diff: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala ---
    @@ -288,8 +288,11 @@ private[hive] class SparkSQLCLIDriver extends CliDriver with Logging {
         val tokens: Array[String] = cmd_trimmed.split("\\s+")
         val cmd_1: String = cmd_trimmed.substring(tokens(0).length()).trim()
         if (cmd_lower.equals("quit") ||
    -      cmd_lower.equals("exit") ||
    -      tokens(0).toLowerCase(Locale.ENGLISH).equals("source") ||
    +      cmd_lower.equals("exit")) {
    +      sessionState.close()
    +      System.exit(0)
    +    }
    +    if (tokens(0).toLowerCase(Locale.ENGLISH).equals("source") ||
    --- End diff --
    
    Do we need to change this?


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r48873452
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    In what case does a plain `SessionState` exist, where you need to create a new one?


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by jameszhouyi <gi...@git.apache.org>.
Github user jameszhouyi commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-161215023
  
    This is critical bug. Strong hopefully it can be fixed and merged in 1.6.0. Thanks !


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-155349061
  
    Merged build started.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156030639
  
    **[Test build #45710 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45710/consoleFull)** for PR 9589 at commit [`6f4e0e8`](https://github.com/apache/spark/commit/6f4e0e8f31f797969bd34e7d83d2ee172effb84e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156339391
  
    Merged build finished. Test FAILed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156010446
  
     Merged build triggered.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156030738
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/45710/
    Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156331403
  
    **[Test build #45834 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45834/consoleFull)** for PR 9589 at commit [`6203bc7`](https://github.com/apache/spark/commit/6203bc7afdd75228566322784b15948960524697).


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156329244
  
    Merged build started.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-184689894
  
    Merged build finished. Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-184634305
  
    Merged build finished. Test FAILed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156378369
  
    Merged build finished. Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156378170
  
    **[Test build #45839 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45839/consoleFull)** for PR 9589 at commit [`6203bc7`](https://github.com/apache/spark/commit/6203bc7afdd75228566322784b15948960524697).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156329228
  
     Merged build triggered.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156378371
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/45839/
    Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156341076
  
     Merged build triggered.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-155374396
  
    Merged build finished. Test FAILed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-180245251
  
    **[Test build #50813 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/50813/consoleFull)** for PR 9589 at commit [`88eef1f`](https://github.com/apache/spark/commit/88eef1fdeff208c95654f7e8558568721ccd9c47).


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-180289060
  
    Merged build finished. Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156341113
  
    Merged build started.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by adrian-wang <gi...@git.apache.org>.
Github user adrian-wang commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-183811059
  
    @marmbrus We have instantiated and started a instance of `CliSessionState`, and when we init `SparkSQLEnv`, we will create a `SessionState`.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by adrian-wang <gi...@git.apache.org>.
Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r48829056
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    When we have a `CliSessionState`, we are using Spark SQL CLI, in this case we never need second `SessionState` here. Creating another `SessionState` would fail some cases since `CliSessionState` is inherited from `SessionState`, which could lead to `ClassCastException`.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156339392
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/45834/
    Test FAILed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by adrian-wang <gi...@git.apache.org>.
Github user adrian-wang commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-185523881
  
    @marmbrus 


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-184634309
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/51357/
    Test FAILed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-180288823
  
    **[Test build #50813 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/50813/consoleFull)** for PR 9589 at commit [`88eef1f`](https://github.com/apache/spark/commit/88eef1fdeff208c95654f7e8558568721ccd9c47).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-184689190
  
    **[Test build #51358 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51358/consoleFull)** for PR 9589 at commit [`dfe248d`](https://github.com/apache/spark/commit/dfe248d6a22d6177b185ec8460486d9b7249247c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156341657
  
    **[Test build #45839 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45839/consoleFull)** for PR 9589 at commit [`6203bc7`](https://github.com/apache/spark/commit/6203bc7afdd75228566322784b15948960524697).


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-155349036
  
     Merged build triggered.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by adrian-wang <gi...@git.apache.org>.
Github user adrian-wang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r53545337
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala ---
    @@ -104,29 +104,39 @@ private[hive] class HiveClientImpl(
         }
     
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      // originState will be created if not exists, will never be null
    +      val originalState = SessionState.get()
    +      if (originalState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    the `SessionState.get()` method would create a instance of `SessionState` if not exists.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156011399
  
    **[Test build #45710 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45710/consoleFull)** for PR 9589 at commit [`6f4e0e8`](https://github.com/apache/spark/commit/6f4e0e8f31f797969bd34e7d83d2ee172effb84e).


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-184639804
  
    **[Test build #51358 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51358/consoleFull)** for PR 9589 at commit [`dfe248d`](https://github.com/apache/spark/commit/dfe248d6a22d6177b185ec8460486d9b7249247c).


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r46451745
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    I don't understand why we need to have special handling for CLISessionState.  It is complicating the dependencies and making the already complex control flow even harder to follow.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-187491692
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/51702/
    Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9589#discussion_r44709943
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/ClientWrapper.scala ---
    @@ -151,29 +152,34 @@ private[hive] class ClientWrapper(
         // Switch to the initClassLoader.
         Thread.currentThread().setContextClassLoader(initClassLoader)
         val ret = try {
    -      val initialConf = new HiveConf(classOf[SessionState])
    -      // HiveConf is a Hadoop Configuration, which has a field of classLoader and
    -      // the initial value will be the current thread's context class loader
    -      // (i.e. initClassLoader at here).
    -      // We call initialConf.setClassLoader(initClassLoader) at here to make
    -      // this action explicit.
    -      initialConf.setClassLoader(initClassLoader)
    -      config.foreach { case (k, v) =>
    -        if (k.toLowerCase.contains("password")) {
    -          logDebug(s"Hive Config: $k=xxx")
    -        } else {
    -          logDebug(s"Hive Config: $k=$v")
    +      val registeredState = SessionState.get
    +      if (registeredState != null && registeredState.isInstanceOf[CliSessionState]) {
    --- End diff --
    
    Note, it would be better if we didn't have to handle this specially.  It make the control flow even more confusing than it already is.


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-155349933
  
    **[Test build #45508 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/45508/consoleFull)** for PR 9589 at commit [`e1716e2`](https://github.com/apache/spark/commit/e1716e22a6fd50f35cc2c5e8362ee0828c9622c9).


---
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


[GitHub] spark pull request: [SPARK-11624][SQL]fix commands that need hive ...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-156010458
  
    Merged build started.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-180289061
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/50813/
    Test PASSed.


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-187445644
  
    **[Test build #51702 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/51702/consoleFull)** for PR 9589 at commit [`dfe248d`](https://github.com/apache/spark/commit/dfe248d6a22d6177b185ec8460486d9b7249247c).


---
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


[GitHub] spark pull request: [SPARK-11624][SPARK-11972][SQL]fix commands th...

Posted by marmbrus <gi...@git.apache.org>.
Github user marmbrus commented on the pull request:

    https://github.com/apache/spark/pull/9589#issuecomment-187489066
  
    Merged to master and 1.6


---
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