`
dacoolbaby
  • 浏览: 1254675 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Hive JDBC 配置session properties

    博客分类:
  • Hive
阅读更多
在使用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.
 
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics