...
外网连接:
sbin/start-thriftserver.sh --hiveconf hive.server2.thrift.port=10000 --hiveconf hive.server2.thrift.bind.host=hadoop-master --master spark://10.9.2.100:7077 --driver-class-path /usr/local/hive-1.2.1/lib/mysql-connector-java-5.1.31-bin.jar
采用spark on yarn的方式
sbin/start-thriftserver.sh --hiveconf hive.server2.thrift.port=10000 --driver-class-path /usr/local/hive-1.2.1/lib/mysql-connector-java-5.1.31-bin.jar --master yarn --driver-cores 2 --driver-memory 2G --executor-cores 2 --executor-memory 2G --num-executors 8
其中:
spark://10.9.2.100:7077:是Spark的master地址,根据需要修改
...
[hadoop@node1 bin]$ ./beeline -u jdbc:hive2://192.168.1.26:10000/default -n hadoop
0: jdbc:hive2://192.168.1.26:10000/default> show databases;
...
URL:jdbc:hive2://122.23.368.32:10000/default
用户:hadoop
用户、密码:一般默认是空密码:一般默认是空