用beeline连接SparkSQL

mime
⽤beeline连接SparkSQL
1. 在$SPARK_HOME/l⽂件中添加下⾯的属性
vi $SPARK_HOME/l
<configuration>
<property>
<name&astore.uris</name>常芝青>葫芦岛市商业银行
<value>thrift://master:9083</value>
<description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.
</description>
</property>
<property>
<name>hive.server2.thrift.bind.host</name>
<value>192.168.56.101</value>
<description>Bind host on which to run the HiveServer2 Thrift service.</description>
</property>
<property>
<name>hive.server2.thrift.port</name>
<value>10001</value>
<description>Port number of HiveServer2 Thrift interface when de is 'binary'.</description>    </property>
<property>
<name>hive.server2.thrift.min.worker.threads</name>
<value>5</value>
<description>Minimum number of Thrift worker threads</description>
对甲苯磺酸甲酯
</property>
<property>
<name>hive.server2.thrift.max.worker.threads</name>
<value>500</value>
<description>Maximum number of Thrift worker threads</description>
</property>
<property>
<name>able.doAs</name>
<value>false</value>
</property>
</configuration>
2. 复制mysql JDBC驱动⽂件到$SPARK_HOME/lib/
cp mysql-connector-java-5.1.31-bin.jar $SPARK_HOME/lib/
3. 启动hive元数据存储服务
南方电视台少儿频道hive --service metastore > /tmp/grid/hive_metastore.log 2>&1 &
华夏之声4. 启动spark thriftserver服务
$SPARK_HOME/sbin/start-thriftserver.sh --master spark://192.168.56.101:7077 --executor-memory 30g
5. 登⼊beeline
$SPARK_HOME/bin/beeline -u jdbc:hive2://192.168.56.101:10001/
参考:

本文发布于:2024-09-22 01:15:15,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/279995.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:服务   添加   葫芦岛市
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议