Hive作为一个数据库,经常需要向外界提供数据,Hive默认不能向外提供服务支持,需要启动TSI服务,才可向外界提供基于:JDBC/ODBC标准的访问支持。

配置Hive TSI Thrift Service Interface

TSI配置一:修改Hive-site.xml
配置Hive TSI Thrift Service Interface

TSI配置二:

配置Hive TSI Thrift Service Interface
Hive作为一个外部框架,使用HDFS时可能会出现权限问题,以上配置需要在hadoop集群的masters中的core-site.xml中添加

TSI启动
配置Hive TSI Thrift Service Interface

查看TSI服务是否正常: netstat -tnlp
配置Hive TSI Thrift Service Interface

测试TSI服务是否正常 一般除了使用如上的查看端口,还可以使用hive客户端Hive体内集成了一个命令行的客户端:beelinebeeline –help
配置Hive TSI Thrift Service Interface

配置Hive TSI Thrift Service Interface

进入192.168.10.86:23306代码 beeline -u jdbc:hive2://192.168.10.86:23306

1、需要开启zookeeper
2、需要开启hdfs
3、需要开启yarn
4、hive tsi开启命令:hiveserver2 &

基于Hive的数据库应用开发示例:
1、 创建项目
2、 导入hive jdbc jar包
3、 开发代码
4、 运行测试

相关文章:

  • 2022-12-23
  • 2021-06-22
  • 2021-12-31
  • 2021-10-16
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-28
  • 2021-05-25
  • 2022-02-19
  • 2021-06-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案