1、保证spark-sql已经使用mysql作为metadata存储介质
2、启动thrift网关
$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、确认是否正确
beeline
>!connect jdbc:hive2://hd1:10000
user:hadoop
password:******
show databases;
show tables;
如果能够看到和本地启动的spark-sql一样的结果,就是确认成功了。
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/193142.html