需求:使用spark sql 的執行引擎來操作hive數據倉庫中的數據,使用hive thriftserver 服務
cd /opt/modules/spark-1.6.1-bin-hadoop2.6/sbin/
sudo vim start-thriftserver-withJDBC.sh
修改如下:
sh start-thriftserver.sh \
--hiveconf hive.server2.thrift.port=11000 \ //指定為11000端口號,默認為10000
--master spark://10.130.2.20:7077 \
--executor-memory 44g \
--total-executor-cores 130 \
--num-executors 22 \
--driver-memory 16g
cd ../bin
vim bdcmagic :
user=`who am i`
pass="Abcd1234"
beeline -u jdbc:hive2://10.130.2.20:11000 -n $user -p $pass