Hortonworks中修改Hive使用postgresql数据库

栏目: 数据库 · PostgreSQL · 发布时间: 7年前

内容简介:版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kongxx/article/details/82991360

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/kongxx/article/details/82991360

首先停止Hive服务

从Ambari管理界面上停止Hive服务

修改Hive配置

在Hive -> Configs -> Advanced中,将数据库改为使用已存在的postgresql数据库,然后修改数据库用户,密码和数据库名称。

创建用户和数据库

使用postgres用户连接postgresql数据库

> psql -U postgres
postgres=# CREATE USER hive WITH PASSWORD 'hive';
postgres=# CREATE DATABASE hive OWNER hive ENCODING 'UTF8';

安装驱动

sudo yum install postgresql-jdbc*

cp /usr/share/java/postgresql-jdbc.jar /usr/hdp/2.6.3.0-235/hive/lib

修改/var/lib/pgsql/data/pg_hba.conf文件

将
local  all  ambari,mapred md5
host  all   ambari,mapred 0.0.0.0/0  md5
host  all   ambari,mapred ::/0 md5

改为
local  all  ambari,mapred,hive md5
host  all   ambari,mapred,hive 0.0.0.0/0  md5
host  all   ambari,mapred.hive ::/0 md5

修改后,重新启动postgresql

sudo systemctl restart postgresql.service

启动Hive服务

从Ambari管理界面上启动Hive服务


以上所述就是小编给大家介绍的《Hortonworks中修改Hive使用postgresql数据库》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Producing Masculinity

Producing Masculinity

Michele White / Routledge / 2019-3 / $39.95

Thoughtful, witty, and illuminating, in this book Michele White explores the ways normative masculinity is associated with computers and the Internet and is a commonly enacted online gender practice. ......一起来看看 《Producing Masculinity》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具