在使用hive jdbc的时候,需要有一些hive session的配置,
比如说:
当前作业使用的是哪条队列
当前作业的map大小,reduce大小,map个数,reduce的个数。
等等
解决方案是:在jdbc url上面,进行初始化的配置。
Connection URL Format
The HiveServer2 URL is a string with the following syntax:
jdbc:hive2://<host1>:<port1>,<host2>:<port2>/dbName;initFile=<file>;sess_var_list?hive_conf_list#hive_var_list
where
- <host1>:<port1>,<host2>:<port2> is a server instance or a comma separated list of server instances to connect to (if dynamic service discovery is enabled). If empty, the embedded server will be used.
- dbName is the name of the initial database.
- <file> is the path of init script file (Hive 2.2.0 and later). This script file is written with SQL statements which will be executed automatically after connection. This option can be empty.
- sess_var_list is a semicolon separated list of key=value pairs of session variables (e.g., user=foo;password=bar).
- hive_conf_list is a semicolon separated list of key=value pairs of Hive configuration variables for this session
- hive_var_list is a semicolon separated list of key=value pairs of Hive variables for this session.
相关推荐
hive-jdbc
hive jdbc驱动 2.5.15 及 2.6.1两个版本,亲测有用!!!
hive jdbc 连接所需要的所有jar包,很全的,不需要再下载其他的
hive_jdbc,经过测试可以连接的。有需要的可以下载看下。hive_jdbc,经过测试可以连接的。有需要的可以下载看下。
hive权限,通过自定义jar对hive的10000端口进行权限管控,直接放入到hive所在的lib环境下,然后对xml文件进行相应的配置
hive JDBC连接实例 maven工程
hive jdbc jar包用于hive连接数据库驱动
Cloudera Hive JDBC 驱动包 Easily Build BI Applications with Open Source, Interactive SQL The Cloudera JDBC Driver for Hive enables your enterprise users to access Hadoop data through Business ...
impala_jdbc_2.5.41.1061(最新) hive_jdbc_2.5.19.1053(最新) 均包含英文使用说明文档,兼容绝大多数的hive/impala版本 该资源来自cloudera,仅用于分享知识,学习和交流,请勿用于商业用途
HiveJDBC驱动可直接配合DBeaver使用,新建连接 -> Apache Hive ->编辑驱动设置(删除默认地址) ->添加文件 ->选中下载的文件 ->点击找到类 ->确定
driver = "org.apache.hive.jdbc.HiveDriver" user = "hive" password = "hive" table = ods_wjw_jb_gxy_hz_glk query = "select a,b,c from ods_wjw_jb_gxy_hz_glk" fetch_size = 300 } }
cloudera.com为我们提供的hiveserver2-JDBC驱动包,不需要把10几个jar找齐就能使用了。
本项目对如何在Springboot项目中整合hive-jdbc进行简单示例和介绍,亲测可用,请放心下载。
hive的驱动包,支持使用jdbc的方式连接hive组件,可在客户端使用sql进行数据库操作
通过导入jar包,连接hive数据库驱动,DbVisualizer连接Hive数据库所需jar包,包含:hadoop-common-2.2.0.jar,hive-jdbc-2.1.1-standalone.jar,hive-jdbc-2.1.1.jar,满足日常hive查询需求。
hive连接jdbc的jar包: hive-jdbc-1.1.0.jar
包含hive-jdbc-standalone.jar;hive-jdbc-1.1.0-cdh5.10.0-standalone.jar;hive-jdbc-1.1.0-cdh5.10.0.jar;hive-jdbc.jar
hive-jdbc-2.1.0.jar
jdbc连接hive所需的一个包 ( hive-jdbc-3.1.2.jar)
hive-jdbc-3.1.2-standalone适用于linux