Reputation: 21
I am using spark(standalone) of CDH5.4.2
After copying hive-site.xml
to $SPARK_HOME/conf
,i can query from hive in spark-shell
,such as below:
scala> val hiveContext = new org.apache.spark.sql.hive.HiveContext(sc); hiveContext: org.apache.spark.sql.hive.HiveContext = org.apache.spark.sql.hive.HiveContext@6c6f3a15 scala> hiveContext.sql("show tables").show();
But when i open spark-sql
,it show wrong:
java.lang.ClassNotFoundException: org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver Failed to load main class org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.
You need to build Spark with -Phive and -Phive-thriftserver.
What is different between spark-shell
and spark-sql
? If spark of cdh don't support hive,why can i use HiveConext
?
Upvotes: 0
Views: 773
Reputation: 1000
Cloudera has a list of unsupported features here:
https://docs.cloudera.com/runtime/7.2.6/spark-overview/topics/spark-unsupported-features.html
The Thrift server is not supported.
This is a copy of the list for 7.2.6:
Upvotes: 0