Configure and start the thriftserver gateway for spark
1. Make sure that spark-sql has used mysql as the metadata storage medium
2. Start the thrift gateway
$SPARK_HOME/sbin/start-thriftserver.sh-driver-class-path / usr/local/spark/spark-1.3.0-bin-hadoop2.3/lib/mysql-connector-java-5.1.6-bin.jar-master spark://hd1:7077-executor-memory 2g-total-executor-cores 10
3. Confirm whether it is correct
Beeline
>! connect jdbc:hive2://hd1:10000
User:hadoop
Password:*
Show databases
Show tables
If you can see the same result as the locally launched spark-sql, it is confirmed to be successful.