diff options
author | Daoyuan Wang <daoyuan.wang@intel.com> | 2016-02-22 18:13:32 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2016-02-22 18:13:32 -0800 |
commit | 5d80fac58f837933b5359a8057676f45539e53af (patch) | |
tree | 8099a8440de4639e43fdc7bdbad7c50d7506c32c /licenses/LICENSE-dagre-d3.txt | |
parent | a11b3995190cb4a983adcc8667f7b316cce18d24 (diff) | |
download | spark-5d80fac58f837933b5359a8057676f45539e53af.tar.gz spark-5d80fac58f837933b5359a8057676f45539e53af.tar.bz2 spark-5d80fac58f837933b5359a8057676f45539e53af.zip |
[SPARK-11624][SPARK-11972][SQL] fix commands that need hive to exec
In SparkSQLCLI, we have created a `CliSessionState`, but then we call `SparkSQLEnv.init()`, which will start another `SessionState`. This would lead to exception because `processCmd` need to get the `CliSessionState` instance by calling `SessionState.get()`, but the return value would be a instance of `SessionState`. See the exception below.
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)
Author: Daoyuan Wang <daoyuan.wang@intel.com>
Closes #9589 from adrian-wang/clicommand.
Diffstat (limited to 'licenses/LICENSE-dagre-d3.txt')
0 files changed, 0 insertions, 0 deletions