hive基础架构,
Hive Structure
Metastore 服务和存储的方式
1.内嵌模式
2.本地模式
3.远程模式
建议采取远程模式,这样的模式可以将数据库层完全置于防火墙后,客户就不再需要用户名和密码登录数据库,避免了认证信息的泄漏。
配置信息 hive 1.1.0
服务端配置:
属性 | 默认值 | 描述 |
hive.metastore.uris | thrift://172.24.3.57:9083 | 远端模式下Metastore的URI列表 |
javax.jdo.option.ConnectionURL | jdbc:mysql://172.24.3.56:3306/hive? | metastore数据库的JDBC URL |
javax.jdo.option.ConnectionDriverName | com.mysql.jdbc.Driver | JDBC驱动类 |
javax.jdo.option.ConnectionUserName | hive | JDBC用户名 |
javax.jdo.option.ConnectionPassword | *** | JDBC密码 |
客户端配置:
属性 | 默认值 | 描述 |
hive.metastore.uris | thrift://172.24.3.57:9083 | 远端模式下Metastore的URI列表 |
hive.metastore.local | false | Metastore is remote. Note: This is no longer needed as of Hive 0.10. Settinghive.metastore.uri is sufficient. |
1.10 测试的过程中发现hive.metastore.local 不设置也没关系, 主要根据uris 来进行判断。
注意:在测试的过程中发现设置uris 的port 为其他值没有效果(hive.metastore.port Hive 1.3.0 and later 加入)
对于hivemetastore 服务 可以将配置放到hivemetastore-site.xml 中,加载顺序 hive-site.xml --> hive-metastore.xml --> -hiveconf ,后面加载的生效。
参考资料:https://cwiki.apache.org/confluence/display/Hive/AdminManual+MetastoreAdmin
https://cwiki.apache.org/confluence/display/Hive/AdminManual+Configuration
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。