需求:使用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